curt-park commited on
Commit
ce58c9d
1 Parent(s): 6ecbb25

Add exception for image shape

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -98,6 +98,7 @@ def filter_masks(
98
  if (
99
  mask["predicted_iou"] < predicted_iou_threshold
100
  or mask["stability_score"] < stability_score_threshold
 
101
  ):
102
  continue
103
  filtered_masks.append(mask)
 
98
  if (
99
  mask["predicted_iou"] < predicted_iou_threshold
100
  or mask["stability_score"] < stability_score_threshold
101
+ or image.shape[:2] != mask["segmentation"].shape[:2]
102
  ):
103
  continue
104
  filtered_masks.append(mask)