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

Make transfer_model more user-friendly #115

Merged
merged 10 commits into from
Sep 8, 2022
Merged

Conversation

gngdb
Copy link
Contributor

@gngdb gngdb commented Feb 16, 2022

I added some example code, sample data and steps for how to use the transfer_model utility. Also, I updated the install instructions based on my experience, which should keep working for a bit longer.

Also, I cleaned up joint_names.py and added a class to make it easier to convert between SMPL and SMPL-H joint names, which is faster and more convenient than running the transfer_model.py utility when converting between those two body models. Although, it may not be preferred because I think two hand joints get dropped in the conversion instead of getting matched to the set of hand joints in SMPL-H, is that right?

Body class usage is based on scipy.spatial.transform.Rotation. If we have some body pose data x in SMPL format (rotational formalism doesn't matter) that is an array of shape (number of joints, number of rotational dimensions), convert it to SMPL-H array y: y = Body.from_smpl(x).as_smplh().

This pull request would address #75, #82 and other issues.

@@ -142,7 +142,9 @@ def __init__(
shapedirs = data_struct.shapedirs
if (shapedirs.shape[-1] < self.SHAPE_SPACE_DIM):
print(f'WARNING: You are using a {self.name()} model, with only'
' 10 shape coefficients.')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vchoutas
Copy link
Owner

@gngdb can you update the description for the Trust NCG optimizer? I fixed the packaging in that repo, so the rollback is no longer needed.
The two hand joints that are dropped don't have a correspondence in SMPL+H, so no harm done.
Thank you for the pull request!

@vchoutas vchoutas merged commit 0c40fcf into vchoutas:master Sep 8, 2022
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

Successfully merging this pull request may close these issues.

2 participants