joint_angles_calculate icon indicating copy to clipboard operation
joint_angles_calculate copied to clipboard

Recovered skeleton not aligned with the target pose

Open aali26 opened this issue 2 years ago • 4 comments

Hello @TemugeB , Thanks for the significant contribution. If I wanted to extend your work to add more joints and different joints tree, I would need to modify the joint hierarchy and the offset of the joints below are some of the modifications I made to make it work.
The basic kinematic tree Screenshot from 2022-10-10 16-25-11 the offset modification:

offset_directions = {}
offset_directions['left_hip']       = np.array([1,-1,0])
offset_directions['left_knee']      = np.array([0,-1, 0])
offset_directions['left_ankle']     = np.array([0,-1, 0])
offset_directions['left_foot']      = np.array([0,-1,1])

offset_directions['right_hip']      = np.array([-1,-1,0])
offset_directions['right_knee']     = np.array([0,-1, 0])
offset_directions['right_ankle']    = np.array([0,-1, 0])
offset_directions['right_foot']     = np.array([0,-1,1])

offset_directions['head']           = np.array([1,1,1])
offset_directions['neck']           = np.array([0,1,0])
offset_directions['spine3']         = np.array([0,1,0])
offset_directions['spine2']         = np.array([0,1,0])
offset_directions['spine1']         = np.array([0,1,0])

offset_directions['left_collar']    = np.array([1,1,0])
offset_directions['left_shoulder']  = np.array([1,1,0])
offset_directions['left_elbow']     = np.array([1,0,0])
offset_directions['left_wrist']     = np.array([1,0,0])
offset_directions['left_hand']      = np.array([1,0,0])

offset_directions['right_collar']   = np.array([-1,1,0])
offset_directions['right_shoulder'] = np.array([-1,1,0])
offset_directions['right_elbow']    = np.array([-1,0,0])
offset_directions['right_wrist']    = np.array([-1,0,0])
offset_directions['right_hand']     = np.array([-1,0,0])

The main problem I'm encountering is the alignment of the original pose and the reconstructed one, as you can see below. Any suggestions?

Screenshot from 2022-10-10 16-18-01

aali26 avatar Oct 10 '22 20:10 aali26

It looks like it could be an issue with normalization. You can see that the spine to collar length is longer than the original pose. So it suggests some bone length is longer than it should be. I would check the normalization part first and then also check if the obtained bone lengths make sense. The bone length is an average over all the frames, I believe. So you should also check that the bone lengths are consistent through all of your frames. A simple histogram might help here.

TemugeB avatar Oct 11 '22 02:10 TemugeB

@aali26 are you using the H36M skeleton here? Are you willing to share your modified code to include these aadditional joints?

AJDA1992 avatar Oct 18 '22 14:10 AJDA1992

@aali26 are you using the H36M skeleton here? Are you willing to share your modified code to include these aadditional joints?

I'm working on Human3.6 and SMPL keypoints and I can share the code once I'm done and ensure it is working fine.

aali26 avatar Oct 19 '22 15:10 aali26

@aali26 are you willing to share how you are plotting two skeletons simultaneously aand what they represent?

AJDA1992 avatar Oct 19 '22 16:10 AJDA1992