Skip to content

Commit

Permalink
Add iou_predictions and low_res_masks to return
Browse files Browse the repository at this point in the history
statement in SahiAutoSegmentation class
  • Loading branch information
kadirnar committed Nov 4, 2023
1 parent 8c28fab commit 2dfc287
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metaseg/sahi_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def image_predict(
if type(input_box[0]) == list:
input_boxes, new_boxes = multi_boxes(input_box, predictor, read_image)

masks, _, _ = predictor.predict_torch(
masks, iou_predictions, low_res_masks = predictor.predict_torch(
point_coords=None,
point_labels=None,
boxes=new_boxes,
Expand All @@ -104,7 +104,7 @@ def image_predict(
elif type(input_box[0]) == int:
input_boxes = np.array(input_box)[None, :]

masks, _, _ = predictor.predict(
masks, iou_predictions, low_res_masks = predictor.predict(
point_coords=input_point,
point_labels=input_label,
box=input_boxes,
Expand All @@ -126,4 +126,4 @@ def image_predict(
if show:
plt.show()

return masks
return masks, iou_predictions, low_res_masks

0 comments on commit 2dfc287

Please sign in to comment.