paralleldomain.model.annotation.semantic_segmentation_2d¶
- class SemanticSegmentation2D(class_ids)¶
Represents a 2D Semantic Segmentation mask for a camera image.
- Parameters:
class_ids (
ndarray
) –SemanticSegmentation2D.class_ids
- class_ids¶
Matrix of shape (H x W x 1), where H is height and W is width of corresponding camera image. The third axis contains the class ID for each pixel as int.
- get_class_mask(class_id)¶
Returns a bool mask where class is present.
- get_classes_mask(class_ids)¶
Returns a bool mask where classes are present.
- property rgb_encoded: ndarray¶
Returns
SemanticSegmentation2D.class_ids
mask as RGB-encoded image matrix with shape (H x W x 3), with R (index: 0) being the lowest and B (index: 2) being the highest 8 bit.