Pedestrian Tracking by DeepSORT and Hybrid Task Cascade with PyTorch.
This project is used to participate in zte algorithm contest(中兴捧月算法大赛阿尔法·勒克斯特派), which get 77.838 on the A board.
Pedestrian detection is obtained by Hybrid Task Cascade, which implemented by MMDetection.
I choose to use DeepSORT to achieve the data association. This section is modified by other authors' implementation.
Several other detection algorithms, such as Cascade R-CNN and EfficientDet, were also tested, but with poor results.
git clone https://github.com/FinalFlowers/pedestrian_tracking.git
cd pedestrian_tracking
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -v -e .
Note: there is a point at the end of the command.
Download detection and ReID feature extraction model parameters from Baidu Netdisk with code: bboh.
Put htc_dconv_c3-c5_mstrain_400_1400_x101_64x4d_fpn_20e.pth
under pedestrian_tracking/models/
Put ckpt.t7
under pedestrian_tracking/deep_sort/deep/checkpoint/
Run the following code for pedestrian tracking:
python htc_deepsort.py /your/trackdata/
The output format is:
<frame>,<id>,<bb_left>,<bb_top>,<bb_width>,<bb_height>,<conf>,<type>
Note:
-
Conf
andtype
are fixed as 0.9 and 0 respectively. -
The input should be a path to images ending in
/
-
The results will be saved under
pedestrian_tracking/results/
in.txt
format
Run the following code will visualize the tracking results while testing:
python htc_deepsort.py /your/trackdata/ --display
You can adjust the tracking configuration in person_tracking/configs/deep_sort.yaml
and detection configuration in person_tracking/models/htc_dconv_c3-c5_mstrain_400_1400_x101_64x4d_fpn_20e.py
.