hongsukchoi / 3DCrowdNet_RELEASE

Official Pytorch implementation of "Learning to Estimate Robust 3D Human Mesh from In-the-Wild Crowded Scenes", CVPR 2022
MIT License
155 stars 15 forks source link

Runtime error in pytorch trying to reproduce 3DCrowdNet demo #25

Closed faichele closed 9 months ago

faichele commented 1 year ago

Hello!

Trying to reproduce the provided demo I get the following error: File "demo.py", line 114, in model.load_state_dict(ckpt['network'], strict=False) File "/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1668, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for DataParallel: size mismatch for module.human_model_layer.th_betas: copying a param with shape torch.Size([1, 10]) from checkpoint, the shape in current model is torch.Size([1, 300]). size mismatch for module.human_model_layer.th_shapedirs: copying a param with shape torch.Size([6890, 3, 10]) from checkpoint, the shape in current model is torch.Size([6890, 3, 300]).

It seems pytorch is failing to load the pretrained 3DCrowdNet model referred to in the README. Does someone have a hint on how to fix this and why this might happen?

My setup: Debian 11 (bullseye) Anaconda version: 22.9.0 Python version in Anaconda environment: 3.7.3 PyTorch version: 1.13.0+cu117

Thank you very much!

hongsukchoi commented 1 year ago

Hi

It's SMPL version mismatch. You are using different SMPL layer. https://githubmemory.com/repo/Jeff-sjtu/HybrIK/issues/24 Use the different pkl file.