Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Change the condition in mask_to_segm() to eliminate invalid bboxes #860

Merged
merged 6 commits into from
May 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chainercv/links/model/fpn/mask_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def mask_to_segm(mask, bbox, segm_size, index=None):
x_min = max(bb[1], 0)
y_max = max(min(bb[2], H), 0)
x_max = max(min(bb[3], W), 0)
if y_max - y_min == 0 or x_max - x_min == 0:
if y_max <= y_min or x_max <= x_min:
segm.append(np.zeros((segm_size, segm_size), dtype=np.float32))
continue

Expand Down