ImageSegmenterResult
struct ImageSegmenterResult: Sendable, EquatableSegmentation masks and quality scores produced by ImageSegmenter.
Not Hashable because MPMask is only Equatable.
-
Creates a segmentation result from masks, quality scores, and timestamp.
Declaration
Swift
init(confidenceMasks: [MPMask]?, categoryMask: MPMask?, qualityScores: [Float], timestampInMilliseconds: Int) -
UInt8mask of per-pixel category indices, ornilif a category mask was not requested.Declaration
Swift
let categoryMask: MPMask? -
Per-category
Float32confidence masks, ornilif confidence masks were not requested.Declaration
Swift
let confidenceMasks: [MPMask]? -
Per-category mask quality scores in
0.0...1.0(1.0when the model has no score output).Declaration
Swift
let qualityScores: [Float] -
Timestamp in milliseconds of the input frame, or
0in.imagemode.Declaration
Swift
let timestampInMilliseconds: Int