facebookresearch / facebookresearch/sam2

Patchy masks

Open
#316 2 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

Hi!

I'm using SAM2 to segments videos where typically there is only one person in the foreground. I'm quite often getting flawed masks where there are unsegmented patches like in the below image.

Does anyone with a deeper understanding of the algorithm and the implementation have any suggestions? I've tried using the `max_hole_size` parameter in `SAM2ImagePredictor`, but I run into the same issue as #243 . But even if it worked, it does not seem a great solution since there are cases where a small hole could be part of the actual background (depending on the person's pose)

Thanks,

![mask_test](https://github.com/user-attachments/assets/f7368b43-62df-4cd3-8b1f-12b5a6762d50)

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.