-
Notifications
You must be signed in to change notification settings - Fork 67
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
How to get 3d joints from demo.py and visualize it #36
Comments
Thanks for your reply. I tried as you recommended but ran into a problem. Specifically, I tried running the following: import smplx
model = smplx.create(model_path, model_type='smpl')
output = model(betas=torch.Tensor(a), body_pose=torch.Tensor(b).reshape(1, 24, 9), pose2rot=False) here >>> a.shape
(1, 10)
>>> b.shape
(1, 24, 3, 3) I get the following error (which is probably a shapes mismatch issue here). Any recommendations on a simplest working example with result = self.forward(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/site-packages/smplx/body_models.py", line 364, in forward
full_pose = torch.cat([global_orient, body_pose], dim=1)
RuntimeError: invalid argument 0: Tensors must have same number of dimensions: got 2 and 3 at /pytorch/aten/src/TH/generic/THTensor.cpp:603
|
Hey are there any updates on this? Did you figure out a way to extract the 3D position of each of the joints? |
I am interested in obtaining joints from the inferred SMPL image and visualize it similar to described in README of this project: https://github.com/gulvarol/smplpytorch.
I changed
GraphCMR/demo.py
Line 118 in 4e57dca
pred_vertices, pred_vertices_smpl, pred_camera, smpl_pose, smpl_shape = model(...)
to getsmpl_pose
(of shapetorch.Size([1, 24, 3, 3])
). Then I just flattened it by doingsmpl_pose.cpu().data.numpy()[:, :, :, -1].flatten('C').reshape(1, -1)
and used the resulting(1, 72)
pose params as input in pose_params variable of smplpytorch demo.The resulting visualization doesn't look correct to me. Is this the right approach? Perhaps there is an easier way to do what I am doing.
The text was updated successfully, but these errors were encountered: