encode_mask
- cocohelper.utils.segmentation.encode_mask(mask, mode, **kwargs)[source]
Encodes a mask using the specified :param mask: a binary mask as a numpy array. :param mode: the mode to use for encoding the mask. :param **kwargs: extra parameters are ignored.
- Returns:
The encoded mask.
- Parameters:
mask (ndarray) –
mode (str) –
- Return type:
Any