Skip to content

Commit

Permalink
🐛 DWPose face keypoint num fix (#1917)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Aug 14, 2023
1 parent 4746581 commit 0cfc88b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions annotator/openpose/wholebody.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ def total_score(keypoints: Optional[List[Optional[Keypoint]]]) -> float:
right_hand = format_keypoint_part(instance[113:134])
face = format_keypoint_part(instance[24:92])

# Openpose face consists of 70 points in total, while DWPose only
# provides 68 points. Padding the last 2 points.
if face is not None:
# left eye
face.append(body_keypoints[14])
# right eye
face.append(body_keypoints[15])

body = BodyResult(
body_keypoints, total_score(body_keypoints), len(body_keypoints)
)
Expand Down

0 comments on commit 0cfc88b

Please sign in to comment.