Spaces:
Runtime error
Runtime error
Add exception for image shape
Browse files
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)
|