Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCMR missmatch?? #27

Open
codeHorasan opened this issue Jul 7, 2022 · 11 comments
Open

TCMR missmatch?? #27

codeHorasan opened this issue Jul 7, 2022 · 11 comments

Comments

@codeHorasan
Copy link

RuntimeError: Error(s) in loading state_dict for TCMR:
size mismatch for regressor.smpl.shapedirs: copying a param with shape torch.Size([6890, 3, 10]) from checkpoint, the shape in current model is torch.Size([6890, 3, 300]).

Anyone know about this?

@hongsukchoi
Copy link
Owner

I am not sure what your running (demo or test?), but just change the current model to [6890, 3, 10].

@codeHorasan
Copy link
Author

I am running demo, python demo.py --vid_file demo.mp4 with CPU.

I am getting this error after loading pre-trained model from "tcmr_demo_model.pth.tar", at model.load_state_dict

ckpt = ckpt['gen_state_dict']
model.load_state_dict(ckpt, strict=False)

@hongsukchoi
Copy link
Owner

Version mismatch!
#16

You don't have to re-install or downgrade. Just change regressor.smpl.shapedirs to [6890,3,10] dimension

@codeHorasan
Copy link
Author

Thank you for your help but I couldn't find on the code where I should change. It gives the error on TCMR, before even creating the SMPL model but in the error message, it mentions regressor.smpl.shapedirs. I tried to add "shapedirs = [6890,3,10]" to SMPL constructor but as I get the error before that line is compiled.

@hongsukchoi
Copy link
Owner

Then, the easiest way is to match the version. smplx==0.1.13

Or as I said, change the SMPL's shapedirs to 10 here

class SMPL(_SMPL):

@ydl832
Copy link

ydl832 commented Feb 26, 2024

Thank you for your help but I couldn't find on the code where I should change. It gives the error on TCMR, before even creating the SMPL model but in the error message, it mentions regressor.smpl.shapedirs. I tried to add "shapedirs = [6890,3,10]" to SMPL constructor but as I get the error before that line is compiled.

Hello, have you solved this problem? I have the same problem, do you know how to change the code? Thanks.

@niuniuaa
Copy link

感谢您的帮助,但我在代码中找不到应该更改的地方。它在创建 SMPL 模型之前就给出了 TCMR 错误,但在错误消息中,它提到了 regressor.smpl.shapedirs。我尝试将“shapedirs = [6890,3,10]”添加到 SMPL 构造函数中,但在编译该行之前我收到了错误。

你好,你解决了这个问题吗?我也有同样的问题,你知道怎么改代码吗?谢谢。

I have the same problem, have you solved it?

@hongsukchoi
Copy link
Owner

I think you can add this line here:

self.smpl.shapedirs = self.smpl.shapedirs[:, :, :10]

@jiangguangan
Copy link

I have the same problem, have you solved it?

@hongsukchoi
Copy link
Owner

hongsukchoi commented Oct 30, 2024 via email

@hongsukchoi
Copy link
Owner

Which one did you guys download from the SMPL homepage?
It should be this: Download version 1.0.0 for Python 2.7 (female/male. 10 shape PCs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants