mks0601 / I2L-MeshNet_RELEASE

Official PyTorch implementation of "I2L-MeshNet: Image-to-Lixel Prediction Network for Accurate 3D Human Pose and Mesh Estimation from a Single RGB Image", ECCV 2020
MIT License
710 stars 130 forks source link

demo 돌릴때 runtime error 발생. #67

Closed yms9654 closed 3 years ago

yms9654 commented 3 years ago

안녕하세요?

demo.py 실행할때 아래와 같은 에러가 발생합니다.

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]).
  File "/home/ubuntu/workspace/I2L-MeshNet_RELEASE/demo/demo.py", line 73, in <module>
    model.load_state_dict(ckpt['network'], strict=False)

실행 파라미터는 아래와 같습니다.

python demo.py --gpu 0 --stage param --test_epoch 8 

에러 메세지를 보면 코드에 정의되어 있는 torch 사이즈와 체크포인트에서 로드하는 torch 사이즈가 달라서 발생하는 에러 같은데 혹시 원인을 알 수 있을까요?

mks0601 commented 3 years ago

basicModel_neutral_lbs_10_207_0_v1.0.0.pkl을 어디서 다운받으셨나요?

yms9654 commented 3 years ago

그건 smpl 홈페이지에서 받았습니다. neutral은 1.0.0 버전에 없어서 1.1.0 버전을 사용했구요.

그런데 demo.py line 73은 'snapshot_8.pth.tar' 파일 로드 하는 부분일거에요~

yms9654 commented 3 years ago

smpl 모델을 1.0.0 으로 변경하니까 해결이 되네요! 도와주셔서 감사합니다!