From 52823114d11db88de95a6f6e32c3e6014e67bb62 Mon Sep 17 00:00:00 2001 From: pangyyyyy Date: Mon, 27 Jun 2022 13:10:41 +0800 Subject: [PATCH 1/4] add extra suffix to left and right hip keypoints --- mmhuman3d/core/conventions/keypoints_mapping/agora.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mmhuman3d/core/conventions/keypoints_mapping/agora.py b/mmhuman3d/core/conventions/keypoints_mapping/agora.py index 44c7ebc5..60171075 100644 --- a/mmhuman3d/core/conventions/keypoints_mapping/agora.py +++ b/mmhuman3d/core/conventions/keypoints_mapping/agora.py @@ -1,7 +1,7 @@ AGORA_KEYPOINTS = [ - 'pelvis', 'left_hip', 'right_hip', 'spine_1', 'left_knee', 'right_knee', - 'spine_2', 'left_ankle', 'right_ankle', 'spine_3', 'left_foot', - 'right_foot', 'neck', 'left_collar', 'right_collar', 'head', + 'pelvis', 'left_hip_extra', 'right_hip_extra', 'spine_1', 'left_knee', + 'right_knee', 'spine_2', 'left_ankle', 'right_ankle', 'spine_3', + 'left_foot', 'right_foot', 'neck', 'left_collar', 'right_collar', 'head', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'jaw', 'left_eyeball', 'right_eyeball', 'left_index_1', 'left_index_2', 'left_index_3', 'left_middle_1', From 482f13fcd2b729b66b8ca804832f2e1b113232ac Mon Sep 17 00:00:00 2001 From: pangyyyyy Date: Mon, 27 Jun 2022 13:11:32 +0800 Subject: [PATCH 2/4] fix incorrect global orientation --- mmhuman3d/data/data_converters/agora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmhuman3d/data/data_converters/agora.py b/mmhuman3d/data/data_converters/agora.py index 619e4e7a..3a004c19 100644 --- a/mmhuman3d/data/data_converters/agora.py +++ b/mmhuman3d/data/data_converters/agora.py @@ -108,7 +108,7 @@ def get_global_orient(self, # flip pose R_mod = cv2.Rodrigues(np.array([np.pi, 0, 0]))[0] R_root = cv2.Rodrigues(globalOrient.reshape(-1))[0] - new_root = R_root.dot(R_mod) + new_root = R_mod.dot(R_root) globalOrient = cv2.Rodrigues(new_root)[0].reshape(3) # apply camera matrices From a6b3b701db6d4b5f19929a24ef9ff1e0165f7ab2 Mon Sep 17 00:00:00 2001 From: pangyyyyy Date: Mon, 27 Jun 2022 13:13:51 +0800 Subject: [PATCH 3/4] root center keypoints3d --- mmhuman3d/data/data_converters/agora.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mmhuman3d/data/data_converters/agora.py b/mmhuman3d/data/data_converters/agora.py index 3a004c19..a23265ff 100644 --- a/mmhuman3d/data/data_converters/agora.py +++ b/mmhuman3d/data/data_converters/agora.py @@ -217,6 +217,7 @@ def convert_by_mode(self, dataset_path: str, out_path: str, if self.res == (1280, 720): keypoints2d *= (720 / 2160) keypoints3d = df.iloc[idx]['gt_joints_3d'][pidx] + keypoints3d -= keypoints3d[0] # root-centered gt_bodymodel_path = os.path.join( dataset_path, From f210de91cbe2670fd482b09baa8ac04a830e4081 Mon Sep 17 00:00:00 2001 From: pangyyyyy Date: Mon, 27 Jun 2022 13:31:12 +0800 Subject: [PATCH 4/4] ignore kid annotations --- mmhuman3d/data/data_converters/agora.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mmhuman3d/data/data_converters/agora.py b/mmhuman3d/data/data_converters/agora.py index a23265ff..5d7dfe16 100644 --- a/mmhuman3d/data/data_converters/agora.py +++ b/mmhuman3d/data/data_converters/agora.py @@ -212,6 +212,10 @@ def convert_by_mode(self, dataset_path: str, out_path: str, occlusion = df.iloc[idx]['occlusion'][pidx] ethnicity = df.iloc[idx]['ethnicity'][pidx] + # skip kid since they use different model + if kid: + continue + # obtain keypoints keypoints2d = df.iloc[idx]['gt_joints_2d'][pidx] if self.res == (1280, 720):