yohanshin / WHAM

MIT License
706 stars 77 forks source link

Clarification about wham_results. #63

Open JoseBarreiros-TRI opened 9 months ago

JoseBarreiros-TRI commented 9 months ago

My understanding from the paper is that the joint angles (results["poses_body"] = wham_inference(.)) are deltas from the nominal pose of smpl, is this correct? if so, is the ok to get the nominal position of the joints with smpl.get_output(.).original_pose? and what about the nominal orientation of the joint frames? Additionally, results["poses_body"] is a 23xR_{3x3} matrix while smpl joint count is 24; are the poses_body the joint angles of j1 to j23, leaving j0 to be the root of the body?

Thank you in advance for the response and great work!!

yohanshin commented 9 months ago

Hi @JoseBarreiros-TRI ,

Please correct me if I misunderstood your question. WHAM predicts 3 different types of rotations: 1) poses_body -- 3D angles of 23 SMPL body joints defined in the relative joint coordinate system, 2) poses_root_cam -- root orientation of the model in the camera coordinate system, and 3) poses_root_world -- root orientation of the model in the world-coordinate system. If you want to get the positions of joints, you need to do:

verts_positions = smpl.get_output(.).vertices
joint_positions = torch.matmul(smpl.J_regressor.unsqueeze(0), verts_positions)

You can obtain the orientation of each segment frame by multiplying joint rotation following the kinematics tree.

-- Yes, poses_body starts from 0: left hip, 1: right hip, ... (excluding pelvis)

JoseBarreiros-TRI commented 9 months ago

Thank you for the answer. A few comments:

JoseBarreiros-TRI commented 9 months ago

To clarify my previous question, here is a visualization of the nominal joint frames: image

Since I don't have this information, I assumed they share the same orientation as the world frame. This is clearly incorrect; furthermore, when playing the wham_results, the motion is wrong.