Spaces:
Runtime error
Runtime error
Tobias Cornille
commited on
Commit
•
edfcc3f
1
Parent(s):
9d95507
Fix device
Browse files
app.py
CHANGED
@@ -119,7 +119,7 @@ def sam_masks_from_dino_boxes(predictor, image_array, boxes):
|
|
119 |
boxes_xyxy = box_ops.box_cxcywh_to_xyxy(boxes) * torch.Tensor([W, H, W, H])
|
120 |
transformed_boxes = predictor.transform.apply_boxes_torch(
|
121 |
boxes_xyxy, image_array.shape[:2]
|
122 |
-
)
|
123 |
thing_masks, _, _ = predictor.predict_torch(
|
124 |
point_coords=None,
|
125 |
point_labels=None,
|
|
|
119 |
boxes_xyxy = box_ops.box_cxcywh_to_xyxy(boxes) * torch.Tensor([W, H, W, H])
|
120 |
transformed_boxes = predictor.transform.apply_boxes_torch(
|
121 |
boxes_xyxy, image_array.shape[:2]
|
122 |
+
).to(device)
|
123 |
thing_masks, _, _ = predictor.predict_torch(
|
124 |
point_coords=None,
|
125 |
point_labels=None,
|