We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4ecc68 commit dec4c12Copy full SHA for dec4c12
segment_anything/predictor.py
@@ -160,10 +160,10 @@ def predict(
160
return_logits=return_logits,
161
)
162
163
- masks = masks[0].detach().cpu().numpy()
164
- iou_predictions = iou_predictions[0].detach().cpu().numpy()
165
- low_res_masks = low_res_masks[0].detach().cpu().numpy()
166
- return masks, iou_predictions, low_res_masks
+ masks_np = masks[0].detach().cpu().numpy()
+ iou_predictions_np = iou_predictions[0].detach().cpu().numpy()
+ low_res_masks_np = low_res_masks[0].detach().cpu().numpy()
+ return masks_np, iou_predictions_np, low_res_masks_np
167
168
@torch.no_grad()
169
def predict_torch(
0 commit comments