voxel51 / fiftyone

The open-source tool for building high-quality datasets and computer vision models
https://fiftyone.ai
Apache License 2.0
8.66k stars 548 forks source link

[FR] Allow `mask_path` in `Detection` labels #4486

Open Laurent2916 opened 3 months ago

Laurent2916 commented 3 months ago

Proposal Summary

Currently Detection only accepts mask fields, which are serialized numpy arrays saved to the mongo database. It would instead be useful to be able to instruct fiftyone to use masks saved on disk, with a field mask_path, just like how Segmentation does: https://github.com/voxel51/fiftyone/blob/39201f4c84ddf4d1b08a306b897d16755f119c32/fiftyone/core/labels.py#L1006-L1021

Motivation

This would make it possible to offload some disk usage from the mongo database to somewhere else.

What areas of FiftyOne does this feature affect?

Details

I'm not quite familiar with the codebase yet, though from looking at Segmentation it doesn't look that hard. I would appreciate a maintainer's opinion on the feasibility of this feature.

Willingness to contribute