03. Multiple object tracking with pre-trained SMOT models

In this tutorial, we present a method, called Single-Shot Multi Object Tracking (SMOT), to perform multi-object tracking. SMOT is a new tracking framework that converts any single-shot detector (SSD) model into an online multiple object tracker, which emphasizes simultaneously detecting and tracking of the object paths. As an example below, we directly use the SSD-Mobilenet object detector pretrained on COCO from gluoncv-model-zoo and perform multiple object tracking on an arbitrary video. We want to point out that, SMOT is very efficient, its runtime is close to the runtime of the chosen detector.

Predict with a SMOT model

First, we download a video from MOT challenge website,

from gluoncv import utils
video_path = 'https://motchallenge.net/sequenceVideos/MOT17-02-FRCNN-raw.webm'
im_video = utils.download(video_path)

Out:

Downloading MOT17-02-FRCNN-raw.webm from https://motchallenge.net/sequenceVideos/MOT17-02-FRCNN-raw.webm...

  0%|          | 0/5410 [00:00<?, ?KB/s]
  0%|          | 1/5410 [00:00<09:24,  9.59KB/s]
  1%|          | 33/5410 [00:00<00:29, 182.98KB/s]
  1%|1         | 81/5410 [00:00<00:17, 307.52KB/s]
  4%|3         | 209/5410 [00:00<00:07, 664.96KB/s]
  8%|8         | 433/5410 [00:00<00:04, 1190.69KB/s]
 16%|#6        | 881/5410 [00:00<00:02, 2229.54KB/s]
 33%|###2      | 1777/5410 [00:00<00:00, 4277.32KB/s]
 62%|######1   | 3329/5410 [00:00<00:00, 7597.21KB/s]
 90%|########9 | 4849/5410 [00:00<00:00, 9722.08KB/s]
100%|##########| 5410/5410 [00:00<00:00, 5636.41KB/s]

Then you can simply use our provided script under /scripts/tracking/smot/demo.py to obtain the multi-object tracking result.

python demo.py MOT17-02-FRCNN-raw.webm

Our model is able to track multiple persons even when they are partially occluded. Try it on your own video and see the results!

Total running time of the script: ( 0 minutes 1.429 seconds)

Gallery generated by Sphinx-Gallery