paralleldomain.model.annotation.instance_segmentation_2d¶
- class InstanceSegmentation2D(instance_ids)¶
Represents a 2D Instance Segmentation mask for a camera image.
- Parameters:
instance_ids (
ndarray
) –InstanceSegmentation2D.instance_ids
- instance_ids¶
Matrix identical in size to the image where the third axis contains the instance ID for each pixel as int.
- get_instance(instance_id)¶
Returns a bool mask where instance is present.
- Parameters:
instance_id (
int
) – ID of instance to be masked- Return type:
- Returns:
Mask of same shape as
instance_ids
and bool values. True where pixel matches instance, False where it doesn’t.
- get_instances(instance_ids)¶
Returns a bool mask where instances are present.