This repo accomplishes object tracking by combining the object detections from Multiple Anchor Learning(MAL) with DeepSORT. The tracker is tested on VisDrone-MOT videos.
For more details of MAL and DeepSORT, please refer to:
- Multiple Anchor Learning for Visual Object Detection and the original MAL repo.
- Simple Online and Realtime Tracking with a Deep Association Metric and Pytorch Implementation.
Follow from MAL-inference.
Use the infer_track subcommand.
- Run on a video from VisDrone dataset. For eg:
uav0000086_00000_v
.
CUDA_VISIBLE_DEVICES=0 retinanet infer_track --config configs/MAL_R-50-FPN_e2e.yaml --images ../data/VisDrone2019-MOT-val/sequences/uav0000086_00000_v --batch 1
-
Unless otherwise specified, the outputs are saved in newly created directory
uav0000086_00000_v
. The output includes: a. Per-frame bounding boxes detection along with tracking id, class id. People are depicted using green boxes, vehicles using red boxes, while all other classes are ignored. b. Output detection fileuav0000086_00000_v.txt
for computing either CLEAR-MOT metrics or AP metrics. c. Output detections in JSON format. -
To generate a video from the output images, use get_video.sh.
ffmpeg -framerate 25 -i %d.jpg -c:v libx264 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -profile:v high -crf 20 -pix_fmt yuv420p output.mp4
- To compute AP metrics, run
python compute_map.py <groundtruth_annotations> <detections_file>
- For computing CLEAR-MOT metrics, use the ground truth annotations and detections file with py-motmetrics.
python -m motmetrics.apps.eval_motchallenge <groundtruth_annotations_folder> <detections_folder>
Sequence Number | Video (Download Recommended) |
---|---|
uav0000086_00000_v | Link |
uav0000117_02622_v | Link |
Sequence Number | AP | AP@0.25 | AP@0.5 | AP@0.75 | AP(people) | AP(vehicle) | MOTA |
---|---|---|---|---|---|---|---|
uav0000086_00000_v | 0.248 | 0.408 | 0.264 | 0.073 | 0.431 | 0.065 | 26.3 |
uav0000117_02622_v | 0.327 | 0.507 | 0.369 | 0.105 | 0.234 | 0.421 | -29.3 |
- Varying input image size
Image Size | AP | AP for Seq1 | AP for Seq2 | FW Time | Tracking Time |
---|---|---|---|---|---|
800 | 0.287 | 0.248 | 0.327 | 0.480s | 1.214s |
1024 | 0.287 | 0.248 | 0.327 | 0.487s | 1.050s |
400 | 0.2 | 0.178 | 0.222 | 0.174s | 1.261s |
- Varying NMS threshold
Image Size | AP | AP for Seq1 | AP for Seq2 | FW Time | Tracking Time |
---|---|---|---|---|---|
0.5 | 0.287 | 0.248 | 0.327 | 0.480s | 1.214s |
0.75 | 0.268 | 0.235 | 0.302 | 0.486s | 1.016s |
0.25 | 0.288 | 0.247 | 0.329 | 0.498s | 1.580s |
- Varying number of detections
Number of detections | AP | AP for Seq1 | AP for Seq2 | FW Time | Tracking Time |
---|---|---|---|---|---|
100 | 0.287 | 0.248 | 0.327 | 0.480s | 1.214s |
200 | 0.285 | 0.242 | 0.329 | 0.552s | 1.651s |
50 | 0.268 | 0.235 | 0.302 | 0.483s | 0.625s |