/MAL-inference-deepsort

Object Tracking using MAL + DeepSort

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

MAL-inference-deepsort

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:

Installation Instructions

Follow from MAL-inference.

Steps to visualize inference

Use the infer_track subcommand.

  1. 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
  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 file uav0000086_00000_v.txt for computing either CLEAR-MOT metrics or AP metrics. c. Output detections in JSON format.

  2. 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
  1. To compute AP metrics, run
python compute_map.py <groundtruth_annotations> <detections_file>
  1. 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>

Results

Sample low-resolution video uav0000086_00000_v

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

Ablations

  • 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