An optional array of Mask objects. Each Mask in the array holds a 32 bit float array of size
image width * image height which represents the confidence mask for each category. Each
element of the float array represents the confidence with which the model predicted that the
corresponding pixel belongs to the category that the mask represents, usually in the range [0,1].
An optional Mask that holds aUInt8 array of size image width * image height. Each element
of this array represents the class to which the pixel in the original image was predicted to
belong to.
The quality scores of the result masks, in the range of [0, 1]. Defaults to 1 if the model
doesn’t output quality scores. Each element corresponds to the score of the category in the model
outputs.
The quality scores of the result masks of type NSArray *. Each
NSNumber in the array holds a float.
timestampInMilliseconds
The timestamp (in milliseconds) for this result.
Return Value
An instance of ImageSegmenterResult initialized with the given array of confidence
masks, category mask, quality scores and timestamp (in milliseconds).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-08 UTC."],[],[],null,["# MediaPipeTasksVision Framework Reference\n\nImageSegmenterResult\n====================\n\n class ImageSegmenterResult : ../Classes/TaskResult.html\n\nRepresents the segmentation results generated by [ImageSegmenter](../Classes/ImageSegmenter.html).\n- `\n ``\n ``\n `\n\n ### [confidenceMasks](#/c:objc(cs)MPPImageSegmenterResult(py)confidenceMasks)\n\n `\n ` \n An optional array of [Mask](../Classes/Mask.html) objects. Each [Mask](../Classes/Mask.html) in the array holds a 32 bit float array of size\n `image width` \\* `image height` which represents the confidence mask for each category. Each\n element of the float array represents the confidence with which the model predicted that the\n corresponding pixel belongs to the category that the mask represents, usually in the range \\[0,1\\]. \n\n #### Declaration\n\n Swift \n\n var confidenceMasks: [../Classes/Mask.html]? { get }\n\n- `\n ``\n ``\n `\n\n ### [categoryMask](#/c:objc(cs)MPPImageSegmenterResult(py)categoryMask)\n\n `\n ` \n An optional [Mask](../Classes/Mask.html) that holds a`UInt8` array of size `image width` \\* `image height`. Each element\n of this array represents the class to which the pixel in the original image was predicted to\n belong to. \n\n #### Declaration\n\n Swift \n\n var categoryMask: ../Classes/Mask.html? { get }\n\n- `\n ``\n ``\n `\n\n ### [qualityScores](#/c:objc(cs)MPPImageSegmenterResult(py)qualityScores)\n\n `\n ` \n The quality scores of the result masks, in the range of \\[0, 1\\]. Defaults to `1` if the model\n doesn't output quality scores. Each element corresponds to the score of the category in the model\n outputs. \n\n #### Declaration\n\n Swift \n\n var qualityScores: [NSNumber]? { get }\n\n- `\n ``\n ``\n `\n\n ### [init(confidenceMasks:categoryMask:qualityScores:timestampInMilliseconds:)](#/c:objc(cs)MPPImageSegmenterResult(im)initWithConfidenceMasks:categoryMask:qualityScores:timestampInMilliseconds:)\n\n `\n ` \n Initializes a new `ImageSegmenterResult` with the given array of confidence masks, category mask,\n quality scores and timestamp (in milliseconds). \n\n #### Declaration\n\n Swift \n\n init(confidenceMasks: [../Classes/Mask.html]?, categoryMask: ../Classes/Mask.html?, qualityScores: [NSNumber]?, timestampInMilliseconds: Int)\n\n #### Parameters\n\n |---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*confidenceMasks*` ` | An optional array of [Mask](../Classes/Mask.html) objects. Each [Mask](../Classes/Mask.html) in the array must be of type `float32`. |\n | ` `*categoryMask*` ` | An optional [Mask](../Classes/Mask.html) object of type `uInt8`. |\n | ` `*qualityScores*` ` | The quality scores of the result masks of type NSArray \\*. Each `NSNumber` in the array holds a `float`. |\n | ` `*timestampInMilliseconds*` ` | The timestamp (in milliseconds) for this result. |\n\n #### Return Value\n\n An instance of `ImageSegmenterResult` initialized with the given array of confidence\n masks, category mask, quality scores and timestamp (in milliseconds)."]]