Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Allow mask_path in Detection labels #4486

Closed
2 of 6 tasks
Laurent2916 opened this issue Jun 12, 2024 · 1 comment · Fixed by #4693
Closed
2 of 6 tasks

[FR] Allow mask_path in Detection labels #4486

Laurent2916 opened this issue Jun 12, 2024 · 1 comment · Fixed by #4693
Labels
feature Work on a feature request

Comments

@Laurent2916
Copy link
Contributor

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:

class Segmentation(_HasID, _HasMedia, Label):
"""A semantic segmentation for an image.
Provide either the ``mask`` or ``mask_path`` argument to define the
segmentation.
Args:
mask (None): a numpy array with integer values encoding the semantic
labels
mask_path (None): the absolute path to the segmentation image on disk
"""
_MEDIA_FIELD = "mask_path"
mask = fof.ArrayField()
mask_path = fof.StringField()

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?

  • App: FiftyOne application
  • Core: Core fiftyone Python library
  • Server: FiftyOne server

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

  • Yes. I can contribute this feature independently
  • Yes. I would be willing to contribute this feature with guidance from the FiftyOne community
  • No. I cannot contribute this feature at this time
@Laurent2916 Laurent2916 added the feature Work on a feature request label Jun 12, 2024
@Laurent2916
Copy link
Contributor Author

Closed by #5120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work on a feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant