MulticlassSegmentationMask class

Multiclass segmentation mask with per-class probabilities.

Inheritance

Constructors

MulticlassSegmentationMask({required Float32List data, required int width, required int height, required int originalWidth, required int originalHeight, List<double> padding = const [0.0, 0.0, 0.0, 0.0], required Float32List classData})
Creates a multiclass segmentation mask with validation.
factory
MulticlassSegmentationMask.internal({required Float32List internalData, required int width, required int height, required int originalWidth, required int originalHeight, required List<double> padding, required Float32List internalClassData})
Internal const constructor.
const

Properties

backgroundMask Float32List
Background probability mask.
no setter
bodySkinMask Float32List
Body skin probability mask.
no setter
clothesMask Float32List
Clothes probability mask.
no setter
data Float32List
Returns a defensive copy of the raw probability data (row-major).
no setterinherited
faceSkinMask Float32List
Face skin probability mask.
no setter
hairMask Float32List
Hair probability mask.
no setter
hashCode int
The hash code for this object.
no setterinherited
height int
Mask height in pixels.
finalinherited
internalClassData Float32List
Per-class probabilities after softmax, length = widthheight6.
final
internalData Float32List
Raw float32 mask data; access via data (defensive copy) or at.
finalinherited
originalHeight int
Original source image height.
finalinherited
originalWidth int
Original source image width.
finalinherited
otherMask Float32List
Other (accessories, etc.) probability mask.
no setter
padding List<double>
Padding [top, bottom, left, right] applied during letterboxing.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
Mask width in pixels.
finalinherited

Methods

at(int x, int y) double
Returns probability at (x, y) in mask coordinates. Out-of-bounds → 0.0.
inherited
classMask(int classIndex) Float32List
Returns a single-channel probability mask for the given class index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBinary({double threshold = 0.5}) Uint8List
Converts to binary mask (0 or 255) using threshold.
inherited
toMap() Map<String, dynamic>
Serialization for isolate transfer.
inherited
toRgba({int foreground = 0xFFFFFFFF, int background = 0x00000000, PixelFormat format = PixelFormat.rgba, double threshold = 0.5}) Uint8List
Converts to RGBA image with configurable colors.
inherited
toString() String
A string representation of this object.
override
toUint8() Uint8List
Converts to 8-bit grayscale mask (0-255).
inherited
upsample({int? targetWidth, int? targetHeight, int maxSize = 2048}) SegmentationMask
Upsamples mask to target dimensions using bilinear interpolation.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited