vchoutas / smplify-x

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image
https://smpl-x.is.tue.mpg.de/
Other
1.77k stars 340 forks source link

The pose dimension between smplify and smplify-x #58

Closed ZORAN666 closed 4 years ago

ZORAN666 commented 4 years ago

Can you tell me how to get the same pose vector dimension just like smplify, a 72 parameters in an array, when using the smplify-x? The pose vector generated from smplify-x has only 32 parameters. Thanks.

geopavlakos commented 4 years ago

The default setting of the code stores the pose output using a VPoser latent vector of size 32. You can use the VPoser decoder to recover the SMPL pose parameters.

HelloEgg commented 4 years ago

@geopavlakos Hi. The resulting parameter of vposer decoder is 63 elements (I assume 21 axis-angle values of each joints with xyz values), which is inconsistent with pose parameter of size 24 joints. Which ones are excluded? what are the orders? thank you!

c.f. SMPL joints as stated by the paper ['Pelvis', 'L_Hip', 'R_Hip', 'Spine1', 'L_Knee', 'R_Knee', 'Spine2', 'L_Ankle', 'R_Ankle', 'Spine3', 'L_Foot', 'R_Foot', 'Neck', 'L_Collar', 'R_Collar', 'Head', 'L_Shoulder', 'R_Shoulder', 'L_Elbow', 'R_Elbow', 'L_Wrist', 'R_Wrist', 'L_Hand', 'R_Hand']

Code I used was


pose = np.asarray (pose)
poZ_body_sample = torch.from_numpy(pose.astype(np.float32)).to('cuda')
pose_body = vp.decode(poZ_body_sample, output_type='matrot').view(-1, 3,3)

where pose is an array of 32 vectors

geopavlakos commented 4 years ago

These 63 elements correspond to the rotations of all the joints from 'L_Hip' to 'R_Wrist' (based on the list you provided). The order is the same. The last two joints are present in SMPL but not in SMPL-X, while the "first joint" effectively corresponds to the global orientation of the body, which is not modeled by VPoser.