Skip to content

Commit 4068429

Browse files
committed
fix: Coordinate 'right' is less than 'left'
Signed-off-by: storyicon <[email protected]>
1 parent e73a7e4 commit 4068429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/masking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def get_crop_region(mask, pad=0):
99
if box:
1010
x1, y1, x2, y2 = box
1111
else: # when no box is found
12-
x1, y1 = mask_img.size
13-
x2 = y2 = 0
12+
x1 = y1 = 0
13+
x2, y2 = mask_img.size
1414
return max(x1 - pad, 0), max(y1 - pad, 0), min(x2 + pad, mask_img.size[0]), min(y2 + pad, mask_img.size[1])
1515

1616

0 commit comments

Comments
 (0)