dk-liang / CLTR

[ECCV 2022] An End-to-End Transformer Model for Crowd Localization
MIT License
88 stars 13 forks source link

How can I use the model trained from JHU-CROWD ++ training set to run video_demo.py #16

Closed sandydf closed 1 year ago

sandydf commented 1 year ago

Thanks for the interesting work! How can I use the model trained from JHU-CROWD ++ training set to run video_demo.py ? I got size dismatch error.

dk-liang commented 1 year ago

Can you share the log?

sandydf commented 1 year ago

Traceback (most recent call last): File "video_demo.py", line 165, in main(params) File "video_demo.py", line 47, in main model.load_state_dict(new_state_dict) File "/home/xxx/anaconda3/envs/CLTR/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1224, 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.query_embed.weight: copying a param with shape torch.Size([500, 256]) from checkpoint, the shape in current model is torch.Size([700, 256]).

dk-liang commented 1 year ago

set "--num_queries 500"