vchoutas / smplify-x

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image
https://smpl-x.is.tue.mpg.de/
Other
1.77k stars 340 forks source link

fit_smpl-x with gmm prior from "gmm_08.pkl", tensor size mismatch error. #126

Open ShuangjunLiu opened 4 years ago

ShuangjunLiu commented 4 years ago

I ran the code with fit_smplx.yaml with gmm prior. Piror file is from simplify project "gmm_08.pkl".
Test images and keypoints are from ETH evaluation set.
There is a tensor size mismatch error. It seems that the prior mean is too large (69) to fit into the model with (size 63 tensor).

error

Traceback (most recent call last): File "smplifyx/main.py", line 272, in main(*args) File "smplifyx/main.py", line 245, in main fit_single_frame(img, keypoints[[person_id]], File "/scratch/liu.shu/codesPool/smplify-x/smplifyx/fit_single_frame.py", line 319, in fit_single_frame body_model.reset_params(body_pose=body_mean_pose) File "/home/liu.shu/.conda/envs/simplify/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(args, **kwargs) File "/home/liu.shu/.conda/envs/simplify/lib/python3.8/site-packages/smplx/body_models.py", line 270, in reset_params param[:] = torch.tensor(params_dict[param_name]) RuntimeError: The expanded size of the tensor (63) must match the existing size (69) at non-singleton dimension 1. Target sizes: [1, 63]. Tensor sizes: [69]

lawy623 commented 3 years ago

Same question. If we do not use vposer, body_model.reset_params(body_pose=body_mean_pose) will fail since body_mean_pose is with dim=69 rather than 63

xiaofanglegoc commented 3 years ago

hi @ShuangjunLiu I meet the same problem. Do you find any clues to solve this problem?

nnop commented 4 months ago

For vposer, body_mean_pose is 32 dim which is different with 69 dim. Also would got an error. @lawy623