Skip to content

Quickstart

Trackers Logo

trackers gives you clean, modular re-implementations of leading multi-object tracking algorithms released under the permissive Apache 2.0 license. You combine them with any detection model you already use.

Install

You can install and use trackers in a Python>=3.10 environment. For detailed installation instructions, including installing from source and setting up a local development environment, check out our install page.

Installation

version downloads license python-version

pip install trackers
uv pip install trackers

Tutorials

  • How to Track Objects with SORT


    End-to-end example showing how to run RF-DETR detection with the SORT tracker.

    Run Google Colab

  • How to Track Objects with ByteTrack


    End-to-end example showing how to run RF-DETR detection with the ByteTrack tracker.

    Run Google Colab

Tracking Algorithms

Clean, modular implementations of leading trackers. For comparisons, see the tracker comparison page.

Algorithm MOT17 HOTA SportsMOT HOTA SoccerNet HOTA
SORT 58.4 70.9 81.6
ByteTrack 60.1 73.0 84.0
OC-SORT 61.9 71.5 78.6
BoT-SORT
McByte

Integration

With a modular design, trackers lets you combine object detectors from different libraries with the tracker of your choice. See the Track guide for CLI usage and more options. These examples use opencv-python for decoding and display.

import cv2
from rfdetr import RFDETRNano
from trackers import ByteTrackTracker

model = RFDETRNano()
tracker = ByteTrackTracker()

cap = cv2.VideoCapture("source.mp4")
while True:
    ret, frame = cap.read()
    if not ret:
        break

    frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    detections = model.predict(frame_rgb)
    detections = tracker.update(detections)
import cv2
import supervision as sv
from inference import get_model
from trackers import ByteTrackTracker

model = get_model(model_id="rfdetr-nano")
tracker = ByteTrackTracker()

cap = cv2.VideoCapture("source.mp4")
while True:
    ret, frame = cap.read()
    if not ret:
        break

    result = model.infer(frame)[0]
    detections = sv.Detections.from_inference(result)
    detections = tracker.update(detections)
import cv2
import supervision as sv
from ultralytics import YOLO
from trackers import ByteTrackTracker

model = YOLO("yolo11n.pt")
tracker = ByteTrackTracker()

cap = cv2.VideoCapture("source.mp4")
while True:
    ret, frame = cap.read()
    if not ret:
        break

    result = model(frame)[0]
    detections = sv.Detections.from_ultralytics(result)
    detections = tracker.update(detections)

Comments