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

vp.decode ouputs NAN values... any help? #43

Open
IlkwonHong opened this issue Oct 22, 2021 · 6 comments
Open

vp.decode ouputs NAN values... any help? #43

IlkwonHong opened this issue Oct 22, 2021 · 6 comments

Comments

@IlkwonHong
Copy link

IlkwonHong commented Oct 22, 2021

I am using cvpr19 branch, cuda10.0, pytorch 1.1.0, and windows11

I downloaded trained model and smplx model from smplify-x repo

For my case I cannot run any of given jupyter tutorial

from below code

#Sample a 32 dimentional vector from a Normal distribution
poZ_body_sample = torch.from_numpy(np.random.randn(1,32).astype(np.float32)).to('cuda')
pose_body = vp.decode(poZ_body_sample, output_type='aa').view(-1, 63)

print('poZ_body_sample.shape', poZ_body_sample.shape)
print('pose_body.shape', pose_body.shape)

images = render_smpl_params(bm, pose_body).reshape(1,1,1,400,400,3)
img = imagearray2file(images)
show_image(np.array(img)[0])

i got some nan values for pose_body as below

tensor([[    nan,     nan,     nan,  0.0290, -0.2194, -0.3330,  0.0783,  0.0997,
         -0.0150,     nan,     nan,     nan,     nan,     nan,     nan,     nan,
             nan,     nan, -0.0117,  0.1610, -0.0294,     nan,     nan,     nan,
             nan,     nan,     nan,     nan,     nan,     nan,     nan,     nan,
             nan,     nan,     nan,     nan,  0.0286,  0.0723, -0.4455, -0.0173,
          0.0512,  0.3359,     nan,     nan,     nan,  0.0081, -0.1747, -0.9129,
          0.0860,  0.3054,  0.8218, -0.0635, -0.8694,  0.3641,  0.0156,  1.1161,
         -0.2180,     nan,     nan,     nan,     nan,     nan,     nan]],
       device='cuda:0', grad_fn=<ViewBackward>)

what is wrong with this?

@SoftwareDevJake
Copy link

I'm having the same problem, any solution?

@IlkwonHong
Copy link
Author

IlkwonHong commented Nov 19, 2021

I updated the vposer with recent version at it worked

and you should change some code like

From

body_pose = vposer.decode(
pose_embedding, output_type='aa').view(1, -1) if use_vposer else None

To

body_pose = (vposer.decode(pose_embedding).get('pose_body')).reshape(1, -1) if use_vposer else None

@SoftwareDevJake
Copy link

SoftwareDevJake commented Nov 23, 2021

What do you mean by undating to recent version? Do you mean I re-clone the git repository? and by the way, in the torchgeometry/core/conversions.py file, if i change the line 272, "mask_d2 = rmat_t[:, 2, 2] < eps" to "mask_d2 = rmat_t[:, 2, 2] > eps", it works for the vposer example, but when I try it in smplify-x, all the pictures get nan value from fitting stage 2. Have you tried it?

@IlkwonHong
Copy link
Author

IlkwonHong commented Nov 23, 2021

I'm not sure about what I've done to solve this problem.
What I remember is I got those errors when I cloned the cvpr19 branch.
I re-clone the repo with master branch, and downloaded ==VPoser v2.0== from https://smpl-x.is.tue.mpg.de/download.php
which will be used as --vposer_ckpt in smplify-x command args

I was so stressed solving this problem so I forgot most of the process

If this doesn't works for you I can send you my files

@SoftwareDevJake
Copy link

SoftwareDevJake commented Nov 23, 2021

It'd be helpful if I check your code as well.
Can you send it to my email : [email protected]
And Thanks for you help.
Also, have you completed with smplify-x? Would you be able to help me since I'm stucked..?
If you're a Korean, we can make a phone call if you don't mind for easy comunication
Even if you are not a Korean, we can still communicate on the phone through snapchat if you don't mind

@IlkwonHong
Copy link
Author

IlkwonHong commented Nov 23, 2021 via email

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