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 .PKL SMPL Meshes and defining whether to use male or female models #43

Open
nshreyasvi opened this issue Oct 2, 2024 · 4 comments

Comments

@nshreyasvi
Copy link

nshreyasvi commented Oct 2, 2024

Hello, Thank you for the amazing work. I would like to know how can I export the output .npy meshes into .obj, .npz or .pkl format? I would also like to know if the output .pkl file would follow the standard SMPL keys or would the keys be changed? Moreover, is there a way to use Male/Female model and if it can be defined anywhere?

@nshreyasvi nshreyasvi changed the title Exporting .PKL SMPL Meshes Exporting .PKL SMPL Meshes and defining whether to use male or female models. Oct 2, 2024
@nshreyasvi nshreyasvi changed the title Exporting .PKL SMPL Meshes and defining whether to use male or female models. Exporting .PKL SMPL Meshes and defining whether to use male or female models Oct 2, 2024
@fabienbaradel
Copy link
Contributor

Hi @nshreyasvi
Thanks for your interest in our work.

You can save into a .obj file using this code snippet for the first human in the list:

vertices = humans[0]['v3d'].cpu().numpy()
faces = model.smpl_layer['neutral_10'].bm_x.faces
mesh = trimesh.Trimesh(vertices=vertices, faces=faces)
filename = "human_0.obj"
mesh.export(filename)

The mesh follow sthe SMPL-X topology (not SMPL). And we use the neutral model so we cannot choose between male or female at inference time.

@nshreyasvi
Copy link
Author

Hello, Thank you so much. I also wanted to know if the generated meshes are fitted according to the body shape of the person and if it is able to generate meshes accurately using the neural mesh for male and female bodies without using the male and female SMPL-X templates/prompt?

@fabienbaradel
Copy link
Contributor

Hi, the mesh that we are outpouting is gender neutral. So I do not have a precise answer for your question sorry.

@nshreyasvi
Copy link
Author

nshreyasvi commented Oct 30, 2024

Hello,
Thank you so much for the response. I was able to generate the .obj files. However, I currently face the following 2 issues:

  • The output .obj files that are generated have the mesh upside down. Is that normal?
  • I wanted to export the output as SMPL-X pkl files so that I can use the converter provided here to convert them into SMPL files. However, when I checked the output .npy files, I can't see the keys that are needed (betas, body_pose, transl). Do you happen to know how can the output SMPL-X mesh can be saved in the standard format so that it is possible to change it?

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