ifzhang / FairMOT

[IJCV-2021] FairMOT: On the Fairness of Detection and Re-Identification in Multi-Object Tracking
MIT License
3.98k stars 936 forks source link

Is there any pre-trained model available based on YOLO model ready to use for demo? #427

Open danishkhan18 opened 3 years ago

danishkhan18 commented 3 years ago

I am trying to use FairMOT on a custom-trained yolov3. I understand this whole process is dependent on dcnv2 for detection, I want to replace it with my custom yolov3 please let me know how can I go about it or if it is possible at all. Thanks, @ifzhang, appreciate your work!

morizin commented 3 years ago

there is a pretrained weight on yolov5 and if you want to include yolov3 itself. guess you may need to change a little in the source code

here is the yolov5 weights and how you can run it https://drive.google.com/file/d/1Ur3_pa9r3KRY-5qM2cdFhFJ5exghRJvh/view?usp=sharing here is the weight download it and run the demo.py command like this

python demo.py mot --load_model fairmot_lite.pth --conf_thres 0.4 --input-video video.mp4 --output-root ./ --arch "yolo"

zengjie617789 commented 2 years ago

I modified this code to use yolov5m, you should select the first and the second output to match the down_ratio. Furthermore, the speed is much faster than DLA-34, but id-swith is frequently changed.

pange1802703882 commented 2 years ago

@zengjie617789 how about MOTA and IDF1?

jimfcarroll commented 2 years ago

there is a pretrained weight on yolov5 and if you want to include yolov3 itself. guess you may need to change a little in the source code python demo.py mot --load_model fairmot_lite.pth --conf_thres 0.4 --input-video video.mp4 --output-root ./ --arch "yolo"

I get these two warnings when I try this "out-of-the-box"

Skip loading parameter id.2.weight, required shapetorch.Size([128, 64, 1, 1]), loaded shapetorch.Size([64, 64, 1, 1]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Skip loading parameter id.2.bias, required shapetorch.Size([128]), loaded shapetorch.Size([64]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.

Am I doing something wrong?

zengjie617789 commented 2 years ago

@jimfcarroll ignore this warnings and it is because the mismatch of the node in ReID classifier. When you start trainning every time, it trained a new ReID classfier which it is not used in inference time instead.

youonlytrackonce commented 1 year ago

I modified this code to use yolov5m, you should select the first and the second output to match the down_ratio. Furthermore, the speed is much faster than DLA-34, but id-swith is frequently changed.

Hello,

would you mind if I ask you where you changed in the code? Do you have pretrained model on MIX dataset?

Thank you!

zengjie617789 commented 1 year ago

@youonlytrackonce

  1. I select one feature map as the ouput which yolov5m model is three;
  2. the most downsample size of yolov5m is 8 and we need 4;
  3. I didnot pretrained model on MIX.