0

I was going through the POSA repository to find the contact vertices of SMPL body and scene. Link to POSA GitHub repository

Traceback (most recent call last):
  File "src/affordance.py", line 105, in <module>
    vertices_org, vertices_can, faces_arr, body_model, R_can, pelvis, torch_param, vertices_clothed = data_utils.pkl_to_canonical(
  File "<path>/POSA/src/data_utils.py", line 83, in pkl_to_canonical
    body_model.reset_params(**torch_param)
  File "<path>/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File “<path>/lib/python3.8/site-packages/smplx-0.1.28-py3.8.egg/smplx/body_models.py", line 289, in reset_params
RuntimeError: The expanded size of the tensor (16) must match the existing size (10) at non-singleton dimension 1.  Target sizes: [1, 16].  Tensor sizes: [10]

The above Runtime Error is coming when running the sample commands like:

python src/affordance.py --config cfg_files/contact_semantics.yaml --checkpoint_path $POSA_dir/trained_models/contact_semantics.pt --pkl_file_path $POSA_dir/POSA_rp_poses/rp_aaron_posed_001_0_0.pkl --scene_name MPH16 --render 1 --viz 1 --use_cuda False
python src/gen_rand_samples.py --config cfg_files/contact.yaml --checkpoint_path $POSA_dir/trained_models/contact.pt --pkl_file_path $POSA_dir/POSA_rp_poses/rp_aaron_posed_001_0_0.pkl --render 1 --viz 1 --num_rand_samples 3 

I tried to print the arguments which were being passed into the reset_params function which is torch_param. After looking at the shapes of the tensors in torch_param I tried to truncate tensors to 10 in order to resolve this error but it started giving new error and after going through the code I realised that truncating like this is not a right thing.

0 Answers0