RuntimeError: einsum(): subscript l has size 26 for operand 1 which does not broadcast with previously seen size 20
hi, I'm sorry to trouble you again, but I met a new error, could you help me understand how to fix the bug? thanks a lot!
here is the error:
Namespace(pose_estimation_model_path='./models/hrn_w48_384x288.onnx', contact_model_path='./models/contact_hrn_w32_256x192.onnx', device='cuda', spin_model_path='./models/spin_model_smplx_eft_18.pt', smpl_type='smplx', smpl_model_dir='./models/models/smplx', smpl_mean_params_path='./models/data/smpl_mean_params.npz', essentials_dir='./models/smplify-xmc-essentials', parametrization_path='./models/smplx_parametrization/parametrization.npy', bone_parametrization_path='./models/smplx_parametrization/bone_to_param2.npy', foot_inds_path='./models/smplx_parametrization/foot_inds.npy', save_path='./output', img_path='./data/images', use_contacts=True, use_msc=False, use_natural=True, use_cos=True, use_angle_transf=True, c_mse=0, c_par=10, c_f=1000, c_parallel=100, c_reg=1000, c_cont2d=1, c_msc=17500, fist=None)
D:\software\Anaconda\envs\pytorch39\lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
D:\software\Anaconda\envs\pytorch39\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet50_Weights.IMAGENET1K_V1. You can also use weights=ResNet50_Weights.DEFAULT to get the most up-to-date weights.
warnings.warn(msg)
Traceback (most recent call last):
File "D:\python\sketch2pose\src\pose.py", line 1922, in
spin_step(
File "D:\python\sketch2pose\src\pose.py", line 1374, in spin_step
) = get_pred_and_data(
File "D:\python\sketch2pose\src\pose.py", line 351, in get_pred_and_data
rotmat, betas, camera, smpl_output, zz = get_predictions(
File "D:\python\sketch2pose\src\pose.py", line 335, in get_predictions
smpl_output, rotmat = get_smpl_output(
File "D:\python\sketch2pose\src\pose.py", line 319, in get_smpl_output
smpl_output = smpl(
File "D:\software\Anaconda\envs\pytorch39\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "D:\python\sketch2pose\src\spin\smpl.py", line 199, in forward
smpl_output = super(SMPLX, self).forward(*args, **kwargs)
File "D:\software\Anaconda\envs\pytorch39\lib\site-packages\smplx\body_models.py", line 1242, in forward
vertices, joints, A = lbs(shape_components, full_pose, self.v_template,
File "D:\software\Anaconda\envs\pytorch39\lib\site-packages\smplx\lbs.py", line 209, in lbs
v_shaped = v_template + blend_shapes(betas, shapedirs)
File "D:\software\Anaconda\envs\pytorch39\lib\site-packages\smplx\lbs.py", line 295, in blend_shapes
blend_shape = torch.einsum('bl,mkl->bmk', [betas, shape_disps])
File "D:\software\Anaconda\envs\pytorch39\lib\site-packages\torch\functional.py", line 373, in einsum
return einsum(equation, *_operands)
File "D:\software\Anaconda\envs\pytorch39\lib\site-packages\torch\functional.py", line 378, in einsum
return _VF.einsum(equation, operands) # type: ignore[attr-defined]
RuntimeError: einsum(): subscript l has size 26 for operand 1 which does not broadcast with previously seen size 20
Make sure to follow all the instructions in README.md, especially in the script prepare.sh. Note, that the vesrion of smplx must be installed from git+https://github.com/vchoutas/smplx.git@5fa20519735cceda19afed0beeabd53caef711cd (see requirements.txt. You also need to download SMPL-X model models_smplx_v1_1.zip (830mb).