SMILEtrack: SiMIlarity LEarning for Multiple Object Tracking
Yu-Hsiang Wang, Jun-Wei Hsieh, Ping-Yang Chen, Ming-Ching Chang, Hung Hin So, Xin Li
Our paper was accepted by AAAI 2024
- The directory "SMILEtrack_Official" contains the latest version of SMILEtrack.
- The directory "BoT-SORT" contains the older version of SMILEtrack.
This code is based on the implementation of ByteTrack, BoT-SORT
2024/01:
- Borrowed and reorganized the latest version of SMILEtrack from the SMILE_track official and filled in the missing components.
- Added more detailed guidance in the README.
- Method to reproduce Benchmark Score (Currently in progress)
SMILEtrack code is based on ByteTrack and BoT-SORT
Visit their installation guides for more setup options.
PRBNet MOT17 weight link
PRBNet MOT20 weight link
SLM weight link
Download MOT17 from the official website. And put them in the following structure:
<dataets_dir>
│
├── MOT17
│ ├── train
│ └── test
└——————crowdhuman
| └——————Crowdhuman_train
| └——————Crowdhuman_val
| └——————annotation_train.odgt
| └——————annotation_val.odgt
└——————MOT20
| └——————train
| └——————test
└——————Cityscapes
└——————images
└——————labels_with_ids
Single GPU training
cd <prb_dir>
$ python train_aux.py --workers 8 --device 0 --batch-size 4 --data data/mot.yaml --img 1280 1280 --cfg cfg/training/PRB_Series/yolov7-PRB-2PY-e6e-tune-auxpy1.yaml --weights './yolov7-prb-2py-e6e.pt' --name yolov7-prb --hyp data/hyp.scratch.p6.yaml --epochs 100
<dataets_dir>
├─A
├─B
├─label
└─list
A: images of t1 phase;
B: images of t2 phase;
label: label maps;
list: contains train.txt, val.txt and test.txt, each file records the image names (XXX.png) in the change detection dataset.
For the more detail of the training setting, you can follow BIT_CD training code.
By submitting the txt files produced in this part to MOTChallenge website and you can get the same results as in the paper. Tuning the tracking parameters carefully could lead to higher performance. In the paper we apply ByteTrack's calibration.
cd <SMILEtrack_Official-main/prb>
$ python3 test_track_prb.py --source <dataets_dir/MOT17> --with-reid --benchmark "MOT17" --eval "test" --fp16 --fuse
$ python3 tools/interpolation.py --txt_path <path_to_track_result>
To test on MOT20, please change <dataets_dir/MOT17> and --benchmark "MOT17" to <dataets_dir/MOT20> and --benchmark "MOT20"
You can apply SMILEtrack on your own detector weights and track on image or video.
Run SMILEtrack with PRBnet:
cd SMILEtrack_Official/prb
$ python3 smiletrack_demo_prb.py --weights <path_to_prb_weights> --source <path_to_images/video> --project <save_result_dir>
Run SMILEtrack with yolov7:
cd SMILEtrack_Official/yolov7
$ python3 smiletrack_demo_yolov7.py --weights <path_to_yolov7_weights> --source <path_to_images/video> --project <save_result_dir>
If your detector code is similar to the yolo series, You can add "SMILEtrack_Official/tracker" into your detector directory and modify the example code(like smiletrack_demo_prb.py) to apply SMILEtrack on your detector.
The key code to insert SMILEtrack into your detector prediction code is as follows:
from tracker.mc_SMILEtrack import SMILEtrack
tracker = SMILEtrack(args)
for image in images:
dets = detector(image)
online_targets = tracker.update(dets, info_imgs)
Tracker | MOTA | IDF1 | HOTA |
---|---|---|---|
SMILEtrack | 81.06 | 80.5 | 65.28 |
Tracker | MOTA | IDF1 | HOTA |
---|---|---|---|
SMILEtrack | 78.19 | 77.53 | 65.28 |
A large part of the codes, ideas and results are borrowed from PRBNet, ByteTrack, BoT-SORT, yolov7, thanks for their excellent work!