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

Exporting motions to bvh #15

Open
aplatyps opened this issue Mar 9, 2023 · 3 comments
Open

Exporting motions to bvh #15

aplatyps opened this issue Mar 9, 2023 · 3 comments

Comments

@aplatyps
Copy link

aplatyps commented Mar 9, 2023

Hi Chen Xin, love your work. I'm currently learning about 3D motions (very new to this, might ask silly questions) and came across your paper and GitHub after some research. I generated some motions with your pre-trained model with the HumanML3D dataset. There's 22 joints. If I understood your paper correctly, the motion generated is in MMM format, and you have a list of joint names arranged in a way that's corresponding to the index of the generated motion. I'm currently trying to write a script to export the motions to a .bvh file so it's easier to use. Do you know of any existing methods/tools I can use or if I need to do any transformation on the motion? Many thanks :)

@ChenFengYe
Copy link
Owner

Welcome to motion generation!
The generated motion is not in MMM format (21 joints). It is AMASS format (22 joints). Please refer to the below.

If you want to export .bvh file, we suggest you fit smpl motion parameters (root position+joint rotation).
You can check this part in github page readme. Then, export smpl motion parameters to bvh file. There are many scripts, e.g. https://github.com/KosukeFukazawa/smpl2bvh
You can also find more related tools.

@aplatyps
Copy link
Author

Thanks for the pointers, it was very helpful!
I see that you have 3 params in the exported smpl .pkl

param["beta"] = new_opt_betas.detach().cpu().numpy()
param["pose"] = new_opt_pose.detach().cpu().numpy()
param["cam"] = new_opt_cam_t.detach().cpu().numpy()

poses is the rotation vectors, I assume the cam is the global translation. Where can I find the smpl scaling?

@ChenFengYe
Copy link
Owner

I am not sure what in "cam". Maybe zeros?
"pose" should be 72 (3 root global translation + 3*23 local rotation with 23 joints).
No scaling here, maybe "cam" is a kind of scales?

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

2 participants