Merge remote-tracking branch 'origin/segmentation_nms' into segmentation_nms

This commit is contained in:
SkalskiP 2024-02-07 09:24:55 +01:00
commit b681274954
1 changed files with 2 additions and 2 deletions

View File

@ -214,8 +214,8 @@ def mask_non_max_suppression_2(
keep = np.ones(rows, dtype=bool)
for i in range(rows):
if keep[i]:
condition = (ious[i] > iou_threshold) & (categories == category)
keep[i + 1:] = np.where(condition[i + 1:], False, keep[i + 1:])
condition = (ious[i] > iou_threshold) & (category[i] == categories)
keep[i + 1 :] = np.where(condition[i + 1 :], False, keep[i + 1 :])
return keep