StrongSORT: Make DeepSORT Great Again

Overview

StrongSORT

StrongSORT: Make DeepSORT Great Again

MOTA-IDF1-HOTA

StrongSORT: Make DeepSORT Great Again

Yunhao Du, Yang Song, Bo Yang, Yanyun Zhao

arxiv 2202.13514

Abstract

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.

vs. SOTA

comparison

Data&Model Preparation

  1. Download MOT17 & MOT20 from the official website.

    path_to_dataset/MOTChallenge
    ├── MOT17
    	│   ├── test
    	│   └── train
    └── MOT20
        ├── test
        └── train
    
  2. Download our prepared data

    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
    
  3. Set the paths of your dataset and other files in "opts.py", i.e., root_dataset, path_AFLink, dir_save, dir_dets, path_ECC.

Requirements

  • Python3.6
  • torch 1.7.0 + torchvision 0.8.0

Tracking

  • 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 MOT17 test --BoT --ECC --NSA --EMA --MC --woC --AFLink --GSI
  • Run StrongSORT++ on MOT20-test

    python strong_sort.py MOT20 val --BoT --ECC --NSA --EMA --MC --woC --AFLink --GSI

Note

  • To evaluate the tracking results, we recommend using the official code.
  • You can also try to apply AFLink and GSI to other trackers.
  • Tuning the hyperparameters carefully would brings better performance.

Citation

@misc{2202.13514,
Author = {Yunhao Du and Yang Song and Bo Yang and Yanyun Zhao},
Title = {StrongSORT: Make DeepSORT Great Again},
Year = {2022},
Eprint = {arXiv:2202.13514},
}

Acknowledgement

A large part of the codes, ideas and results are borrowed from DeepSORT, JDE, YOLOX and ByteTrack. Thanks for their excellent work!

