vchoutas / smplx

SMPL-X
https://smpl-x.is.tue.mpg.de/
Other
1.78k stars 303 forks source link

How to create and save a smplx mesh with pose? #142

Closed lbycan closed 1 year ago

lbycan commented 1 year ago

Hi, thanks to your great work. I have run the examples/demo.py and get the visualized smplx mesh, but I found that it was a normal mesh without pose. So can I use this project to get a mesh with pose like smplify-x from a photo? Besides, I also install the smplx add-on in Blender. I tried to load the smplify-x/output/result/000.pkl to the smplx models, and it failed. How can I transfer smplify-x data to smplx data? It is work out? And I have no idea about where to find the pose pkl loaded to the smplx add-on.

lbycan commented 1 year ago

I have changed the code of smplifyx/fit_single_frame.py issue139 from result['body_pose'] = pose_embedding.detach().cpu().numpy() to result['body_pose'] = vposer.decode(pose_embedding, output_type='aa').detach().cpu().numpy().reshape((1,63)) and then the results/000.pkl can be loaded in Blender SMPLX add-on. (It only load the body pose, no hand pose and expression.)

Another problem appeared: the root keypoint is unchange, but others are rotated 180 degree. It likes that the location of root keypoint moved from chest to between the legs, like this picture. 202210251714121

If I rotate all keypoints 180 degree, except the root, the root keypoint would be out of the body mesh, like this picture. 20221025170917

Is there any approach to solve this problem?

tpsmpi commented 1 year ago

Please look at the README.md [1] of the SMPL-X Blender add-on for supported .pkl pose format details.

Load pose from .pkl file

  • Format: Full body pose with 55 joints in Rodrigues notation
  • Over 3000 sample poses are available at https://agora.is.tuebingen.mpg.de/
    • Sign In > Download > Ground Truth Fittings > SMPL-X fits

The source code of the add-on is available so you can see implementation details of the .pkl reader and make your own customizations if needed.


Please direct questions related to the Blender add-on to the contact address in the README.md [1].

[1] https://gitlab.tuebingen.mpg.de/jtesch/smplx_blender_addon

lbycan commented 1 year ago

Please look at the README.md [1] of the SMPL-X Blender add-on for supported .pkl pose format details.

Load pose from .pkl file

  • Format: Full body pose with 55 joints in Rodrigues notation
  • Over 3000 sample poses are available at https://agora.is.tuebingen.mpg.de/

    • Sign In > Download > Ground Truth Fittings > SMPL-X fits

The source code of the add-on is available so you can see implementation details of the .pkl reader and make your own customizations if needed.

Please direct questions related to the Blender add-on to the contact address in the README.md [1].

[1] https://gitlab.tuebingen.mpg.de/jtesch/smplx_blender_addon

Thank you very much for your advice!!! I have sent an email to the contact mailbox!

ihongxx commented 1 year ago

I meet the same problem, Is there any approach to solve this problem? @lbycan

lbycan commented 1 year ago

I meet the same problem, Is there any approach to solve this problem? @lbycan

I solved this problem by annotating the code of "global_orient". Annotating the code before install the addon.