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

Question about global pose #42

Open
huzijun1996 opened this issue Jul 9, 2024 · 4 comments
Open

Question about global pose #42

huzijun1996 opened this issue Jul 9, 2024 · 4 comments

Comments

@huzijun1996
Copy link

I synthesized the global rotation data as you implied in preprocess.py.
for i, l in tqdm(list(enumerate(length))):
if l <= 12: b += l; print('\tdiscard one sequence with length', l); continue
p = art.math.axis_angle_to_rotation_matrix(pose[b:b + l]).view(-1, 24, 3, 3)
grot, joint, vert = body_model.forward_kinematics(p, shape[i], tran[b:b + l], calc_mesh=True)
out_grot.append(grot[:])
torch.save(out_grot, os.path.join(paths.amass_dir, 'grot.pt'))
I directly used inverse_kinematics_R on the file to get the local rotation data as shown in Figure 1 with no problem.

But if I select only 15 of those nodes and use def _reduced_glb_6d_to_full_local_mat(self, root_rotation, glb_reduced_pose): to generate 24 node data
reduced = [1, 2, 3, 4, 5, 6, 9, 12, 13, 14, 15, 16, 17, 18, 19]
ignored = [0, 7, 8, 10, 11, 20, 21, 22, 23]
That birth result is shown in Figure 2, where the waist joints are not harmonized with the body.

May I ask what you did with the global rotation data in addition to the synthesis?

09c5e3dfb76177483f5257f6d1897e6f.mp4
7bf3af2870ca2cafad7c539df495b037.mp4
@Xinyu-Yi
Copy link
Owner

During training, we use the rotation of the 15 joints expressed in the root frame. So you need to left-multiply the inverse of root rotation to the world-frame global rotation and then select the 15 joints.

@Xinyu-Yi
Copy link
Owner

i.e. the training gt is something like grot[:, :1].transpose(2, 3).matmul(grot)[:, reduced_joint_indices]

@huzijun1996
Copy link
Author

Thanks. In the joint position processing in joint.pt, I'm solving for the relative positions of leaf and full joints: leaf_joints_position - root_position and full_joints_position - root_position. Is there any preprocessing needed other than that?

@David202307
Copy link

@huzijun1996 能加个微信吗,请教一下13450294131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants