-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkeypoint_labels.py
304 lines (302 loc) · 15.9 KB
/
keypoint_labels.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
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
CLASS_MAPPING = {
"02691156": "airplane",
"02808440": "bathtub",
"02818832": "bed",
"02876657": "bottle",
"02954340": "cap",
"02958343": "car",
"03001627": "chair",
"03467517": "guitar",
"03513137": "helmet",
"03624134": "knife",
"03642806": "laptop",
"03790512": "motorcycle",
"03797390": "mug",
"04225987": "skateboard",
"04379243": "table",
"04530566": "vessel",
}
INVERSE_CLASS_MAPPING = {
"airplane": "02691156",
"bag": "02773838",
"cap": "02954340",
"car": "02958343",
"chair": "03001627",
"earphone": "03261776",
"guitar": "03467517",
"knife": "03624134",
"lamp": "03636649",
"laptop": "03642806",
"motorbike": "03790512",
"mug": "03797390",
"pistol": "03948459",
"rocket": "04099429",
"skateboard": "04225987",
"table": "04379243",
}
KEYPOINT_LABELS = {
"table": {
0: ("corner of the table top", True, False),
1: ("corner of the table top", True, False),
2: ("corner of the table top", True, False),
3: ("corner of the table top", True, False),
4: ("end of the table leg", True, False),
5: ("end of the table leg", True, False),
6: ("end of the table leg", True, False),
7: ("end of the table leg", True, False),
8: ("end of the stretcher between the table legs", True, False),
9: ("end of the stretcher between the table legs", True, False),
10: ("end of the stretcher between the table legs", True, False),
11: ("end of the stretcher between the table legs", True, False),
},
"mug": {
0: ("mug rim", False, False),
1: ("mug rim", False, False),
2: ("mug rim", False, False),
3: ("mug rim", False, False),
4: ("mug base rim", False, False),
5: ("mug base rim", False, False),
6: ("mug base rim", False, False),
7: ("mug base rim", False, False),
8: ("upper attachment point for the mug handle", True, True),
9: ("center of the mug handle", True, True),
10: ("lower attachment point for the mug handle", True, True)
},
"bottle": {
0: ("lower rim of the bottle", False, False),
1: ("lower rim of the bottle", False, False),
2: ("lower rim of the bottle", False, False),
3: ("lower rim of the bottle", False, False),
4: ("edge between the bottle body and the bottle neck", False, False),
5: ("edge between the bottle body and the bottle neck", False, False),
6: ("edge between the bottle body and the bottle neck", False, False),
7: ("edge between the bottle body and the bottle neck", False, False),
8: ("bottle cap center", True, True),
9: ("edge of the bottle cap", False, False),
10: ("edge of the bottle cap", False, False),
11: ("edge of the bottle cap", False, False),
12: ("edge of the bottle cap", False, False),
13: ("lower edge of the bottle neck", False, False),
14: ("lower edge of the bottle neck", False, False),
15: ("lower edge of the bottle neck", False, False),
16: ("lower edge of the bottle neck", False, False),
17: ("lower edge of the bottle neck", False, False),
},
"vessel": {
0: ("bow of a boat", True, True),
1: ("lower part of the end of the bow of a boat (starboard)", True, True),
2: ("upper part of the end of the bow of a boat (starboard)", True, True),
3: ("upper part of the end of the bow of a boat (port)", True, True),
4: ("lower part of the end of the bow of a boat (port)", True, True),
5: ("lower corner of the boat stern (starboard", True, True),
6: ("upper corner of the boat stern (starboard)", True, True),
7: ("upper corner of the boat stern (port)", True, True),
8: ("lower corner of the boat stern (port)", True, True),
9: ("mast step of a sailboat", True, True),
10: ("mast top of a sailboat", True, True),
11: ("lower front corner of the deckhouse (starboard)", True, True),
12: ("lower front corner of deckhouse (port)", True, True),
13: ("lower aft corner of the deckhouse (starboard)", True, True),
14: ("lower aft corner of the deckhouse (port)", True, True),
15: ("upper front corner of the deckhouse (starboard)", True, True),
16: ("upper front corner of the deckhouse (port)", True, True),
17: ("upper aft corner of the deckhouse (starboard)", True, True),
18: ("upper aft corner of the deckhouse (port)", True, True),
19: ("foremost elevation point on the deck of the ship", True, True),
20: ("lower corner of the windshield of the ship (starboard)", True, True),
21: ("lower corner of the windshield of the ship (port)", True, True),
22: ("upper corner of the windshield of the ship (starboard)", True, True),
23: ("upper corner of the windshield of the ship (port)", True, True),
},
"chair": {
0: ("upper corner of the back of the chair", True, False),
1: ("upper corner of the back of the chair", True, False),
2: ("lower corner of the back of the chair", True, False),
3: ("lower corner of the back of the chair", True, False),
4: ("front corner of the seat of the chair", True, False),
5: ("front corner of the seat of the chair", True, False),
6: ("front corner of the armrest of the chair", True, False),
7: ("back corner of the armrest of the chair", True, False),
8: ("front corner of the armrest of the chair", True, False),
9: ("back corner of the armrest of the chair", True, False),
10: ("lower end of the front leg of the chair", True, False),
11: ("lower end of the back leg of the chair", True, False),
12: ("lower end of the front leg of the chair", True, False),
13: ("lower end of the back leg of the chair", True, False),
14: ("lower end of the leg of the chair", True, False),
15: ("top of the chair cylinder", True, True),
16: ("bottom of the chair cylinder", True, True),
17: ("lower end of the front leg of the chair", True, False),
18: ("lower end of the back leg of the chair", True, False),
19: ("lower end of the back leg of the chair", True, False),
20: ("lower end of the front leg of the chair", True, False),
},
"bed": {
0: ("lower end of the front leg of the bed", True, False),
1: ("lower end of the headboard leg of the bed", True, False),
2: ("lower end of the headboard leg of the bed", True, False),
3: ("lower end of the front leg of the bed", True, False),
4: ("foot corner of the mattress", True, False),
5: ("head corner of the mattress", True, False),
6: ("head corner of the mattress", True, False),
7: ("foot corner of the mattress", True, False),
8: ("foot corner of the upper mattress of the bunk bed", True, False),
9: ("head corner of the upper mattress of the bunk bed", True, False),
10: ("head corner of the upper mattress of the bunk bed", True, False),
11: ("foot corner of the upper mattress of the bunk bed", True, False),
12: ("upper corner of the bed frame of the bunk bed", True, False),
13: ("upper corner of the bed frame of the bunk bed", True, False),
14: ("upper corner of the bed frame of the bunk bed", True, False),
15: ("upper corner of the bed frame of the bunk bed", True, False),
16: ("upper corner of the footboard of the bed", True, False),
17: ("upper corner of the headboard of the bed", True, False),
18: ("upper corner of the headboard of the bed", True, False),
19: ("upper corner of the footboard of the bed", True, False),
},
"skateboard": {
0: ("corner of the tail of the skateboard", True, False),
1: ("corner of the tail of the skateboard", True, False),
2: ("corner of the nose of the skateboard", True, False),
3: ("corner of the nose of the skateboard", True, False),
4: ("wheel of the skateboard", True, False),
5: ("wheel of the skateboard", True, False),
6: ("wheel of the skateboard", True, False),
7: ("wheel of the skateboard", True, False),
8: ("nose of the skateboard", True, True),
9: ("tail of the skateboard", True, True),
},
"knife": {
0: ("tip of the knife", True, True),
1: ("butt of the knife", True, True),
2: ("shoulder of the knife", True, True),
3: ("heel of the knife", True, True),
4: ("end of the crossguard of the knife", True, False),
5: ("end of the crossguard of the knife", True, False),
},
"cap": {
0: ("top button of the cap", True, True),
1: ("front of the visor of the cap", True, True),
2: ("corner of the visor of the cap", True, False),
3: ("corner of the visor of the cap", True, False),
4: ("center of the back of the cap", True, True),
5: ("center of the visor attachment of the cap", True, True),
},
"laptop": {
0: ("corner of the laptop body", True, False),
1: ("hinge of the laptop", True, False),
2: ("hint of the laptop", True, False),
3: ("corner of the laptop body", True, False),
4: ("corner of the laptop screen", True, False),
5: ("corner of the laptop screen", True, False),
},
"motorcycle": {
0: ("headlight of the motorcycle", True, True),
1: ("end of the handlebar of the motorcycle", True, False),
2: ("end of the handlebar of the motorcycle", True, False),
3: ("seat of the motorcycle", True, True),
4: ("axle of the front wheel of the motorcycle", True, False),
5: ("axle of the back wheel of the motorcycle", True, False),
6: ("bottom part of the frame of the motorcycle", True, True),
7: ("axle of the front wheel of the motorcycle", True, False),
8: ("axle of the back wheel of the motorcycle", True, False),
9: ("front part of the front wheel of the motorcycle", True, False),
10: ("back part of the back wheel of the motorcycle", True, False),
11: ("top of the fuel tank of the motorcycle", True, True),
12: ("front end of the front fender of the motorcycle", True, True),
13: ("back end of the rear fender of the motorcycle", True, True),
},
"airplane": {
0: ("nose of the airplane", True, True),
1: ("cockpit of the airplane", True, True),
2: ("tail of the airplane", True, True),
3: ("wingtip of the left wing of the airplane", True, True),
4: ("wing root of the left wing of the airplane", True, False),
5: ("wingtip of the right wing of the airplane", True, True),
6: ("wing root of the right wing of the airplane", True, False),
7: ("wingtip of the left horizontal stabilizer of the airplane", True, True),
8: ("wingtip of the right horizontal stabilizer of the airplane", True, True),
9: ("top of vertical stabilizer of the airplane", True, True),
10: ("wingtip of the left diagonal stabilizer of the airplane", True, True),
11: ("wingtip of the right diagonal stabilizer of the airplane", True, True),
12: ("wing root of the left wing of the airplane", True, False),
13: ("wing root of the right wing of the airplane", True, False),
14: ("inner turbine of the left wing of the airplane", True, True),
15: ("inner turbine of the right wing of the airplane", True, True),
16: ("outer turbine of the left wing of the airplane", True, True),
17: ("outer turbine of the right wing of the airplane", True, True),
18: ("outer turbine of the right wing of the airplane", True, True),
# keypoints of d2e2e23f5be557e2d1ab3b031c100cb1 are misaligned
},
"car": {
0: ("front right wheel of the car", True, True),
1: ("rear right wheel of the car", True, True),
2: ("rear left wheel of the car", True, True),
3: ("front left wheel of the car", True, True),
4: ("corner of the front bumper of the car", True, False),
5: ("corner of the rear bumper of the car", True, False),
6: ("corner of the rear bumper of the car", True, False),
7: ("corner of the front bumper of the car", True, False),
8: ("top corner of the windshield of the car", True, False),
9: ("top corner of the windshield of the car", True, False),
10: ("top corner of the rear window of the car", True, False),
11: ("top corner of the rear window of the car", True, False),
12: ("bottom corner of the windshield of the car", True, False),
13: ("bottom corner of the windshield of the car", True, False),
14: ("bottom corner of the rear window of the car", True, False),
15: ("bottom corner of the rear window of the car", True, False),
16: ("right headlight of the car", True, True),
17: ("right taillight of the car", True, True),
18: ("left taillight of the car", True, True),
19: ("left headlight of the car", True, True),
20: ("right side mirror of the car", True, True),
21: ("left side mirror of the car", True, True),
},
"guitar": {
0: ("head of the guitar", True, True),
1: ("connection of the body and neck of the guitar", True, True),
2: ("corner of the body of the guitar", True, False),
3: ("corner of the body of the guitar", True, False),
4: ("corner of the body of the guitar", True, False),
5: ("corner of the body of the guitar", True, False),
6: ("strap pin on the bottom of the body of the guitar", True, True),
7: ("waist of the body of the guitar", True, False),
8: ("waist of the body of the guitar", True, False),
},
"bathtub": {
0: ("top outer corner of the bathtub", True, False),
1: ("top outer corner of the bathtub", True, False),
2: ("top outer corner of the bathtub", True, False),
3: ("top outer corner of the bathtub", True, False),
4: ("bottom outer corner of the bathtub", True, False),
5: ("bottom outer corner of the bathtub", True, False),
6: ("bottom outer corner of the bathtub", True, False),
7: ("bottom outer corner of the bathtub", True, False),
8: ("top inner corner of the bathtub", True, False),
9: ("top inner corner of the bathtub", True, False),
10: ("top inner corner of the bathtub", True, False),
11: ("top inner corner of the bathtub", True, False),
12: ("bottom inner corner of the bathtub", True, False),
13: ("bottom inner corner of the bathtub", True, False),
14: ("bottom inner corner of the bathtub", True, False),
15: ("bottom inner corner of the bathtub", True, False),
16: ("center of the short side upper edge of the bathtub", True, False),
17: ("center of the short side upper edge of the bathtub", True, False),
18: ("center of the short side lower edge of the bathtub", True, False),
19: ("center of the short side lower edge of the bathtub", True, False),
20: ("center of the short side upper edge of the bathtub", True, False),
21: ("center of the short side upper edge of the bathtub", True, False),
22: ("center of the short side lower edge of the bathtub", True, False),
23: ("center of the short side lower edge of the bathtub", True, False),
},
"helmet": {
0: ("top of the helmet", True, True),
1: ("front of the helmet peak", False, True),
2: ("back of the helmet peak", False, True),
3: ("left side of the helmet peak", False, True),
4: ("right side of the helmet peak", False, True),
5: ("right bottom of the helmet", True, True),
6: ("left bottom of the helmet", True, True),
7: ("bottom of the visor of the helmet", True, True),
8: ("bottom of the back of the helmet", True, True),
}
}