Segment Anything 2
Acly opened this issue · 3 comments
Acly commented
https://github.com/facebookresearch/segment-anything-2
- It's fast and can be quite small.
- Detection should be improved
- Similar to first model it runs on fixed resolution (512 by default)
- Binary masks
So for precise masks some kind of follow up would still be needed.
No ONNX model out yet.
Rubenacp commented
Would be great
Acly commented
Did some tests with exported ONNX models. They're working fine, but performance wise it would be a big regression.
Model | Size | Inference time |
---|---|---|
MobileSAM | 43 MB | 450 ms |
SAM2 Small | 179 MB | 1240 ms |
SAM2 Tiny | 151 MB | 1000 ms |
This is on CPU, which is most common scenario. The masks are mostly the same regarding pixel quality. The detection accuracy is expected to better for SAM2.
A distilled/quantized version of SAM2 model would be interesting...
Rubenacp commented
Thank you, I 'll try it