autodistill / autodistill-grounded-sam

GroundedSAM Base Model plugin for Autodistill
https://docs.autodistill.com
Apache License 2.0
44 stars 8 forks source link

Is GroundedSAM setting device? #5

Closed EduardoPach closed 12 months ago

EduardoPach commented 12 months ago

The GroundedSAM class doesn't seem to use the DEVICE, which makes me wonder if it gets GPU acceleration.

see here https://github.com/autodistill/autodistill-grounded-sam/blob/main/autodistill_grounded_sam/grounded_sam.py#L26

capjamesg commented 12 months ago

Hello! We also define DEVICE in the file in which we load the models and pass it as an argument when loading the models.

See https://github.com/autodistill/autodistill-grounded-sam/blob/main/autodistill_grounded_sam/helpers.py#L72 https://github.com/autodistill/autodistill-grounded-sam/blob/main/autodistill_grounded_sam/helpers.py#L108

EduardoPach commented 12 months ago

Hello! We also define DEVICE in the file in which we load the models and pass it as an argument when loading the models.

See https://github.com/autodistill/autodistill-grounded-sam/blob/main/autodistill_grounded_sam/helpers.py#L72

https://github.com/autodistill/autodistill-grounded-sam/blob/main/autodistill_grounded_sam/helpers.py#L108

Oh, my bad. I forgot to check the helpers 😅