Official PyTorch implementation of "Learnable Graph Matching: Incorporating Graph Partitioning with Deep Feature Learning for Multiple Object Tracking" (CVPR 2021).
This repository is the official PyTorch implementation of the CVPR 2021 paper: Learnable Graph Matching: Incorporating Graph Partitioning with Deep Feature Learning for Multiple Object Tracking.
[arXiv] [CVF open access]
git clone --recursive https://github.com/jiaweihe1996/GMTracker
pip install -r requirements.txt
# Install scs-gpu
pip uninstall scs
cd scs-python
python setup.py install --scs --gpu
--- data
--- MOT17
--- train
--- MOT17-02
--- MOT17-04
...
--- test
--- MOT17-01
--- MOT17-03
...
npy
files. You can download them from GoogleDrive or BaiduPan (code: dyvk) and unzip it.python gmtracker_app.py --sequence_dir /path/to/MOT/sequence --detection_file /path/to/detection.npy --checkpoint_dir /path/to/checkpoint_dir --max_age 100 --reid_thr 0.6 --output_file /path/to/output.txt
For example, on MOT17-01 sequence (static camera) with DPM detector:
python gmtracker_app.py --sequence_dir data/MOT17/test/MOT17-01 --detection_file npy/npytest_tracktor/MOT17-01-DPM.npy --checkpoint_dir experiments/static/params/0001 --max_age 100 --reid_thr 0.6 --output_file results/test/MOT17-01-DPM.txt
or cross validation on MOT17-05-DPM (moving camera, fold2 in val set):
python gmtracker_app.py --sequence_dir data/MOT17/train/MOT17-05 --detection_file npy/npyval_tracktor/MOT17-05-DPM.npy --checkpoint_dir experiments/moving/params/0001/fold2 --max_age 100 --reid_thr 0.6 --output_file results/crossval/MOT17-05-DPM.txt
FOLD0_VAL = ['MOT17-02', 'MOT17-10', 'MOT17-13']
FOLD1_VAL = ['MOT17-04', 'MOT17-11']
FOLD2_VAL = ['MOT17-05', 'MOT17-09']
STATIC = ['MOT17-01', 'MOT17-03', 'MOT17-08', 'MOT17-02', 'MOT17-04', 'MOT17-09']
MOVING = ['MOT17-06', 'MOT17-07', 'MOT17-12', 'MOT17-14', 'MOT17-05', 'MOT17-10', 'MOT17-11', 'MOT17-13']
python motchallenge_tracking.py
python show_results.py --sequence_dir /path/to/MOT/sequence --result_file /path/to/result.txt --output_file /path/to/output.avi
python cross_validation.py
MOT17/val/sequense-det/gt/gt.txt
like--- val
--- MOT17-02-DPM
--- gt
---gt.txt
--- MOT17-02-FRCNN
...
--- MOT17-02-SDP
...
--- MOT17-04-DPM
...
python -m motmetrics.apps.eval_motchallenge ./MOT17/val ./result/val
Training:
Please download gt.npy from GoogleDrive or Baidu(code: v277), and unzip them in ./npy/
folder, and run
python trainGMMOT.py
python linear_interpolation.py [--input_dir /path/to/onlinetrackeroutput] --output_dir /path/to/outputdir
This implementation is mainly based on deep_sort repo under GPL-3.0 License. Our ReID model is trained via deep-person-reid repo. The codes in qpth folder are mainly from qpth.
If you find this repo useful in your research, please consider citing the following paper:
@InProceedings{he2021gmtracker,
author = {He, Jiawei and Huang, Zehao and Wang, Naiyan and Zhang, Zhaoxiang},
title = {Learnable Graph Matching: Incorporating Graph Partitioning With Deep Feature Learning for Multiple Object Tracking},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2021},
pages = {5299-5309}
}