hongsukchoi / TCMR_RELEASE

Official Pytorch implementation of "Beyond Static Features for Temporally Consistent 3D Human Pose and Shape from a Video", CVPR 2021
MIT License
274 stars 39 forks source link

IndexError: The shape of the mask [208] at index 0 does not match the shape of the indexed tensor [39, 85] at index 0 #40

Open Oratacth opened 1 year ago

Oratacth commented 1 year ago

This error occurs when I use TCMR to replace the TemporalEncoder module of the VIBE network. How do I modify the parameters

File "train.py", line 159, in main(cfg) File "train.py", line 151, in main debug_freq=cfg.DEBUG_FREQ, File "D:\PROJECT\VIBE-master\lib\core\trainer.py", line 319, in fit self.train() File "D:\PROJECT\VIBE-master\lib\core\trainer.py", line 193, in train scores=scores File "D:\anaconda\envs\vibe\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "D:\PROJECT\VIBE-master\lib\core\loss.py", line 96, in forward pred_theta = pred_theta[w_smpl] IndexError: The shape of the mask [208] at index 0 does not match the shape of the indexed tensor [1105] at index 0

Oratacth commented 1 year ago

And I would also like to know which function use Score in the TCMR module. In the part of loss,I only found this may use Score :# loss_attention = self.attetion_loss(pred_scores)

hongsukchoi commented 1 year ago

Hi @Oratacth,

I don't understand the first question. You should ask VIBE or debug yourself with a python debugger.

For the second question, please refer to here: https://github.com/hongsukchoi/TCMR_RELEASE/blob/f2fb3eb0a8773d743c3fc7f5dcab6b31ba3f179c/lib/core/loss.py#L32

Oratacth commented 1 year ago

Hi @Oratacth,

I don't understand the first question. You should ask VIBE or debug yourself with a python debugger.

For the second question, please refer to here:

https://github.com/hongsukchoi/TCMR_RELEASE/blob/f2fb3eb0a8773d743c3fc7f5dcab6b31ba3f179c/lib/core/loss.py#L32

Thank you for your reply. In the second question ,Maybe I should put it another way. I saw this class in the loss.py, but I don't understand the affect of Score in this part.

hongsukchoi commented 1 year ago

I don't remember exactly, but it was originally intended to use more information from past and future