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

storing predicted rotations in bvh format #10

Closed
Neptune-Trojans opened this issue Jan 11, 2022 · 3 comments
Closed

storing predicted rotations in bvh format #10

Neptune-Trojans opened this issue Jan 11, 2022 · 3 comments

Comments

@Neptune-Trojans
Copy link

Neptune-Trojans commented Jan 11, 2022

Hi,

Is there a way to store model generated rotations as bvh file ?
I want to load the generated motion via following package in order to proceed with my research.
Thanks.

@Mathux
Copy link
Owner

Mathux commented Jan 21, 2022

Hello,

In the fairmotion package you specified, you can see in the fairmotion/data/amass.py file, that there are functions to load data from the AMASS dataset.

What you can do is to modify this file src/generate/generate_sequences.py from this repo such that you save the SMPL pose parameters, instead of the vertices.
To give you some clues, generation["output"] is the SMPL parameters (in rotation 6D format). You need to convert them back to axis angle (you can use functions in this file: src/utils/rotation_conversions.py. Then you need to save the translation and rotations in a dictionary like AMASS data.

@Neptune-Trojans
Copy link
Author

Hi,

Thanks for the explanation.
The 6d rotations (6d format) after you convert them back to 3x3 rotation matrix geometry.rotation_6d_to_matrix(x_rotations[mask]) is this regular rotation matrix or it's still SMPL model rotations ?
If it's still SMPL model rotations how I can convert them to regular rotations ?

Thanks.

@Mathux
Copy link
Owner

Mathux commented Feb 20, 2022

Hello,

The conversion functions convert one "representation" of the rotation into another (6D => 3x3 matrix for example). It doesn't change anything else. The rotation will still be "SMPL model rotations". If you convert them into axis-angle, it will be the exact same format as the AMASS dataset. You can then check the fairmotion/data/amass.py file to see how to load this type of data into fairmotion.

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