Commit dec4c129 authored by Eric Mintun's avatar Eric Mintun
Browse files

Fix mypy thinking output of SamPredictor.predict is a tensor.

parent d4ecc68d
...@@ -160,10 +160,10 @@ class SamPredictor: ...@@ -160,10 +160,10 @@ class SamPredictor:
return_logits=return_logits, return_logits=return_logits,
) )
masks = masks[0].detach().cpu().numpy() masks_np = masks[0].detach().cpu().numpy()
iou_predictions = iou_predictions[0].detach().cpu().numpy() iou_predictions_np = iou_predictions[0].detach().cpu().numpy()
low_res_masks = low_res_masks[0].detach().cpu().numpy() low_res_masks_np = low_res_masks[0].detach().cpu().numpy()
return masks, iou_predictions, low_res_masks return masks_np, iou_predictions_np, low_res_masks_np
@torch.no_grad() @torch.no_grad()
def predict_torch( def predict_torch(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment