- Notifications
You must be signed in to change notification settings - Fork86
[TMM 2023] StrongSORT: Make DeepSORT Great Again
License
dyhBUPT/StrongSORT
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
StrongSORT: Make DeepSORT Great Again
[2022.06.10] "YOLO+OSNet+StrongSORT" is supported inhttps://github.com/mikel-brostrom/Yolov5_StrongSORT_OSNet.
[2022.08.19] StrongSORT has been supported inmmtracking. More details inbranch dev-1.x.
[2022.11.30] The packaged version of StrongSORT is supported (https://pypi.org/project/strongsort/). More details inhttps://github.com/kadirnar/strongsort-pip.
[2023.01.23] The paper "StrongSORT: Make DeepSORT Great Again" is accepted byTMM (IEEE Transactions on Multimedia).
[2023.06.23] StrongSORT available inBoxMOT as a pluggable component for object detectors. More detailshere.
Existing Multi-Object Tracking (MOT) methods can be roughly classified as tracking-by-detection and joint-detection-association paradigms. Although the latter has elicited more attention and demonstrates comparable performance relative to the former, we claim that the tracking-by-detection paradigm is still the optimal solution in terms of tracking accuracy. In this paper, we revisit the classic tracker DeepSORT and upgrade it from various aspects, i.e., detection, embedding and association. The resulting tracker, called StrongSORT, sets new HOTA and IDF1 records on MOT17 and MOT20. We also present two lightweight and plug-and-play algorithms to further refine the tracking results. Firstly, an appearance-free link model (AFLink) is proposed to associate short tracklets into complete trajectories. To the best of our knowledge, this is the first global link model without appearance information. Secondly, we propose Gaussian-smoothed interpolation (GSI) to compensate for missing detections. Instead of ignoring motion information like linear interpolation, GSI is based on the Gaussian process regression algorithm and can achieve more accurate localizations. Moreover, AFLink and GSI can be plugged into various trackers with a negligible extra computational cost (591.9 and 140.9 Hz, respectively, on MOT17). By integrating StrongSORT with the two algorithms, the final tracker StrongSORT++ ranks first on MOT17 and MOT20 in terms of HOTA and IDF1 metrics and surpasses the second-place one by 1.3 - 2.2. Code will be released soon.
Download MOT17 & MOT20 from theofficial website.
path_to_dataset/MOTChallenge├── MOT17│ ├── test│ └── train└── MOT20 ├── test └── train
Download our prepareddata in Google disk (orbaidu disk with code "sort")
path_to_dataspace├── AFLink_epoch20.pth # checkpoints for AFLink model├── MOT17_ECC_test.json # CMC model├── MOT17_ECC_val.json # CMC model├── MOT17_test_YOLOX+BoT # detections + features├── MOT17_test_YOLOX+simpleCNN # detections + features├── MOT17_trainval_GT_for_AFLink # GT to train and eval AFLink model├── MOT17_val_GT_for_TrackEval # GT to eval the tracking results.├── MOT17_val_YOLOX+BoT # detections + features├── MOT17_val_YOLOX+simpleCNN # detections + features├── MOT20_ECC_test.json # CMC model├── MOT20_test_YOLOX+BoT # detections + features├── MOT20_test_YOLOX+simpleCNN # detections + features
Set the paths of your dataset and other files in "opts.py", i.e., root_dataset, path_AFLink, dir_save, dir_dets, path_ECC.
Note: If you want to generate ECC results, detections and features by yourself, please refer to theAuxiliary tutorial.
- pytorch
- opencv
- scipy
- sklearn
For example, we have tested the following commands to create an environment for StrongSORT:
conda create -n strongsort python=3.8 -yconda activate strongsortpip3 install torch torchvision torchaudiopip install opencv-pythonpip install scipypip install scikit-learn==0.19.2
Run DeepSORT on MOT17-val
python strong_sort.py MOT17 val
Run StrongSORT on MOT17-val
python strong_sort.py MOT17 val --BoT --ECC --NSA --EMA --MC --woC
Run StrongSORT++ on MOT17-val
python strong_sort.py MOT17 val --BoT --ECC --NSA --EMA --MC --woC --AFLink --GSI
Run StrongSORT++ on MOT17-test
python strong_sort.py MOT17test --BoT --ECC --NSA --EMA --MC --woC --AFLink --GSI
Run StrongSORT++ on MOT20-test
python strong_sort.py MOT20test --BoT --ECC --NSA --EMA --MC --woC --AFLink --GSI
We use the official codeTrackEval to evaluate the results on the MOT17-val set.To make it easier for you to get started, we provide the MOT17-val annotations onGoogle &Baidu disk, in the folder "MOT17-train".
Please prepare the code and environment of TrackEval first and link the downloaded folder "MOT17-train" with folder "data/gt/mot_challenge" of TrackEval as:
ln -s xxx/MOT17-train xxx/TrackEval/data/gt/mot_challenge
We also provide some tracking results on the disk, in the folder "MOT17-val_results".You can download them, cd to the TrackEval dir and try to evaluate the StrongSORT++ as:
python scripts/run_mot_challenge.py \--BENCHMARK MOT17 \--SPLIT_TO_EVAL train \--TRACKERS_TO_EVAL xxx/MOT17-val_results/StrongSORT++ \--TRACKER_SUB_FOLDER'' \--METRICS HOTA CLEAR Identity VACE \--USE_PARALLEL False \--NUM_PARALLEL_CORES 1 \--GT_LOC_FORMAT'{gt_folder}/{seq}/gt/gt_val_half_v2.txt' \--OUTPUT_SUMMARY False \--OUTPUT_EMPTY_CLASSES False \--OUTPUT_DETAILED False \--PLOT_CURVES False
Note: you may also need to prepare theSEQMAPS
to specify the sequences to be evaluated.
- You can also try to apply AFLink and GSI to other trackers. We would be glad if you could tell us your new results.
- Tuning the hyperparameters carefully would bring better performance.
@article{du2023strongsort, title={Strongsort: Make deepsort great again}, author={Du, Yunhao and Zhao, Zhicheng and Song, Yang and Zhao, Yanyun and Su, Fei and Gong, Tao and Meng, Hongying}, journal={IEEE Transactions on Multimedia}, year={2023}, publisher={IEEE}}
You can also consider reading and citing our related work,GIAOTracker, which won the 2nd place in the VisDrone2021 MOT Challenge of ICCV Workshop:
@InProceedings{Du_2021_ICCV, author = {Du, Yunhao and Wan, Junfeng and Zhao, Yanyun and Zhang, Binyu and Tong, Zhihang and Dong, Junhao}, title = {GIAOTracker: A Comprehensive Framework for MCMOT With Global Information and Optimizing Strategies in VisDrone 2021}, booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops}, month = {October}, year = {2021}, pages = {2809-2819}}
A large part of the codes, ideas and results are borrowed fromDeepSORT,JDE,YOLOX andByteTrack. Thanks for their excellent work!