viplix3/BoTSORT-cpp

C++ implementation of BoT-SORT MOT algorithm with Re-ID and Camera Motion Compensation

C++

245

345 commits

updated Jun 9, 2025

See the code

README

BoT-SORT: Unofficial C++ Implementation

BoT-SORT: Robust Associations Multi-Pedestrian Tracking

Nir Aharon, Roy Orfaig, Ben-Zion Bobrovsky

Description

This repository contains an unofficial C++ implementation of BoT-SORT multi-pedestrian tracking algorithm.

This implementation has been tested on NVIDIA Jetson NX and it achieves real-time performance on 1080p videos.

YOLOv8-tracking, Official BoT-SORT and Official ByteTrack GitHub repositories were used as references.

TODO

  • Implement BoT-SORT tracker
  • Load parameters from config file
  • Implement Re-ID model for BoT-SORT tracker using TensorRT
  • Dockerize the project
  • Re-ID performance analysis
  • Re-ID model quantization

Preview of Results

These results demonstrate the BoT-SORT tracker, implemented in this repository, utilizing MOT provided detections.

MOT20-01

More Result Videos

Installation Guide

  1. Install Docker and NVIDIA Container Toolkit

  2. Clone the repository

    git clone git@github.com:viplix3/BoTSORT-cpp.git
    cd BoTSORT-cpp
    
  3. Build Docker image

    ./docker_build.sh
    
  4. Run Docker container

    ./docker_run.sh
    
  5. Build BoT-SORT tracker

    cd /home/user/work/
    mkdir build && cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release
    make -j$(nproc)
    

Usage

Example code for using the BoT-SORT tracker is provided in botsort_tracking_example.cpp The project by default builds the example code.

To test the example code, run the following command:

cd <project-root-dir>/build
./bin/botsort_tracking_example ../config/tracker.ini ../config/gmc.ini ../config/reid.ini ../assets/osnet_x0_25_market1501.onnx ../examples/data/MOT20-01.mp4 ../examples/data/det/det.txt ../output/

Performance Analysis

The performance of the BoT-SORT tracker, implemented in this repository, was evaluated on the MOT20 dataset. Details are provided in this document.

Execution time of different modules (Host Machine, Release Build, Best of 3)

SequenceAverage Objects/FrameRe-IDCamera Motion EstimationMotion CompensationKalman FilterAlgorithm Execution Time (ms)Algorithm Execution FPS
MOT20-0162❌✅✅✅4.7771209.3333
MOT20-0162❌❌✅✅0.20744819.2466
MOT20-0162❌❌❌✅0.20164959.9266
MOT20-05226❌✅✅✅6.6817149.6633
MOT20-05226❌❌✅✅2.0498487.9570
MOT20-05226❌❌❌✅2.0054498.6453

Execution time of different modules (Jetson-NX, Release Build, Best of 3)

SequenceAvg Objects/imageRe-IDCamera Motion EstimationMotion CompensationKalman FilterAlgorithm Execution Time (ms)Algorithm Execution FPS
MOT20-0162❌✅✅✅39.996825.0229
MOT20-0162❌❌✅✅2.6441378.2070
MOT20-0162❌❌❌✅2.5185397.0786
MOT20-05226❌✅✅✅52.425119.0749
MOT20-05226❌❌✅✅15.633763.9844
MOT20-05226❌❌❌✅14.791867.7275

Accuracy Analysis

The accuracy of the BoT-SORT tracker, implemented in this repository, was evaluated on the MOT20 train set. Details are provided in this document.

computer-vision
cpp
kalman-filter
multi-object-tracking
reid

viplix3/BoTSORT-cpp

C++ implementation of BoT-SORT MOT algorithm with Re-ID and Camera Motion Compensation

C++

245

345 commits

updated Jun 9, 2025

See the code

README

BoT-SORT: Unofficial C++ Implementation

BoT-SORT: Robust Associations Multi-Pedestrian Tracking

Nir Aharon, Roy Orfaig, Ben-Zion Bobrovsky

Description

This repository contains an unofficial C++ implementation of BoT-SORT multi-pedestrian tracking algorithm.

This implementation has been tested on NVIDIA Jetson NX and it achieves real-time performance on 1080p videos.

YOLOv8-tracking, Official BoT-SORT and Official ByteTrack GitHub repositories were used as references.

TODO

  • Implement BoT-SORT tracker
  • Load parameters from config file
  • Implement Re-ID model for BoT-SORT tracker using TensorRT
  • Dockerize the project
  • Re-ID performance analysis
  • Re-ID model quantization

Preview of Results

These results demonstrate the BoT-SORT tracker, implemented in this repository, utilizing MOT provided detections.

MOT20-01

More Result Videos

Installation Guide

  1. Install Docker and NVIDIA Container Toolkit

  2. Clone the repository

    git clone git@github.com:viplix3/BoTSORT-cpp.git
    cd BoTSORT-cpp
    
  3. Build Docker image

    ./docker_build.sh
    
  4. Run Docker container

    ./docker_run.sh
    
  5. Build BoT-SORT tracker

    cd /home/user/work/
    mkdir build && cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release
    make -j$(nproc)
    

Usage

Example code for using the BoT-SORT tracker is provided in botsort_tracking_example.cpp The project by default builds the example code.

To test the example code, run the following command:

cd <project-root-dir>/build
./bin/botsort_tracking_example ../config/tracker.ini ../config/gmc.ini ../config/reid.ini ../assets/osnet_x0_25_market1501.onnx ../examples/data/MOT20-01.mp4 ../examples/data/det/det.txt ../output/

Performance Analysis

The performance of the BoT-SORT tracker, implemented in this repository, was evaluated on the MOT20 dataset. Details are provided in this document.

Execution time of different modules (Host Machine, Release Build, Best of 3)

SequenceAverage Objects/FrameRe-IDCamera Motion EstimationMotion CompensationKalman FilterAlgorithm Execution Time (ms)Algorithm Execution FPS
MOT20-0162❌✅✅✅4.7771209.3333
MOT20-0162❌❌✅✅0.20744819.2466
MOT20-0162❌❌❌✅0.20164959.9266
MOT20-05226❌✅✅✅6.6817149.6633
MOT20-05226❌❌✅✅2.0498487.9570
MOT20-05226❌❌❌✅2.0054498.6453

Execution time of different modules (Jetson-NX, Release Build, Best of 3)

SequenceAvg Objects/imageRe-IDCamera Motion EstimationMotion CompensationKalman FilterAlgorithm Execution Time (ms)Algorithm Execution FPS
MOT20-0162❌✅✅✅39.996825.0229
MOT20-0162❌❌✅✅2.6441378.2070
MOT20-0162❌❌❌✅2.5185397.0786
MOT20-05226❌✅✅✅52.425119.0749
MOT20-05226❌❌✅✅15.633763.9844
MOT20-05226❌❌❌✅14.791867.7275

Accuracy Analysis

The accuracy of the BoT-SORT tracker, implemented in this repository, was evaluated on the MOT20 train set. Details are provided in this document.

computer-vision
cpp
kalman-filter
multi-object-tracking
reid