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

bone2skeleton conversion #8

Closed
snitchjinx opened this issue Sep 10, 2020 · 4 comments
Closed

bone2skeleton conversion #8

snitchjinx opened this issue Sep 10, 2020 · 4 comments

Comments

@snitchjinx
Copy link

snitchjinx commented Sep 10, 2020

Hello, thanks for sharing this nice work!

I have a question regarding the bone to skeleton conversion function in ./models/model.py
It seems the joints are shifted from the pelvis joint by offsets of bone lengths, but why is there no horizontal offsets for RKnee, RAnkle, LKnee, and LAnkle. I was expecting something like:

skel_in[:, 2, 0] = -unnorm_bones[:, 0, 0]
skel_in[:, 5, 0] = unnorm_bones[:, 0, 0]
skel_in[:, 3, 0] = -unnorm_bones[:, 0, 0]
skel_in[:, 6, 0] = unnorm_bones[:, 0, 0]

Thanks in advance for consideration!

@Shimingyi
Copy link
Owner

Shimingyi commented Sep 10, 2020

Hello! A good question!

We use this function to convert the bone length to T-skeleton, in here we haven't apply the horizontal offsets on Knees and Ankles because we found this kind of setting will be more similar to various character model, so it's better for skinning and other processes.

20200910150611

But because we only apply positional loss directly in our training, so the model can also converage if you use different setting.

@snitchjinx
Copy link
Author

Thanks!

@longbowzhang
Copy link

Hi @Shimingyi
I am also curious about the bones2skel function in model.py.
I guess this function constructs the skeleton in terms of relative positions based on the following two oberservations.

  • skel_in[:, 2, 1] = -unnorm_bones[:, 0, 1] means the position of RKnee is unnorm_bones[:, 0, 1] below (i.e., negative y-axis) its parent joint RHip, and there is no horizontal offset w.r.t RHip.
  • as shown in the function of transforms_global in model_zoo.py, the positions (i.e., the constructed skeleton) is first used to build locals.

But I would like to double check with you about bones2skel whether it expresses the t-pose skeleton in terms of relative positions or absolute positions.

Many thanks.

@Shimingyi
Copy link
Owner

Hi@longbowzhang ,

You are right, it's not the absolute position in a 3d space. Each value is the relative position compared to its parent joint.
This code can help you to undersantd it better: get_skel

Best,
Mingyi

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

3 participants