Home

Awesome

TransTrack: Multiple Object Tracking with Transformer

License: MIT

Introduction

TransTrack: Multiple Object Tracking with Transformer

Updates

MOT challenge

DatasetMOTA%IDF1%MOTP%MT%ML%FPFNIDS
MOT1774.563.980.646.811.3283231121373663
MOT2064.559.280.049.113.6285661513773565

Validation set

Training dataTraining timeMOTA%FP%FN%IDs%download
crowdhuman, mot17_half~45h + 1h67.13.129.40.5671mot17_crowdhuman_mot17.pth
crowdhuman~45h56.011.232.30.4560mot17_crowdhuman.pth
mot17_half9h61.93.434.00.7619mot17_mot17.pth

If download link is invalid, models and logs are also available in Github Release and Baidu Drive by code m4iv.

Notes

Demo

<img src="assets/MOT17-11.gif" width="400"/> <img src="assets/MOT17-04.gif" width="400"/>

Installation

The codebases are built on top of Deformable DETR and CenterTrack.

Requirements

Steps

  1. Install and build libs
git clone https://github.com/PeizeSun/TransTrack.git
cd TransTrack
cd models/ops
python setup.py build install
cd ../..
pip install -r requirements.txt
  1. Prepare datasets and annotations
mkdir crowdhuman
cp -r /path_to_crowdhuman_dataset/CrowdHuman_train crowdhuman/CrowdHuman_train
cp -r /path_to_crowdhuman_dataset/CrowdHuman_val crowdhuman/CrowdHuman_val
mkdir mot
cp -r /path_to_mot_dataset/train mot/train
cp -r /path_to_mot_dataset/test mot/test

CrowdHuman dataset is available in CrowdHuman.

python3 track_tools/convert_crowdhuman_to_coco.py

MOT dataset is available in MOT.

python3 track_tools/convert_mot_to_coco.py
  1. Pre-train on crowdhuman
sh track_exps/crowdhuman_train.sh
python3 track_tools/crowdhuman_model_to_mot.py

The pre-trained model is available crowdhuman_final.pth.

  1. Train TransTrack
sh track_exps/crowdhuman_mot_trainhalf.sh
  1. Evaluate TransTrack
sh track_exps/mot_val.sh
sh track_exps/mota.sh
  1. Visualize TransTrack
python3 track_tools/txt2video.py

Test set

Pre-training dataFine-tuning dataTraining timeMOTA%FPFNIDs
crowdhumanmot17~40h + 2h68.4221371520643942
crowdhumancrowdhuman + mot17~40h + 6h74.5283231121373663

Notes

Steps

  1. Train TransTrack
sh track_exps/crowdhuman_mot_train.sh

or

  1. Mix crowdhuman and mot17
mkdir -p mix/annotations
cp mot/annotations/val_half.json mix/annotations/val_half.json
cp mot/annotations/test.json mix/annotations/test.json
cd mix
ln -s ../mot/train mot_train
ln -s ../crowdhuman/CrowdHuman_train crowdhuman_train
cd ..
python3 track_tools/mix_data.py
  1. Train TransTrack
sh track_exps/crowdhuman_plus_mot_train.sh

License

TransTrack is released under MIT License.

Citing

If you use TransTrack in your research or wish to refer to the baseline results published here, please use the following BibTeX entries:


@article{transtrack,
  title   =  {TransTrack: Multiple-Object Tracking with Transformer},
  author  =  {Peize Sun and Jinkun Cao and Yi Jiang and Rufeng Zhang and Enze Xie and Zehuan Yuan and Changhu Wang and Ping Luo},
  journal =  {arXiv preprint arXiv: 2012.15460},
  year    =  {2020}
}