Skip to content

Commit 0cd2194

Browse files
zsdonghaoJonathan DEKHTIAR
authored andcommitted
fix-bug (#852)
* fix-bug * Update prepro.py
1 parent b73b9da commit 0cd2194

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tensorlayer/prepro.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3500,7 +3500,8 @@ def pose_crop(image, annos, mask, x, y, w, h): # TODO : speed up with affine tr
35003500
adjust_joint.append((-1000, -1000))
35013501
continue
35023502
new_x, new_y = point[0] - x, point[1] - y
3503-
if new_x > 367 or new_y > 367:
3503+
# should not crop outside the image
3504+
if new_x > w - 1 or new_y > h - 1:
35043505
adjust_joint.append((-1000, -1000))
35053506
continue
35063507
adjust_joint.append((new_x, new_y))

0 commit comments

Comments
 (0)