vietanhdev / anylabeling

Effortless AI-assisted data labeling with AI support from YOLO, Segment Anything (SAM+SAM2), MobileSAM!!
https://anylabeling.nrl.ai
GNU General Public License v3.0
2.2k stars 236 forks source link

How to use SAM with GPU? #57

Closed yunfei920406 closed 1 year ago

yunfei920406 commented 1 year ago

I found when segment with SAM in anylabeling, the GPU is not used. How to address this issue?

kime541200 commented 1 year ago

I have same question.

myd510 commented 1 year ago

@yunfei920406 @kime541200 because onnxruntime takes precedence over onnxruntime-gpu, all you need to do is remove onnxruntime from requirements-dev.txt, execute pip install -r requirements-dev.txt and run the program or build it.

myd510 commented 1 year ago

@yunfei920406 @kime541200 Sorry, I forgot one thing, you have to make sure you have CUDA environment on your system.

kime541200 commented 1 year ago

@yunfei920406 @kime541200 Sorry, I forgot one thing, you have to make sure you have CUDA environment on your system.

Thank you so much for your help! It helped me a lot, and it was a great project!

vietanhdev commented 1 year ago

Documentation for GPU support: https://anylabeling.com/docs/gpu.