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

Add ability to erase and modify shapes #138

Merged
merged 13 commits into from
Oct 6, 2023
Merged

Add ability to erase and modify shapes #138

merged 13 commits into from
Oct 6, 2023

Conversation

cleaaum
Copy link
Collaborator

@cleaaum cleaaum commented Oct 5, 2023

This PR adds 2 features:

  1. the ability to erase a shape
  2. the ability to retain a modified shape.

@cleaaum cleaaum marked this pull request as ready for review October 5, 2023 18:13
@cleaaum cleaaum requested a review from hannahker October 5, 2023 18:13
@cleaaum cleaaum changed the title Eraser mode (Clea) Add ability to erase and modify shapes Oct 5, 2023
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Staging application has been deployed and is available at: https://dash5-services.plotly.host/ml-exchange-staging
Production app name: ml-exchange
Current branch name: eraser-mode-clea
Commit: 05910b8

@hannahker
Copy link
Collaborator

hannahker commented Oct 5, 2023

Adding some notes here as I'm testing this out:

  • [EDIT: This actually seems to happen in other cases where I try to export the annotations after deleting some of them, but I can't totally pinpoint what causes it.] Need to handle the case where someone deletes all the annotations via the keybind then tries to export the annotations. This is currently throwing the following error:
2023-10-05T18:59:25.991Z: 

   File "/workspace/callbacks/control_bar.py", line 688, in export_annotation

2023-10-05T18:59:25.991Z: 

     annotations.create_annotation_mask(sparse=EXPORT_AS_SPARSE)

2023-10-05T18:59:25.991Z: 

   File "/workspace/utils/annotations.py", line 86, in create_annotation_mask

2023-10-05T18:59:25.991Z: 

     image_height = slice_data[0]["image_shape"][0]

2023-10-05T18:59:25.991Z: 

 IndexError: list index out of range
  • There seems to be a bug introduced with the "Annotated slices" dropdown. In the screenshot below, I annotated slice 1 and slice 238, but the dropdown has entries for other slices which don't have anything on them.
Screenshot 2023-10-05 at 12 04 57 PM

Copy link
Collaborator

@hannahker hannahker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fixes! This works great on my testing. Can you just add the del keybind to the info popup in the bottom right? Then should be good to merge.

@cleaaum cleaaum merged commit 6f3afbe into main Oct 6, 2023
4 checks passed
@cleaaum cleaaum deleted the eraser-mode-clea branch October 6, 2023 17:33
@hannahker hannahker mentioned this pull request Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants