Simple, online, and realtime tracking for mobile robot
by Park JaeHun
Multiple object tracking suitable for mobile robots using the two methods below.
- Calibration camera rotation using wheel encoder based odometry information
- Dynamically set the tracker's life period : If tracker have been tracking for a long time, keep it alive longer.
- Ubuntu 20.04
- ROS noetic
- OpenVINO 2021.3.394
- OpenCV 4.5.2-openvino
- Numpy 1.17.3
$ git clone https://github.com/MilyangParkJaeHun/mr_sort.git
$ cd mr_sort
$ git submodule init
$ git submodule update
- Downloads PxRx sequence dataset
$ cd /path/to/mr_sort/data
$ source source data_downloads.sh
- Run
$ python3 mr_sort.py --seq_path=data --display
Using different detection model quantized by OpenVINO
- A example of using SSDLite-MobileNet model
$ cd /path/to/mr_sort/openvino_detector/IR/Ssd $ source model_downloads.sh $ cd /path/to/mr_sort/openvino_detector $ python3 mot_detector.py --model_type=ssd \ --model_path=IR/Ssd/ssdlite_coco \ --img_path=../tracker/data \ --device=CPU --display
For more information, see here
Below is the gist of how to use mr_sort. See the 'main' section of mr_sort.py for a complete example.
from mr_sort import *
#create instance of MR_SORT
mot_tracker = MrSort()
# get detections
...
# get odometry
# odometry is [th(degree), x, y] format array
...
# update MR_SORT
track_bbs_ids = mot_tracker.update(detections, odometry)
# track_bbs_ids is a np array where each row contains a valid bounding box and track_id (last column)
...