vis4d.data.transforms.mask¶
Segmentation/Instance Mask Transform.
Classes
|
Merge all instance masks into a single segmentation map. |
|
Remap classes using a mapping list. |
- class ConvertInstanceMaskToSegMask(*, in_keys=('boxes2d_classes', 'instance_masks'), out_keys=['seg_masks'], sensors=None, same_on_batch=True, **kwargs)[source]¶
Merge all instance masks into a single segmentation map.
- __call__(classes_list, masks_list)[source]¶
Execute conversion.
- Parameters:
classes_list (list[NDArrayI64]) – List of Array of class ids, shape [N,].
masks_list (NDArrayU8) – List of array of instance masks, shape [N, H, W].
- Returns:
List of Segmentation mask, shape [H, W].
- Return type:
list[NDArrayU8]