Skip to content

Commit 5f86f29

Browse files
committed
undo black formatting for face contours and ignore_names
1 parent 61adc37 commit 5f86f29

File tree

1 file changed

+12
-140
lines changed

1 file changed

+12
-140
lines changed

src/python/pose_format/utils/generic.py

Lines changed: 12 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -282,149 +282,21 @@ def reduce_holistic(pose: Pose) -> Pose:
282282
"""
283283
# To avoid installing mediapipe, we just hardcode the face contours given the above code
284284
face_contours = [
285-
"0",
286-
"7",
287-
"10",
288-
"13",
289-
"14",
290-
"17",
291-
"21",
292-
"33",
293-
"37",
294-
"39",
295-
"40",
296-
"46",
297-
"52",
298-
"53",
299-
"54",
300-
"55",
301-
"58",
302-
"61",
303-
"63",
304-
"65",
305-
"66",
306-
"67",
307-
"70",
308-
"78",
309-
"80",
310-
"81",
311-
"82",
312-
"84",
313-
"87",
314-
"88",
315-
"91",
316-
"93",
317-
"95",
318-
"103",
319-
"105",
320-
"107",
321-
"109",
322-
"127",
323-
"132",
324-
"133",
325-
"136",
326-
"144",
327-
"145",
328-
"146",
329-
"148",
330-
"149",
331-
"150",
332-
"152",
333-
"153",
334-
"154",
335-
"155",
336-
"157",
337-
"158",
338-
"159",
339-
"160",
340-
"161",
341-
"162",
342-
"163",
343-
"172",
344-
"173",
345-
"176",
346-
"178",
347-
"181",
348-
"185",
349-
"191",
350-
"234",
351-
"246",
352-
"249",
353-
"251",
354-
"263",
355-
"267",
356-
"269",
357-
"270",
358-
"276",
359-
"282",
360-
"283",
361-
"284",
362-
"285",
363-
"288",
364-
"291",
365-
"293",
366-
"295",
367-
"296",
368-
"297",
369-
"300",
370-
"308",
371-
"310",
372-
"311",
373-
"312",
374-
"314",
375-
"317",
376-
"318",
377-
"321",
378-
"323",
379-
"324",
380-
"332",
381-
"334",
382-
"336",
383-
"338",
384-
"356",
385-
"361",
386-
"362",
387-
"365",
388-
"373",
389-
"374",
390-
"375",
391-
"377",
392-
"378",
393-
"379",
394-
"380",
395-
"381",
396-
"382",
397-
"384",
398-
"385",
399-
"386",
400-
"387",
401-
"388",
402-
"389",
403-
"390",
404-
"397",
405-
"398",
406-
"400",
407-
"402",
408-
"405",
409-
"409",
410-
"415",
411-
"454",
412-
"466",
285+
'0', '7', '10', '13', '14', '17', '21', '33', '37', '39', '40', '46', '52', '53', '54', '55', '58', '61', '63',
286+
'65', '66', '67', '70', '78', '80', '81', '82', '84', '87', '88', '91', '93', '95', '103', '105', '107', '109',
287+
'127', '132', '133', '136', '144', '145', '146', '148', '149', '150', '152', '153', '154', '155', '157', '158',
288+
'159', '160', '161', '162', '163', '172', '173', '176', '178', '181', '185', '191', '234', '246', '249', '251',
289+
'263', '267', '269', '270', '276', '282', '283', '284', '285', '288', '291', '293', '295', '296', '297', '300',
290+
'308', '310', '311', '312', '314', '317', '318', '321', '323', '324', '332', '334', '336', '338', '356', '361',
291+
'362', '365', '373', '374', '375', '377', '378', '379', '380', '381', '382', '384', '385', '386', '387', '388',
292+
'389', '390', '397', '398', '400', '402', '405', '409', '415', '454', '466'
413293
]
414294

415295
ignore_names = [
416-
"EAR",
417-
"NOSE",
418-
"MOUTH",
419-
"EYE",
420-
"THUMB",
421-
"PINKY",
422-
"INDEX",
423-
"KNEE",
424-
"ANKLE",
425-
"HEEL",
426-
"FOOT_INDEX",
427-
] # Face # Hands # Feet
296+
"EAR", "NOSE", "MOUTH", "EYE", # Face
297+
"THUMB", "PINKY", "INDEX", # Hands
298+
"KNEE", "ANKLE", "HEEL", "FOOT_INDEX" # Feet
299+
]
428300

429301
body_component = [c for c in pose.header.components if c.name == "POSE_LANDMARKS"][0]
430302
body_no_face_no_hands = [p for p in body_component.points if all([i not in p for i in ignore_names])]

0 commit comments

Comments
 (0)