hello.fiftyone.coco_utils module¶
- hello.fiftyone.coco_utils.coco_segmentation_to_mask(segmentation, bbox, frame_size)[source]¶
Returns a COCO segmentation mask.(patch)
- Parameters:
segmentation – segmentation mask for the object.
bbox – a bounding box for the object in
[xmin, ymin, width, height]format.frame_size – the
(width, height)of the image.
- hello.fiftyone.coco_utils.get_mask_from_patch(mask, bbox, frame_size)[source]¶
Returns a COCO segmentation mask.(whole)
- Parameters:
mask – an boolean numpy array defining the object mask
bbox – a bounding box for the object in
[xmin, ymin, width, height]formatframe_size – the
(width, height)of the image
- hello.fiftyone.coco_utils.mask_to_coco_segmentation(mask, bbox, frame_size, mask_type='polygons', tolerance=1)[source]¶
Returns a RLE object.
- Parameters:
mask – an boolean numpy array defining the object mask
bbox – a bounding box for the object in
[xmin, ymin, width, height]formatframe_size – the
(width, height)of the image