You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
jaquilio
changed the title
Edge Detection
SAM2 for Edge Detection
Dec 9, 2024
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.
The text was updated successfully, but these errors were encountered: