Skip to content

Commit

Permalink
Merge pull request #3 from rballachay/patch-1
Browse files Browse the repository at this point in the history
should pass device in case of cpu
  • Loading branch information
luca-medeiros committed Apr 14, 2023
2 parents 5bfbfad + d0149b2 commit 83c6eaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lang_sam/lang_sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def predict_dino(self, image_pil, text_prompt, box_threshold, text_threshold):
image=image_trans,
caption=text_prompt,
box_threshold=box_threshold,
text_threshold=text_threshold)
text_threshold=text_threshold,
device=self.device)
W, H = image_pil.size
boxes = box_ops.box_cxcywh_to_xyxy(boxes) * torch.Tensor([W, H, W, H])

Expand Down

0 comments on commit 83c6eaf

Please sign in to comment.