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

3D Joints from Vertecies #18

Closed
Daewon-Hwang opened this issue Jan 8, 2020 · 3 comments
Closed

3D Joints from Vertecies #18

Daewon-Hwang opened this issue Jan 8, 2020 · 3 comments

Comments

@Daewon-Hwang
Copy link

Hello, I have one more question

I confirmed that VIBE extract 3D joints, vertecies, shapes, betas, etc.

But what I want is 3D joints in the original SMPL format (see link below).

https://khanhha.github.io/assets/images/smpl/joint_locations.png

Your model extract 49 3D Joints, but it looks different from the original SMPL Joint format.

Please advise how I can calculate 3D joints from vertices.

@mkocabas
Copy link
Owner

mkocabas commented Jan 8, 2020

Hi @Daewon-Hwang,

To get SMPL joints you need the original J_regressor which you can find in SMPL pkl files.

Here is a small code snippet showing how to use it:

>>> import pickle as pkl

>>> smpl = pkl.load(open('SMPL_NEUTRAL.pkl', 'rb'), encoding='latin1')

>>> smpl.keys()     
                                                           
dict_keys(['J_regressor_prior', 'f', 'J_regressor', 'kintree_table', 'J',
 'weights_prior', 'weights', 'posedirs', 'pose_training_info', 'bs_style', 
'v_template', 'shapedirs', 'bs_type'])

>>> smpl['J_regressor'].shape # regressor for original 24 SMPL joints                                                                                                
(24, 6890)

>>> joints = smpl['J_regressor'] @ vertices # predicted vertices of shape (6890, 3)

@mkocabas mkocabas closed this as completed Jan 8, 2020
@Daewon-Hwang
Copy link
Author

Thank you very much for the answer.
I obtained a 3D joint as you indicated.
However, these joints are a root-relative joint.

Is there a way to get joints in a global position?

@mkocabas
Copy link
Owner

Is there a way to get joints in a global position?

Unfortunately, VIBE predicts root relative pose only.

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