akashsengupta1997 / STRAPS-3DHumanShapePose

Code repository for the paper: Synthetic Training for Accurate 3D Human Pose and Shape Estimation in the Wild (BMVC 2020)
MIT License
165 stars 18 forks source link

how to get the result of body_pose? #22

Closed leeooo001 closed 2 years ago

leeooo001 commented 2 years ago

in predict_3d.py 150 line pred_vertices = pred_vertices.cpu().detach().numpy()[0] pred_vertices2d = pred_vertices2d.cpu().detach().numpy()[0] pred_reposed_vertices = pred_reposed_vertices.cpu().detach().numpy()[0] pred_cam_wp = pred_cam_wp.cpu().detach().numpy()[0]

*pred_pose = pred_smpl_output.body_pose.cpu().detach().numpy()[0] ??how to get the standard body_pose para 243 ? why the result is 2333?**

leeooo001 commented 2 years ago

the result is 23 33,how to turn it to 24 * 3?

akashsengupta1997 commented 2 years ago

Body pose in SMPL is the 3D rotations of the 23 body joints. 3D rotations can be represented in many ways, commonly we use (i) 23 rotation matrices with size (bsize, 23, 3, 3) or (ii) 23 axis-angle rotation vectors (default SMPL input) with size (bsize, 23 3) or (iii) 23 6D rotation representations (https://arxiv.org/abs/1812.07035) with size (bsize, 23 6)

In addition, SMPL needs the global rotation of the body i.e. the 3D rotation of the root joint.

Concatenating the global rotation with the 23 body pose rotations gives either (bsize, 24, 3, 3) rotation matrices or (bsize, 24*3) axis angle vectors. These are already give to you by the pred_pose_rotmats or pred_pose variables that are predicted by the neural net.