PeizeSun / TransTrack

Multiple Object Tracking with Transformer
MIT License
629 stars 109 forks source link

Demo Error #76

Closed LLLehom closed 2 years ago

LLLehom commented 2 years ago

Hello, thank you very much for your work sharing. I encountered a problem when running demo, as follows:

(ttk) lehom@lehom-Ubuntu:~/code/TransTrack-main$ python3 demo.py --video_input scene-0553.mp4 --demo_output output/ --resume crowdhuman_mothalf.pth --with_box_refine
Traceback (most recent call last):
  File "demo.py", line 244, in <module>
    main(args)
  File "demo.py", line 178, in main
    _, _ = model.load_state_dict(checkpoint['model'], strict=False)
  File "/home/lehom/anaconda3/envs/ttk/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1223, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for DeformableDETR:
    size mismatch for query_embed.weight: copying a param with shape torch.Size([300, 512]) from checkpoint, the shape in current model is torch.Size([500, 512]).

Would you have any idea?

LLLehom commented 2 years ago

Find the right demo weights here: https://drive.google.com/drive/folders/1DjPL8xWoXDASrxgsA3O06EspJRdUXFQ-?usp=sharing

THX your fantastic work!