Skip to content

Commit

Permalink
add interhand mepping
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei-Chen-hub committed Oct 17, 2024
1 parent bdb973d commit 3f54359
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmhuman3d/core/conventions/keypoints_mapping/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
humanart,
hybrik,
instavariety,
interhand,
lsp,
mano,
mediapipe,
Expand Down Expand Up @@ -80,6 +81,7 @@
'mano_hands_reorder': mano.MANO_HANDS_REORDER_KEYPOINTS,
'mediapipe_whole_body': mediapipe.MP_WHOLE_BODY_KEYPOINTS,
'mediapipe_body': mediapipe.MP_BODY_KEYPOINTS,
'interhand': interhand.INTERHAND_KEYPOINTS,
}

__KEYPOINTS_MAPPING_CACHE__ = defaultdict(dict)
Expand Down
88 changes: 88 additions & 0 deletions mmhuman3d/core/conventions/keypoints_mapping/interhand.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
INTERHAND_KEYPOINTS = [
'right_index_3',
'right_index_2',
'right_index_1',
'right_index',
'right_thumb_3', # 指尖
'right_thumb_2',
'right_thumb_1',
'right_thumb',
'right_middle_3',
'right_middle_2',
'right_middle_1',
'right_middle',
'right_ring_3',
'right_ring_2',
'right_ring_1',
'right_ring',
'right_pinky_3',
'right_pinky_2',
'right_pinky_1',
'right_pinky',
'right_wrist',
'left_index_3',
'left_index_2',
'left_index_1',
'left_index',
'left_thumb_3',
'left_thumb_2',
'left_thumb_1',
'left_thumb',
'left_middle_3',
'left_middle_2',
'left_middle_1',
'left_middle',
'left_ring_3',
'left_ring_2',
'left_ring_1',
'left_ring',
'left_pinky_3',
'left_pinky_2',
'left_pinky_1',
'left_pinky',
'left_wrist'
]


# r_thumb4 0 1
# r_thumb3 1 2
# r_thumb2 2 3
# r_thumb1 3 20
# r_index4 4 5
# r_index3 5 6
# r_index2 6 7
# r_index1 7 20
# r_middle4 8 9
# r_middle3 9 10
# r_middle2 10 11
# r_middle1 11 20
# r_ring4 12 13
# r_ring3 13 14
# r_ring2 14 15
# r_ring1 15 20
# r_pinky4 16 17
# r_pinky3 17 18
# r_pinky2 18 19
# r_pinky1 19 20
# r_wrist 20 -1
# l_thumb4 21 22
# l_thumb3 22 23
# l_thumb2 23 24
# l_thumb1 24 41
# l_index4 25 26
# l_index3 26 27
# l_index2 27 28
# l_index1 28 41
# l_middle4 29 30
# l_middle3 30 31
# l_middle2 31 32
# l_middle1 32 41
# l_ring4 33 34
# l_ring3 34 35
# l_ring2 35 36
# l_ring1 36 41
# l_pinky4 37 38
# l_pinky3 38 39
# l_pinky2 39 40
# l_pinky1 40 41
# l_wrist 41 -1

0 comments on commit 3f54359

Please sign in to comment.