Comments
  • Customising For different detectors

    Customising For different detectors

    Hi @YunhaoDu @dyhBUPT

    Thanks for sharing the works. Can this tracker be used with different detectors like YoloX? When I go through your code I can see you are loading detection's from a numpy file, I can see you are loading bbox, conf and features, whether features are required by your tracker? Can you list the steps in brief for configuring this tracker with different detectors and what are the inputs required by the tracking module from the detector?

    good first issue 
    opened by navaravan 6
  • GSI in online manner and feature extraction from different models?

    GSI in online manner and feature extraction from different models?

    Hi, Thanks for the great work on the top of deepsort. I have couple of questions regarding GSI and feature extraction which are:

    1. For GSI, do I need to store the tracking results from any trackor in .txt file and then apply GSI? or can I use it after I get the tracking results in an online manner?

    2. For feature extraction, I see you use ReID models, but if my videos are not RGB and based of grayscale frames. Is is possible to use the detector model as feature extractor? What do you suggest which model might be good enough for appearance feature. I don't have ground truth person ids so I want the trackor to work in an online setting.

    opened by abdullahjamal 5
  • Yolov5DeepSORTwithOSNet vs Yolov5StrongSORTwithOSNet ablation study on MOT16

    Yolov5DeepSORTwithOSNet vs Yolov5StrongSORTwithOSNet ablation study on MOT16

    Just though somebody could find this interesting. I use a modest Yolov5m as object detector:

    Yolov5DeepSORTwithOSNet

    HOTA: rep_1280-pedestrian          HOTA      DetA      AssA      DetRe     DetPr     AssRe     AssPr     LocA      RHOTA     HOTA(0)   LocA(0)   HOTALocA(0)
    COMBINED                           51.286    50.839    52.219    55.475    75.31     56.777    78.178    81.874    53.742    66.59     76.683    51.063    
    CLEAR: rep_1280-pedestrian         MOTA      MOTP      MODA      CLR_Re    CLR_Pr    MTR       PTR       MLR       sMOTA     CLR_TP    CLR_FN    CLR_FP    IDSW      MT        PT        ML        Frag           
    COMBINED                           59.955    79.281    60.364    67.013    90.974    32.495    47.002    20.503    46.07     73987     36420     7341      452       168       243       106       2243      
    Identity: rep_1280-pedestrian      IDF1      IDR       IDP       IDTP      IDFN      IDFP       
    COMBINED                           64.31     55.841    75.807    61652     48755     19676     
    

    Yolov5StrongSORTwithOSNet (ecc)

    HOTA: rep_1280_ecc-pedestrian      HOTA      DetA      AssA      DetRe     DetPr     AssRe     AssPr     LocA      RHOTA     HOTA(0)   LocA(0)   HOTALocA(0)
    COMBINED                           51.466    50.976    52.455    55.616    75.439    56.993    78.435    81.965    53.928    66.705    76.815    51.239    
    
    CLEAR: rep_1280_ecc-pedestrian     MOTA      MOTP      MODA      CLR_Re    CLR_Pr    MTR       PTR       MLR       sMOTA     CLR_TP    CLR_FN    CLR_FP    IDSW      MT        PT        ML        Frag         
    COMBINED                           60.054    79.382    60.462    67.093    91.006    32.689    47.195    20.116    46.221    74075     36332     7321      450       169       244       104       2246      
    
    Identity: rep_1280_ecc-pedestrian  IDF1      IDR       IDP       IDTP      IDFN      IDFP      
    COMBINED                           64.399    55.938    75.876    61760     48647     19636  
    

    Yolov5StrongSORTwithOSNet (ecc + woc)

    HOTA: rep_1280_ecc_woc-pedestrian  HOTA      DetA      AssA      DetRe     DetPr     AssRe     AssPr     LocA      RHOTA     HOTA(0)   LocA(0)   HOTALocA(0)
    COMBINED                           51.458    50.914    52.476    55.591    75.301    57.536    77.498    81.906    53.934    66.897    76.706    51.314    
    
    CLEAR: rep_1280_ecc_woc-pedestrian MOTA      MOTP      MODA      CLR_Re    CLR_Pr    MTR       PTR       MLR       sMOTA     CLR_TP    CLR_FN    CLR_FP    IDSW      MT        PT        ML        Frag         
    COMBINED                           60.069    79.378    60.532    67.179    90.997    32.108    47.582    20.309    46.215    74170     36237     7338      512       166       246       105       2288      
    
    Identity: rep_1280_ecc_woc-pedestrianIDF1      IDR       IDP       IDTP      IDFN      IDFP        
    COMBINED                           64.942    56.443    76.455    62317     48090     19191
    

    Yolov5StrongSORTwithOSNet (ecc + woc + nsa)

    HOTA: rep_1280_ecc_woc_nsa-pedestrianHOTA      DetA      AssA      DetRe     DetPr     AssRe     AssPr     LocA      RHOTA     HOTA(0)   LocA(0)   HOTALocA(0)
    COMBINED                           51.521    50.654    52.851    55.268    74.918    57.776    77.45     81.545    53.98     67.309    76.301    51.357    
    
    CLEAR: rep_1280_ecc_woc_nsa-pedestrianMOTA      MOTP      MODA      CLR_Re    CLR_Pr    MTR       PTR       MLR       sMOTA     CLR_TP    CLR_FN    CLR_FP    IDSW      MT        PT        ML        Frag            
    COMBINED                           59.975    78.905    60.416    67.094    90.948    30.948    48.936    20.116    45.822    74076     36331     7373      486       160       253       104       2190      
    
    Identity: rep_1280_ecc_woc_nsa-pedestrianIDF1      IDR       IDP       IDTP      IDFN      IDFP         
    COMBINED                           65.139    56.597    76.719    62487     47920     18962
    

    Yolov5StrongSORTwithOSNet (ecc + woc + nsa + ema)

    HOTA: rep_1280_ecc_woc_nsa_ema-pedestrianHOTA      DetA      AssA      DetRe     DetPr     AssRe     AssPr     LocA      RHOTA     HOTA(0)   LocA(0)   HOTALocA(0)
    COMBINED                           52.897    51.039    55.381    55.638    75.538    60.179    79.446    81.967    55.407    68.425    76.875    52.602    
    
    CLEAR: rep_1280_ecc_woc_nsa_ema-pedestrianMOTA      MOTP      MODA      CLR_Re    CLR_Pr    MTR       PTR       MLR       sMOTA     CLR_TP    CLR_FN    CLR_FP    IDSW      MT        PT        ML        Frag          
    COMBINED                           60.217    79.392    60.696    67.176    91.203    31.915    47.969    20.116    46.373    74167     36240     7154      529       165       248       104       2185      
    
    Identity: rep_1280_ecc_woc_nsa_ema-pedestrianIDF1      IDR       IDP       IDTP      IDFN      IDFP         
    COMBINED                           66.877    58.068    78.837    64111     46296     17210
    

    Yolov5StrongSORTwithOSNet (ecc + woc + nsa + ema + mc)

    HOTA: rep_1280_ecc_woc_nsa_mc_ema-pedestrianHOTA      DetA      AssA      DetRe     DetPr     AssRe     AssPr     LocA      RHOTA     HOTA(0)   LocA(0)   HOTALocA(0)
    
    COMBINED                           52.784    51.111    55.072    55.625    75.742    59.143    81.179    82.009    55.244    67.947    77.086    52.377    
    
    CLEAR: rep_1280_ecc_woc_nsa_mc_ema-pedestrianMOTA      MOTP      MODA      CLR_Re    CLR_Pr    MTR       PTR       MLR       sMOTA     CLR_TP    CLR_FN    CLR_FP    IDSW      MT        PT        ML        Frag          
    COMBINED                           60.174    79.416    60.646    67.043    91.289    31.721    47.969    20.309    46.373    74020     36387     7063      521       164       248       105       2106      
    
    Identity: rep_1280_ecc_woc_nsa_mc_ema-pedestrianIDF1      IDR       IDP       IDTP      IDFN      IDFP          
    COMBINED                           66.425    57.604    78.437    63599     46808     17484 
    

    So, in conclusion:

    Yolov5 + StrongSORT with OSNet (with BoT (OSNet), ECC, NSA, EMA, MC, woC and no AFLink nor GSI as it is only intended to be used online)

    HOTA: 52.784 (+1.498)
    MOTA: 60.174 (+0.219)
    IDF1: 66.425 (+2.115)
    

    Yolov5 + DeepSORT with OSNet

    HOTA: 51.286
    MOTA: 59.955
    IDF1: 64.31
    

    Small boost on all major metrics :smile:

    Good Contributions 
    opened by mikel-brostrom 5
  • Code for get detection+features

    Code for get detection+features

    Hello Sir,

    My name is Tuan, I'm currently researching MOT. Can you give me the code for extract detection+features in part 2 of Data & Model Preparation?

    Thank you and best regards, Tuan

    good first issue 
    opened by vovantuan1999a 5
  • implementation with detection model

    implementation with detection model

    is there any manual how to run on test videos, and is there any implementation to integrate strongsort++ with any object detetction model like yolov5 . if there is please share it will be helpfiul.

    opened by prsnkmr 4
  • About ECC

    About ECC

    Excuse me, under what conditions will ECC work better? If a camera rotates and the focus changes, is it applicable? In addition, does ECC mean image alignment technology?

    opened by YuNaruto 4
  • FPS calculation

    FPS calculation

    Hi @dyhBUPT @YunhaoDu While going through the repo I can see you have calculated the FPS on MOT17 dataset, can you list down the steps to calculate FPS on MOT17 dataset?

    opened by navaravan 4
  • Will codes for ECC be released?

    Will codes for ECC be released?

    Thanks for your amazing work!

    But now you have only provided results of ECC in json format. I was wondering whether the codes to get ECC results will be released?

    Best wishes.

    enhancement 
    opened by HanGuangXin 4
  • 关于ecc生成json文件的问题

    关于ecc生成json文件的问题

    您好,您做了一项非常棒的工作,我目前正在学习您的代码。我在生成ECC文件时,出现了一个这样的错误,我不知道如何解决,请您赐教。愿您能回复我,best wishes to you! image

    cv2.error: OpenCV(4.6.0) /io/opencv/modules/video/src/ecc.cpp:589: error: (-7:Iterations do not converge) The algorithm stopped before its convergence. The correlation is going to be minimized. Images may be uncorrelated or non-overlapped in function 'findTransformECC'

    opened by godHhh 3
  • ID is switch

    ID is switch

    Hello, I have a problem recently. Is there a better solution?

    1. Gray color is the shelter
    2. Green color is the tracking target
    3. Image frame from 1 to 5
    4. The direction of the arrow is to track the moving direction of the object

    Problem: for blocked objects, the tracking frame suddenly changes position, and the ID changes

    The first three frames can be tracked, but the tracking frame is located on the right side of the occlusion (only the exposed part of the green tracking object).

    In the fourth frame, the tracking target is completely occluded.

    In frame 5, the left part of the tracking object is exposed, but the tracking ID is switched.

    This may be because although the first three frames are tracked, the tracking position basically does not change, and then the fifth frame suddenly appears on the left side of the occlusion, resulting in the failure to correlate the Kalman prediction results with the detection results.

    image

    Algorithm Discussions 
    opened by YuNaruto 3
  • Is the class id used during tracking?

    Is the class id used during tracking?

    Hi, thanks for your implementation. I was wondering if the class id provided by yolo is used in any way during the tracking. I saw, that the id is stored for each track but I am not sure if it is actually used, e.g. to only match boxes of the same class id?

    Also, is it possible to output the class id in the final text file output, i.e. the tracking results.

    opened by Legor 3
  • Is AFLink not possible to apply on MOT test sequences ?

    Is AFLink not possible to apply on MOT test sequences ?

    im getting bellow error when the code is run on test sequences, kindly suggest how to run AFLink and GSI on MOT test sequences.

    gts = gts[(gts[:, 6] == 1) * (gts[:, 7] == 1)] # 仅考虑“considered" & "pedestrian" IndexError: index 7 is out of bounds for axis 1 with size 7

    opened by ssbilakeri 1
