|
import numpy as np |
|
|
|
|
|
kit_kinematic_chain = [[0, 11, 12, 13, 14, 15], [0, 16, 17, 18, 19, 20], [0, 1, 2, 3, 4], [3, 5, 6, 7], [3, 8, 9, 10]] |
|
|
|
kit_raw_offsets = np.array( |
|
[ |
|
[0, 0, 0], |
|
[0, 1, 0], |
|
[0, 1, 0], |
|
[0, 1, 0], |
|
[0, 1, 0], |
|
[1, 0, 0], |
|
[0, -1, 0], |
|
[0, -1, 0], |
|
[-1, 0, 0], |
|
[0, -1, 0], |
|
[0, -1, 0], |
|
[1, 0, 0], |
|
[0, -1, 0], |
|
[0, -1, 0], |
|
[0, 0, 1], |
|
[0, 0, 1], |
|
[-1, 0, 0], |
|
[0, -1, 0], |
|
[0, -1, 0], |
|
[0, 0, 1], |
|
[0, 0, 1] |
|
] |
|
) |
|
|
|
t2m_raw_offsets = np.array([[0,0,0], |
|
[1,0,0], |
|
[-1,0,0], |
|
[0,1,0], |
|
[0,-1,0], |
|
[0,-1,0], |
|
[0,1,0], |
|
[0,-1,0], |
|
[0,-1,0], |
|
[0,1,0], |
|
[0,0,1], |
|
[0,0,1], |
|
[0,1,0], |
|
[1,0,0], |
|
[-1,0,0], |
|
[0,0,1], |
|
[0,-1,0], |
|
[0,-1,0], |
|
[0,-1,0], |
|
[0,-1,0], |
|
[0,-1,0], |
|
[0,-1,0]]) |
|
|
|
t2m_kinematic_chain = [[0, 2, 5, 8, 11], [0, 1, 4, 7, 10], [0, 3, 6, 9, 12, 15], [9, 14, 17, 19, 21], [9, 13, 16, 18, 20]] |
|
t2m_left_hand_chain = [[20, 22, 23, 24], [20, 34, 35, 36], [20, 25, 26, 27], [20, 31, 32, 33], [20, 28, 29, 30]] |
|
t2m_right_hand_chain = [[21, 43, 44, 45], [21, 46, 47, 48], [21, 40, 41, 42], [21, 37, 38, 39], [21, 49, 50, 51]] |
|
|
|
kit_kinematic_tree = [ |
|
[0, 1, 2, 3, 4], |
|
[3, 5, 6, 7], |
|
[3, 8, 9, 10], |
|
[0, 11, 12, 13, 14, 15], |
|
[0, 16, 17, 18, 19, 20], |
|
] |
|
|
|
humanml3d_kinematic_tree = [ |
|
[0, 3, 6, 9, 12, 15], |
|
[9, 14, 17, 19, 21], |
|
[9, 13, 16, 18, 20], |
|
[0, 2, 5, 8, 11], |
|
[0, 1, 4, 7, 10], |
|
] |
|
|
|
|
|
kit_tgt_skel_id = '03950' |
|
|
|
t2m_tgt_skel_id = '000021' |
|
|
|
KIT_JOINT_NAMES = [ |
|
"pelvis", |
|
"spine_1", |
|
"spine_3", |
|
"neck", |
|
"head", |
|
"left_shoulder", |
|
"left_elbow", |
|
"left_wrist", |
|
"right_shoulder", |
|
"right_elbow", |
|
"right_wrist", |
|
"left_hip", |
|
"left_knee", |
|
"left_ankle", |
|
"left_heel", |
|
"left_foot", |
|
"right_hip", |
|
"right_knee", |
|
"right_ankle", |
|
"right_heel", |
|
"right_foot", |
|
] |
|
|
|
HumanML3D_JOINT_NAMES = [ |
|
"pelvis", |
|
"left_hip", |
|
"right_hip", |
|
"spine_1", |
|
"left_knee", |
|
"right_knee", |
|
"spine_2", |
|
"left_ankle", |
|
"right_ankle", |
|
"spine_3", |
|
"left_foot", |
|
"right_foot", |
|
"neck", |
|
"left_clavicle", |
|
"right_clavicle", |
|
"head", |
|
"left_shoulder", |
|
"right_shoulder", |
|
"left_elbow", |
|
"right_elbow", |
|
"left_wrist", |
|
"right_wrist", |
|
] |
|
|
|
HumanML3D2KIT = { |
|
0:0, |
|
1:16, |
|
2:11, |
|
3:1, |
|
4:17, |
|
5:12, |
|
6:1, |
|
7:18, |
|
8:13, |
|
9:2, |
|
10:20, |
|
11:15, |
|
12:3, |
|
13:8, |
|
14:5, |
|
15:4, |
|
16:8, |
|
17:5, |
|
18:9, |
|
19:6, |
|
20:10, |
|
21:7, |
|
} |