Acly / krita-ai-tools

Krita plugin which adds selection tools to mask objects with a single click, or by drawing a bounding box.
GNU General Public License v3.0
373 stars 17 forks source link

Segment Anything 2 #23

Open Acly opened 1 month ago

Acly commented 1 month ago

https://github.com/facebookresearch/segment-anything-2

So for precise masks some kind of follow up would still be needed.

No ONNX model out yet.

Rubenacp commented 3 weeks ago

Would be great

Acly commented 1 week ago

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 1 week ago

Thank you, I 'll try it