Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from SMPL-X beta to get SMPL beta [transfer model] #190

Open
XueYing126 opened this issue Apr 11, 2024 · 6 comments
Open

from SMPL-X beta to get SMPL beta [transfer model] #190

XueYing126 opened this issue Apr 11, 2024 · 6 comments

Comments

@XueYing126
Copy link

XueYing126 commented Apr 11, 2024

Hi, thank you for the great work!

I saw that you mention "the SMPL and SMPL-X shape spaces are NOT compatible, since each model is the result of a different training process. "
Can I ask if SMPL-X beta (use first 10) could approximate the SMPL beta (10, )? If not, what is the main reason? the first 10 PCA should be similar, right? Is the dataset that they were trained on are very different?

Is there an easier way to get smpl-beta from smplx-beta?

Thanks a lot!

@XueYing126 XueYing126 changed the title Use SMPL-X beta approximate SMPL beta [transfer model] from SMPL-X beta to get SMPL beta [transfer model] Apr 12, 2024
@LeyangWen
Copy link

LeyangWen commented May 1, 2024

Hi @XueYing126

Did you find a workaround for this? I tried using the conversion code but it is way too slow, estimated to take years (four, to be exact) on my collected dataset.

Also, I am wondering how/if you converted the SMPLX body pose (21x3) to the SMPL body pose (23x3)? i.e., getting the SMPL hand joint pose from the SMPLX hand poses.

Thanks.

@XueYing126
Copy link
Author

XueYing126 commented May 1, 2024

Hi @LeyangWen

If you add ftol: 1e-10 to config_files/smplx2smpl.yaml,
https://github.com/XueYing126/smplx2smpl-shape/blob/c88c67d0e52229c3a854a16cf7eed18366e58de9/config_files/smplx2smpl.yaml#L15
it will make the run time 10, or even 20 times faster. (because optimization stops before iterations stops )
This will gives you less than 2 months, and if you parallel process... maybe less than a week ;)

As far as I understand, after you run the : python -m transfer_model --exp-cfg config_files/smplx2smpl.yaml
you will have the SMPL pose you need at: var_dict['body_pose']

Good luck!

@LeyangWen
Copy link

Thanks @XueYing126, changing the ftol works wonders. Also, I increased the batch_size to 128, which also dramatically speed things up. The default batch_size was set to 1. Now,

I randomly selected a few frames to compare the mesh outputs and they still look good after the changes.

With the changes, a GPU server, downsampling, and parallelization, the expected time is down from 4 years to ~4 days.

Thanks again 👍

@BukuBukuChagma
Copy link

@XueYing126 @LeyangWen Did you guys test out the betas given by transfer model for smplx->smpl?
The obj file it created seems correct, but if you use the betas and pose parameter from pkl file to recreate the mesh using smpl, the result is completely differnet body shape. Meaning the betas value are quite incorrect.

@XueYing126
Copy link
Author

@BukuBukuChagma Hi, Yes I used beta and pose to create the mesh and it seems correct.
Make sure you set the gender correctly.

@LeyangWen
Copy link

LeyangWen commented May 8, 2024

So, using batch_size >1 would cause a minor bug in here, causing it to write the same pkl file for batch_size times. If you merge all the pkl files, you will get #*batch_size frames with a lot of redundant frames.

One quick fix is to add if ii==0: and only write the pkl once. (PR#193)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants