CenterTrack icon indicating copy to clipboard operation
CenterTrack copied to clipboard

How to use mot17_fulltrain.pth model to track video?

Open yandongwei opened this issue 4 years ago • 6 comments

When I use the below command : python demo.py tracking --load_model ../models/coco_tracking.pth --demo ../videos/test.avi It works well.

But when I want to use mot17_fulltrain.pth model ,I use this command : python demo.py tracking --load_model ../models/mot17_fulltrain.pth --demo ../videos/test.avi the output images all have no boxes !

yandongwei avatar Apr 06 '20 13:04 yandongwei

The same problem!

biubug6 avatar Apr 07 '20 04:04 biubug6

That's a good question. I haven't tested it yet but it is expected. In my point of view, the mot models are overfitted to street video surveillant scenes and not generalizable to general domains. You can try the crowdhuman model to see if it is better for your data.

xingyizhou avatar Apr 10 '20 15:04 xingyizhou

It works well.

python demo.py tracking --load_model ../models/coco_tracking.pth --demo ../videos/video.mp4

I also tried the mot17_fulltrain and crowdhuman, and the output images have no boxes. Commands are below.

python demo.py tracking --load_model ../models/mot17_fulltrain.pth --demo ../videos/video.mp4
python demo.py tracking --load_model ../models/crowdhuman.pth --demo ../videos/video.mp4

hampen2929 avatar Apr 12 '20 05:04 hampen2929

I found the cause of this problem.
when I run:

python demo.py tracking --load_model ../models/crowdhuman.pth --demo ../videos/mytest.mp4

The output prompts that the weights and structure of the model do not match.

loaded ../models/crowdhuman.pth, epoch 140
Skip loading parameter hm.2.weight, required shapetorch.Size([80, 256, 1, 1]), loaded shapetorch.Size([1, 256, 1, 1]).
Skip loading parameter hm.2.bias, required shapetorch.Size([80]), loaded shapetorch.Size([1]).

Modify init function in opts.py

        #train_dataset = default_dataset_info[opt.task] \
        #  if opt.task in default_dataset_info else 'coco'
        train_dataset = opt.dataset

Then run

python demo.py tracking  --dataset crowdhuman --load_model ../models/crowdhuman.pth --demo ../videos/mytest.mp4 

It's OK.

dutxubo avatar Apr 24 '20 07:04 dutxubo

Hello I want to know an exact command to test demo with the pre-trained model mot17_fulltrain.pth Thanks

rose-jinyang avatar May 15 '20 17:05 rose-jinyang

I found the cause of this problem. when I run:

python demo.py tracking --load_model ../models/crowdhuman.pth --demo ../videos/mytest.mp4

The output prompts that the weights and structure of the model do not match.

loaded ../models/crowdhuman.pth, epoch 140
Skip loading parameter hm.2.weight, required shapetorch.Size([80, 256, 1, 1]), loaded shapetorch.Size([1, 256, 1, 1]).
Skip loading parameter hm.2.bias, required shapetorch.Size([80]), loaded shapetorch.Size([1]).

Modify init function in opts.py

        #train_dataset = default_dataset_info[opt.task] \
        #  if opt.task in default_dataset_info else 'coco'
        train_dataset = opt.dataset

Then run

python demo.py tracking  --dataset crowdhuman --load_model ../models/crowdhuman.pth --demo ../videos/mytest.mp4 

It's OK.

I modify the init function in opts.py. and then use the command. python demo.py tracking --dataset mot --load_model ../models/crowdhuman.pth --demo ../videos/mytest.mp4 I get some results,but it's not good!

csdingithub avatar Nov 22 '21 01:11 csdingithub