voxel51 / fiftyone

Refine high-quality datasets and visual AI models
https://fiftyone.ai
Apache License 2.0
8.77k stars 552 forks source link

[FR] Add support for optionally loading segmentations in COCODetectionDataset format #566

Closed brimoor closed 3 years ago

brimoor commented 4 years ago

Some resources on the topic:

There are some questions here, like should the output be stored as Detections with instance masks, or should the output be stored as Polylines? Or both (leveraging a labels_dict return type)? Need to think about the label class contract of the importer/exporters...

One wrinkle is that single objects are stored as vertices, while crowds are stored as RLE'd dense masks. One would probably prefer all masks to be stored in one format or the other in FiftyOne, not mixed.

brimoor commented 3 years ago

As of https://github.com/voxel51/fiftyone/pull/612, COCODetectionDataset format now supports loading instance segmentations.

In fact, it provides parameters for controlling whether segmentations are loaded, omitted, or loaded as polylines rather than detections with dense segmentation masks.