File size: 5,813 Bytes
e3641b1
5079645
e3641b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
CONNECTIONS_VIT_FULL = [
    # head 
    (0, 1),
    (2, 4),
    (1, 3),
    (0, 6),
    (0, 5),

    # right arm
    (6, 8),
    (8, 10),

    # right hand
    (10, 112),

    # Big toe 1
    (112, 113),
    (113, 114),
    (114, 115),
    (115, 116),

    # toe 2
    (112, 117),
    (117, 118),
    (118, 119),
    (119, 120),

    # toe 3
    (112, 121),
    (121, 122),
    (122, 123),
    (123, 124),

    # toe 4
    (112, 125),
    (125, 126),
    (126, 127),
    (127, 128),

    # toe 5
    (112, 129),
    (129, 130),
    (130, 131),
    (131, 132),



    # left arm
    (5, 7),
    (7, 9),

    # left hand
    (9, 91),

    
    # Big toe 1
    (91, 92),
    (92, 93),
    (93, 94),
    (94, 95),

    # toe 2
    (91, 96),
    (96, 97),
    (97, 98),
    (98, 99),

    # toe 3
    (91, 100),
    (100, 101),
    (101, 102),
    (102, 103),

    # toe 4
    (91, 104),
    (104, 105),
    (105, 106),
    (106, 107),

    # toe 5
    (91, 108),
    (108, 109),
    (109, 110),
    (110, 111),



    # torso
    (6, 5),
    (12, 11),
    (6, 12),
    (5, 11),

    # right leg
    (12, 14),
    (14, 16),

    # right foot
    (16, 22),
    (22, 21),
    (22, 20),


    # left leg
    (11, 13),
    (13, 15),

    # left foot
    (15, 19),
    (19, 18),
    (19, 17),
]

EDGE_GROUPS_FOR_ERRORS = [
    [0, 2, 4],
    [0, 1, 3],

    # neck
    [6, 0, 2],
    [5, 0, 1],

    # right arm

    # right shoulder
    [5, 6, 8],

    # right elbow
    [6, 8, 10],

    # right hand 
    [8, 10, 121],

    [112, 114, 116],
    [112, 117, 120],
    [112, 121, 124],
    [112, 125, 128],
    [112, 129, 132],

    # left arm

    # left shoulder
    [6, 5, 7],
    
    # left elbow
    [5, 7, 9],

    # left hand
    [7, 9, 100],

    [91, 93, 95],
    [91, 96, 99],
    [91, 100, 103],
    [91, 104, 107],
    [91, 108, 111],


    # right leg

    # right upper-leg
    [6, 12, 14],

    # right middle-leg
    [12, 14, 16],

    # right lower-leg
    [14, 16, 22],
    [16, 22, 21],
    [16, 22, 20],

    # left leg

    # left upper-leg
    [5, 11, 13],

    # left middle-leg
    [11, 13, 15],

    # left lower-leg
    [13, 15, 19],
    [15, 19, 17],
    [15, 19, 18],

]



CONNECTIONS_FOR_ERROR = [
    # head
    (0, 2),
    (2, 4),
    (0, 1),
    (1, 3),

    # right arm
    (6, 0),
    (8, 6),
    (10, 8),

    # right hand
    # (121, 10),

    (112, 114),
    (114, 116),

    (112, 117),
    (117, 120),

    (112, 121),
    (121, 124),

    (112, 125),
    (125, 128),

    (112, 129),
    (129, 132),

    # left arm
    (5, 0),
    (7, 5),
    (9, 7),

    # left hand
    # (100, 9),

    (91, 93),
    (93, 95),

    (91, 96),
    (96, 99),

    (91, 100),
    (100, 103),

    (91, 104),
    (104, 107),

    (91, 108),
    (108, 111),

    # torso
    (6, 12),
    (5, 11),

    # right leg
    (12, 14),
    (14, 16),

    (16, 22),
    (22, 21),
    (22, 20),

    # left leg
    (11, 13),
    (13, 15),

    (15, 19),
    (19, 17),
    (19, 18),

]

def get_thresholds(sensetive_error, general_error, unsensetive_error):
    thresholds = [
        general_error,
        general_error,
        general_error,
        general_error,

        general_error,
        general_error,

        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,

        general_error,
        general_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,

        general_error,
        general_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,

        general_error,
        general_error,
        unsensetive_error,
        unsensetive_error,
        unsensetive_error,
    ]

    return thresholds


EDGE_GROUPS_FOR_SUMMARY = {
    (2, 4): "Head position is incorrect",
    (1, 3): "Head position is incorrect",

    # neck

    (0, 2): "Head position is incorrect",
    (0, 1): "Head position is incorrect",

    # right arm

    # right shoulder
    (6, 8): "Right shoulder position is incorrect",

    # right elbow
    (8, 10): "Right elbow position is incorrect",

    # right hand 
    (10, 121): "Right hand's palm position is incorrect",

    (114, 116): "Right thumb finger position is incorrect",
    (117, 120): "Right index finger position is incorrect",
    (121, 124): "Right middle finger position is incorrect",
    (125, 128): "Right ring finger position is incorrect",
    (129, 132): "Right pinky finger position is incorrect",

    # left arm

    # left shoulder
    (5, 7): "Left shoulder position is incorrect",
    
    # left elbow
    (7, 9): "Left elbow position is incorrect",

    # left hand
    (9, 100): "Left hand palm position is incorrect",

    (93, 95): "Left thumb finger position is incorrect",
    (96, 99): "Left index finger position is incorrect",
    (100, 103): "Left middle finger position is incorrect",
    (104, 107): "Left ring finger position is incorrect",
    (108, 111): "Left pinky finger position is incorrect",

    # right leg

    # right upper-leg
    (12, 14): "Right thigh position is incorrect",

    # right middle-leg
    (14, 16): "Right shin position is incorrect",

    # right lower-leg
    (16, 22): "Right foot position is incorrect",
    (22, 21): "Right shin position is incorrect",
    (22, 20): "Right shin position is incorrect",

    # left leg

    # left upper-leg
    (11, 13): "Left thigh position is incorrect",

    # left middle-leg
    (13, 15): "Left shin position is incorrect",

    # left lower-leg
    (15, 19): "Left foot position is incorrect",
    (19, 17): "Left shin position is incorrect",
    (19, 18): "Left shin position is incorrect"
}