Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Agora bug fix #202

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mmhuman3d/core/conventions/keypoints_mapping/agora.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
7 changes: 6 additions & 1 deletion mmhuman3d/data/data_converters/agora.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -212,11 +212,16 @@ 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):
keypoints2d *= (720 / 2160)
keypoints3d = df.iloc[idx]['gt_joints_3d'][pidx]
keypoints3d -= keypoints3d[0] # root-centered

gt_bodymodel_path = os.path.join(
dataset_path,
Expand Down