Skip to content

Commit 4126ce0

Browse files
authored
fix handpose bug (#154)
1 parent ea593dd commit 4126ce0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/handpose_estimation_mediapipe/mp_handpose.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def _cropAndPadFromPalm(self, image, palm_bbox, for_rotation = False):
5454
center_palm_bbox - new_half_size,
5555
center_palm_bbox + new_half_size])
5656
palm_bbox = palm_bbox.astype(np.int32)
57-
palm_bbox[:][0] = np.clip(palm_bbox[:][0], 0, image.shape[0])
58-
palm_bbox[:][1] = np.clip(palm_bbox[:][1], 0, image.shape[1])
57+
palm_bbox[:, 0] = np.clip(palm_bbox[:, 0], 0, image.shape[0])
58+
palm_bbox[:, 1] = np.clip(palm_bbox[:, 1], 0, image.shape[1])
5959
# crop to the size of interest
6060
image = image[palm_bbox[0][1]:palm_bbox[1][1], palm_bbox[0][0]:palm_bbox[1][0], :]
6161
# pad to ensure conner pixels won't be cropped

0 commit comments

Comments
 (0)