forked from olincollege/just-dance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeypoint.py
44 lines (43 loc) · 843 Bytes
/
keypoint.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
"""
Dictionary that maps from joint names to keypoint indices.
"""
KEYPOINT_DICT = {
"nose": 0,
"left_eye": 1,
"right_eye": 2,
"left_ear": 3,
"right_ear": 4,
"left_shoulder": 5,
"right_shoulder": 6,
"left_elbow": 7,
"right_elbow": 8,
"left_wrist": 9,
"right_wrist": 10,
"left_hip": 11,
"right_hip": 12,
"left_knee": 13,
"right_knee": 14,
"left_ankle": 15,
"right_ankle": 16,
}
# Maps bones to a matplotlib color name.
KEYPOINT_EDGE_INDICES_TO_COLOR = {
(0, 1): "m",
(0, 2): "c",
(1, 3): "m",
(2, 4): "c",
(0, 5): "m",
(0, 6): "c",
(5, 7): "m",
(7, 9): "m",
(6, 8): "c",
(8, 10): "c",
(5, 6): "y",
(5, 11): "m",
(6, 12): "c",
(11, 12): "y",
(11, 13): "m",
(13, 15): "m",
(12, 14): "c",
(14, 16): "c",
}