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] Add configuration to remove the "closed" and "filled" polygon attributes from the app filter bar #5455

Open
3 of 6 tasks
ranshadmi opened this issue Feb 1, 2025 · 3 comments
Labels
feature Work on a feature request

Comments

@ranshadmi
Copy link

Proposal Summary

The "closed" and "filled" attributes are automatically generated and displayed and they take up precious screen space. I personally don't have a use for them. I would like to be able to remove them altogether from the app display (e.g. using global configuration) or programmatically when creating a dataset.

Motivation

These attributes take up precious screen space and add clutter. Especially when they appear twice - once for the ground-truth and once for the predictions.

What areas of FiftyOne does this feature affect?

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

Details

I would like to be able to remove these attributes altogether from the app display (e.g. using global configuration) or programmatically when creating a dataset. Perhaps they should be hidden by default when all the polygons in the dataset have the same value (or None)?

Willingness to contribute

The FiftyOne Community welcomes contributions! Would you or another member of your organization be willing to contribute an implementation of this feature?

  • 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
@ranshadmi ranshadmi added the feature Work on a feature request label Feb 1, 2025
@benjaminpkane
Copy link
Contributor

benjaminpkane commented Feb 3, 2025

Hi @ranshadmi. I can recommend the below

import fiftyone as fo

def exclude_me(polylines_field):
    return [f"{polylines_field}.polylines.closed",  f"{polylines_field}.polylines.filled"]


excluded = []
for f in dataset.get_field_schema(embedded_doc_type=fo.Polylines):
    excluded += exclude_me(f)
    
dataset = fo.load_dataset("my-dataset")
view = dataset.exclude_fields(excluded)
dataset.save_view("excluded", view)

Then you can open the dataset view directly with http://localhost:5151/datasets/my-dataset?view=excluded

@ranshadmi
Copy link
Author

I've tried that. I still get a ValueError: Cannot exclude default fields {'ground_truth_polygons.polylines.filled', 'ground_truth_polygons.polylines.closed'} when trying to create such a view.

@benjaminpkane
Copy link
Contributor

My mistake, yes they are default fields. We would need to add an optional default field category

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

No branches or pull requests

2 participants