From 9d8be6fc3857b2933851f534406fe7990cf27bca Mon Sep 17 00:00:00 2001 From: Wei-Chen-hub <1259566226@qq.com> Date: Thu, 6 Apr 2023 16:55:54 +0800 Subject: [PATCH 1/2] fix get_keypoint_idx() to raise an error on unsuccessful query rather than return -1 --- mmhuman3d/core/conventions/keypoints_mapping/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mmhuman3d/core/conventions/keypoints_mapping/__init__.py b/mmhuman3d/core/conventions/keypoints_mapping/__init__.py index ee8d1145..e7b90a4f 100644 --- a/mmhuman3d/core/conventions/keypoints_mapping/__init__.py +++ b/mmhuman3d/core/conventions/keypoints_mapping/__init__.py @@ -27,6 +27,7 @@ posetrack, pw3d, pymafx_smplx, + saas_manual_anno, smpl, smplx, spin_smplx, @@ -78,6 +79,7 @@ 'mano_hands_reorder': mano.MANO_HANDS_REORDER_KEYPOINTS, 'mediapipe_whole_body': mediapipe.MP_WHOLE_BODY_KEYPOINTS, 'mediapipe_body': mediapipe.MP_BODY_KEYPOINTS, + 'labelme_superset_53': saas_manual_anno.LABELME_SUPERSET_DANCE_53, } __KEYPOINTS_MAPPING_CACHE__ = defaultdict(dict) @@ -382,7 +384,7 @@ def get_keypoint_idx(name: str, idx = -1 if idx >= 0: return idx - return idx + raise ValueError(f'Cannot find joint: {name} in convention type: {convention}') def get_keypoint_num(convention: str = 'smplx', From d0b444ade65844183144fdc9476c57c33e58bf01 Mon Sep 17 00:00:00 2001 From: Wei-Chen-hub <1259566226@qq.com> Date: Thu, 6 Apr 2023 17:07:18 +0800 Subject: [PATCH 2/2] fix --- mmhuman3d/core/conventions/keypoints_mapping/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/mmhuman3d/core/conventions/keypoints_mapping/__init__.py b/mmhuman3d/core/conventions/keypoints_mapping/__init__.py index e7b90a4f..5e3a014c 100644 --- a/mmhuman3d/core/conventions/keypoints_mapping/__init__.py +++ b/mmhuman3d/core/conventions/keypoints_mapping/__init__.py @@ -27,7 +27,6 @@ posetrack, pw3d, pymafx_smplx, - saas_manual_anno, smpl, smplx, spin_smplx, @@ -79,7 +78,6 @@ 'mano_hands_reorder': mano.MANO_HANDS_REORDER_KEYPOINTS, 'mediapipe_whole_body': mediapipe.MP_WHOLE_BODY_KEYPOINTS, 'mediapipe_body': mediapipe.MP_BODY_KEYPOINTS, - 'labelme_superset_53': saas_manual_anno.LABELME_SUPERSET_DANCE_53, } __KEYPOINTS_MAPPING_CACHE__ = defaultdict(dict)