facebookresearch / facebookresearch/sam2
SAM2 for Edge Detection
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to employ SAM2 for edge detection. I use SAM2AutomaticMaskGenerator with all its default parameters to generate the masks and then on each mask returned, I run OpenCV's findContours to get the edges.
I am getting only the outer contours, i.e., the contours of maximal masks. What can I do to get more edges, i.e., get more fine grained masks as well?
I see that SAM2AutomaticMaskGenerator's parameter "multimask_output" is set to True by default and I haven't changed it. With that setting, I was expecting that smaller masks would be returned as well in addition to the enclosing outer masks. But, I am not getting the smaller masks.
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.