facebookresearch / facebookresearch/sam2

Wrong box prompt of init_cond_frames if it is empty in training framework.

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

Description

Thanks for your great work!

Since SAM2 is an interactive project, you have included hints in the form of boxes or points in the training framework and and may provide multiple init prompt frames (num_init_cond_frames).
However, since the data augmentation only guarantees that the mask GT of the first frame is not empty, the rest of the GTs are not guaranteed.
If a frame other than the first has an empty GT but is selected to provide a box prompt, it will obtain [H, W, -1, -1] box with mask_to_box (and noised latter), resulting in an incorrect box prompt.
![image](https://github.com/user-attachments/assets/f2c5f2b1-df01-4fa9-9c2b-12a8355cd0b4)

This part may require additional checking operations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.