facebookresearch / facebookresearch/sam2

How to implement an "undo"?

Open
#538 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
19.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I would like to be able to undo adding points to an object, and am wondering what best practices I should follow?

I currently keep track of my points in a list, and I can just pop the last point off of the list, call clear_all_prompts_in_frame(), and then segment the frame again without that point. However, this doesn't work after running propagation when I am trying to make corrections to the propagated masks. What should I do in those cases?

Contributor guide

Open the contributing guide

Research direction

Start with the documented point-list flow and the clear_all_prompts_in_frame() entry point mentioned in the issue, then compare it with the propagation and correction flow. Determine how undo should behave after propagated masks and define completion around restoring the prior segmentation state without losing later corrections.

Written by the indexing model from the issue text.

Assessment

Domain
computer-vision
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.