Owner
null
RepVGG: Making VGG-style ConvNets Great Again

This repository is the code that needs to be submitted for OpenMMLab Algorithm Ecological Challenge,the paper is RepVGG: Making VGG-style ConvNets Great Again

Ty Feng 62 May 21, 2022
Yolov5 deepsort inference,使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中

使用YOLOv5+Deepsort实现车辆行人追踪和计数,代码封装成一个Detector类,更容易嵌入到自己的项目中。

null 813 Dec 31, 2022
yolov5 deepsort 行人 车辆 跟踪 检测 计数

yolov5 deepsort 行人 车辆 跟踪 检测 计数 实现了 出/入 分别计数。 默认是 南/北 方向检测,若要检测不同位置和方向,可在 main.py 文件第13行和21行,修改2个polygon的点。 默认检测类别:行人、自行车、小汽车、摩托车、公交车、卡车。 检测类别可在 detect

null 554 Dec 30, 2022
Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.

Object tracking implemented with YOLOv4, DeepSort, and TensorFlow. YOLOv4 is a state of the art algorithm that uses deep convolutional neural networks to perform object detections. We can take the output of YOLOv4 feed these object detections into Deep SORT (Simple Online and Realtime Tracking with a Deep Association Metric) in order to create a highly accurate object tracker.

