segmentation
Utilities* for converting segmentation annotations between different formats.
Classes
Functions
|
Converts annotations from COCO to binary masks. |
|
Converts a compressed RLE to a binary mask with the given output dtype. |
|
Computes a segmentation area from its polygon coordinates. |
|
Converts a segmentation to a binary mask. |
|
Converts a segmentation to the specified mode. |
|
Decodes a mask using the specified mode. :param code: the encoded mask. :param mode: the mode to use for decoding the mask. :param **kwargs: extra parameters such as: - height and width to indicate the shape of the output mask (if mode in [cRLE, polygon]). - value to indicate the value of the zero-valued pixels in the output mask (if mode=polygon). - dtype to indicate the type of the output mask (if mode in [RLE, cRLE, polygon]). |
|
Encodes a mask using the specified :param mask: a binary mask as a numpy array. |
|
Automatically detect the segmentation format: RLE, cRLE or polygon. |
|
Converts a binary mask to compressed RLE format. |
|
Converts segmentation mask to a list of polygons. |
|
Converts a binary mask to RLE encoding. |
|
Creates and returns a mask from polygon in COCO format. |
|
Converts an RLE to a binary mask with the given output dtype. |