plice13 commited on
Commit
104f292
·
verified ·
1 Parent(s): 1a4dce5

Upload predict_pose.py

Browse files
Files changed (1) hide show
  1. predict_pose.py +2 -1
predict_pose.py CHANGED
@@ -267,7 +267,8 @@ def process_hands(mp_hand_keypoints, mp_handedness, pose_keypoints, image_size:
267
 
268
  # Fast assignment if only a single hand is detected
269
  if len(mp_hand_keypoints) == 1:
270
- side = mp_handedness[0]["category_name"].lower()
 
271
  out[side] = hand_keypoints[0]
272
  return out
273
 
 
267
 
268
  # Fast assignment if only a single hand is detected
269
  if len(mp_hand_keypoints) == 1:
270
+ # mp_handedness[0] is a list of Category objects for the detected hand
271
+ side = mp_handedness[0][0].category_name.lower()
272
  out[side] = hand_keypoints[0]
273
  return out
274