Running on CPU or GPU?

InsectSAM: Insect Segmentation and Monitoring

40
•
140
Apache-2.0
Image Segmentation
PyTorch
English

Opened about 2 months ago

by @drift-5638

5
@drift-56382 months ago

Anyone running this on CPU only? How is the experience?

@drift-56382 months ago

The model card says a CUDA GPU is optional. I only have a laptop without a dedicated GPU. Is it usable for a handful of images, or is it painful?

comment reaction4
@middle-32372 months ago

It works on CPU, just slower. Since the pipeline runs two models (GroundingDINO then SAM), each image takes noticeably longer than a single-model task. Fine for a few images, not great for hundreds.

comment reaction4
@brian-ai-68992 months ago

That's what I expected. Does anything help besides getting a GPU?

comment reaction4
@carter-22112 months ago

Resizing very large photos before inference helps in my experience. Also, if you’re processing many images, note that the sample code loads the models inside the function, so every call reloads them. Restructuring it to load once would save a lot of time.

comment reaction2
comment reaction1
@brian-ai-68992 months ago

+1 on loading once. I wrapped it in a small loop script and the difference was big.

comment reaction3

0/10000

Sign up or Log in to comment