-
Notifications
You must be signed in to change notification settings - Fork 54
/
armatures.py
84 lines (70 loc) · 1.92 KB
/
armatures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# it must be assured that parent joint appears before child joint
class MANOArmature:
# number of movable joints
n_joints = 16
# indices of extended keypoints
keypoints_ext = [333, 444, 672, 555, 744]
n_keypoints = n_joints + len(keypoints_ext)
labels = [
'W', #0
'I0', 'I1', 'I2', #3
'M0', 'M1', 'M2', #6
'L0', 'L1', 'L2', #9
'R0', 'R1', 'R2', #12
'T0', 'T1', 'T2', #15
# extended
'I3', 'M3', 'L3', 'R3', 'T3' #20
]
class SMPLArmature:
n_joints = 24
keypoints_ext = [2446, 5907, 3216, 6618, 411]
n_keypoints = n_joints + len(keypoints_ext)
labels = [
'pelvis',
'left leg root', 'right leg root',
'lowerback',
'left knee', 'right knee',
'upperback',
'left ankle', 'right ankle',
'thorax',
'left toes', 'right toes',
'lowerneck',
'left clavicle', 'right clavicle',
'upperneck',
'left armroot', 'right armroot',
'left elbow', 'right elbow',
'left wrist', 'right wrist',
'left hand', 'right hand'
# extended
'left finger tip', 'right finger tip', 'left toe tip', 'right toe tip',
'head_top'
]
class SMPLHArmature:
n_joints = 52
keypoints_ext = [
2746, 2320, 2446, 2557, 2674,
6191, 5781, 5907, 6018, 6135,
3216, 6618, 411
]
n_keypoints = n_joints + len(keypoints_ext)
labels = [
'pelvis',
'left leg root', 'right leg root',
'lowerback',
'left knee', 'right knee',
'upperback',
'left ankle', 'right ankle',
'thorax',
'left toes', 'right toes',
'lowerneck',
'left clavicle', 'right clavicle',
'upperneck',
'left armroot', 'right armroot',
'left elbow', 'right elbow',
'left wrist', 'right wrist',
'left hand', 'right hand'
# extended
'left thumb', 'left index', 'left middle', 'left ring', 'left little',
'right thumb', 'right index', 'right middle', 'right ring', 'right little',
'left toe tip', 'right toe tip', 'heat-top'
]