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

[BUG] Unique filenames are not generated when drawing labels #2000

Closed
ehofesmann opened this issue Aug 12, 2022 · 0 comments · Fixed by #2060
Closed

[BUG] Unique filenames are not generated when drawing labels #2000

ehofesmann opened this issue Aug 12, 2022 · 0 comments · Fixed by #2060
Labels
bug Bug fixes

Comments

@ehofesmann
Copy link
Member

When drawing labels on samples and saving them to disk, it is expected that unique filenames will be created if multiple samples in the view have the same filename/path. However, currently these unique filenames aren't generated and only one copy of each file will be written.

from fiftyone import ViewField as F
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart").clone()
sample = dataset.first()
dataset.add_sample(sample)

dup_view = dataset.match(F("filepath") == sample.filepath)
dup_view.draw_labels("/tmp/draw-labels", label_fields=["ground_truth"])

Resulting directory:

/tmp/draw-labels
    00880.jpg

Expected result:

/tmp/draw-labels
    00880.jpg
    00880-2.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant