InstanceMask<T>
Models & Types · AiDotNet.ComputerVision.Segmentation.InstanceSegmentation
Represents a single instance with bounding box and segmentation mask.
Constructors
| Constructor |
Summary |
InstanceMask(BoundingBox<T> box, Tensor<T> mask, int classId, T confidence) |
Creates a new instance mask. |
Properties
| Property |
Summary |
BoundingBox<T> Box { get; set; } |
Bounding box around the instance. |
T Confidence { get; set; } |
Detection confidence score. |
T MaskConfidence { get; set; } |
Mask confidence score (if separate from detection confidence). |
Tensor<T> Mask { get; set; } |
Binary segmentation mask for this instance [height, width]. |
int ClassId { get; set; } |
Class ID of the detected instance. |
string ClassName { get; set; } |
Class name (if available). |
Methods
| Method |
Summary |
double ComputeMaskIoU(InstanceMask<T> other, INumericOperations<T> numOps) |
Computes IoU with another instance mask. |
int GetMaskArea(INumericOperations<T> numOps) |
Gets the mask area (number of positive pixels). |