facebookresearch / segment-anything-2

The repository provides code for running inference with the Meta Segment Anything Model 2 (SAM 2), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Apache License 2.0
10.71k stars 862 forks source link

How to get the same result as the demo version running locally? #270

Open junioraguilar opened 2 weeks ago

junioraguilar commented 2 weeks ago

I'm using the hiera large model and I don't have the same results as the demo model. The result is much worse running locally. How can I configure the sam2_hiera_l.yaml to have the same result?

heyoeyo commented 2 weeks ago

There's some (limited) evidence that the web version uses a different model (see #252), so it may not be possible to adjust the configs to match it. However, if you haven't already tried it, the base+ model tends to favor 'larger' segmentations and might work better depending on your use case.