Spaces:
Sleeping
Sleeping
Update inference_seg.py
Browse files- inference_seg.py +1 -1
inference_seg.py
CHANGED
|
@@ -25,7 +25,7 @@ def load_model(use_box=False):
|
|
| 25 |
@torch.no_grad()
|
| 26 |
def run(model, img_path, box=None, device="cpu"):
|
| 27 |
output = model(img_path, box=box)
|
| 28 |
-
mask = output
|
| 29 |
mask = (mask > 0).astype(np.uint8)
|
| 30 |
return mask
|
| 31 |
# import os
|
|
|
|
| 25 |
@torch.no_grad()
|
| 26 |
def run(model, img_path, box=None, device="cpu"):
|
| 27 |
output = model(img_path, box=box)
|
| 28 |
+
mask = output
|
| 29 |
mask = (mask > 0).astype(np.uint8)
|
| 30 |
return mask
|
| 31 |
# import os
|