The AI Guy 1.1k Dec 29, 2022
using yolox+deepsort for object-tracker

YOLOX_deepsort_tracker yolox+deepsort实现目标跟踪 最新的yolox尝尝鲜~~(yolox正处在频繁更新阶段,因此直接链接yolox仓库作为子模块) Install Clone the repository recursively: git clone --rec

null 245 Dec 26, 2022
Vehicles Counting using YOLOv4 + DeepSORT + Flask + Ngrok

A project for counting vehicles using YOLOv4 + DeepSORT + Flask + Ngrok

Duong Tran Thanh 37 Dec 16, 2022
This project uses reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can learn to read tape. The project is dedicated to hero in life great Jesse Livermore.

Reinforcement-trading This project uses Reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can

Deepender Singla 1.4k Dec 22, 2022
Make a Turtlebot3 follow a figure 8 trajectory and create a robot arm and make it follow a trajectory

HW2 - ME 495 Overview Part 1: Makes the robot move in a figure 8 shape. The robot starts moving when launched on a real turtlebot3 and can be paused a

Devesh Bhura 0 Oct 21, 2022
A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.

imutils A series of convenience functions to make basic image processing functions such as translation, rotation, resizing, skeletonization, and displ

Adrian Rosebrock 4.3k Jan 8, 2023
TransGAN: Two Transformers Can Make One Strong GAN

[Preprint] "TransGAN: Two Transformers Can Make One Strong GAN", Yifan Jiang, Shiyu Chang, Zhangyang Wang

VITA 1.5k Jan 7, 2023
This repo holds code for TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation

TransUNet This repo holds code for TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation Usage

null 1.4k Jan 4, 2023
Make your own game in a font!

Project structure. Included is a suite of tools to create font games. Tutorial: For a quick tutorial about how to make your own game go here For devel

Michael Mulet 125 Dec 4, 2022
Using python and scikit-learn to make stock predictions

MachineLearningStocks in python: a starter project and guide EDIT as of Feb 2021: MachineLearningStocks is no longer actively maintained MachineLearni

Robert Martin 1.3k Dec 29, 2022
This project is based on RIFE and aims to make RIFE more practical for users by adding various features and design new models

This project is based on RIFE and aims to make RIFE more practical for users by adding various features and design new models. Because improving the PSNR index is not compatible with subjective effects, we hope this part of work and our academic research are independent of each other.

hzwer 190 Jan 8, 2023
Evaluating different engineering tricks that make RL work

Reinforcement Learning Tricks, Index This repository contains the code for the paper "Distilling Reinforcement Learning Tricks for Video Games". Short

Anssi 15 Dec 26, 2022
We will see a basic program that is basically a hint to brute force attack to crack passwords. In other words, we will make a program to Crack Any Password Using Python. Show some ❤️ by starring this repository!

Crack Any Password Using Python We will see a basic program that is basically a hint to brute force attack to crack passwords. In other words, we will

Ananya Chatterjee 11 Dec 3, 2022
This framework implements the data poisoning method found in the paper Adversarial Examples Make Strong Poisons

Adversarial poison generation and evaluation. This framework implements the data poisoning method found in the paper Adversarial Examples Make Strong

null 31 Nov 1, 2022
Framework that uses artificial intelligence applied to mathematical models to make predictions

LiconIA Framework that uses artificial intelligence applied to mathematical models to make predictions Interface Overview Table of contents [TOC] 1 Ar

null 4 Jun 20, 2021
Make a surveillance camera from your raspberry pi!

rpi-surveillance Make a surveillance camera from your Raspberry Pi 4! The surveillance is built as following: the camera records 10 seconds video and

Vladyslav 62 Feb 3, 2022