A unified library for object tracking featuring clean room re-implementations of leading multi-object tracking algorithms
Project description
trackers
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.
https://github.com/user-attachments/assets/eef9b00a-cfe4-40f7-a495-954550e3ef1f
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.
pip install trackers
install from source
By installing trackers from source, you can explore the most recent features and enhancements that have not yet been officially released. Please note that these updates are still in development and may not be as stable as the latest published release.
pip install https://github.com/roboflow/trackers/archive/refs/heads/develop.zip
Quickstart
Use the trackers CLI to quickly test how our tracking algorithms perform on your videos and streams. This feature is experimental; see the CLI documentation for details.
trackers track --source source.mp4 --output output.mp4 --model rfdetr-nano --tracker bytetrack
Tracking Algorithms
trackers gives you clean, modular re-implementations of leading multi-object tracking algorithms. The package currently supports SORT and ByteTrack. OC-SORT, BoT-SORT, and McByte support is coming soon. For comparisons, see the tracker comparison page.
| Algorithm | MOT17 HOTA | MOT17 IDF1 | MOT17 MOTA | SportsMOT HOTA | SoccerNet HOTA |
|---|---|---|---|---|---|
| SORT | 58.4 | 69.9 | 67.2 | 70.9 | 81.6 |
| ByteTrack | 60.1 | 73.2 | 74.1 | 73.0 | 84.0 |
| OC-SORT | — | — | — | — | — |
| BoT-SORT | — | — | — | — | — |
| McByte | — | — | — | — | — |
Integration
With a modular design, trackers lets you combine object detectors from different libraries with the tracker of your choice.
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)
run with Inference
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)
run with Ultralytics
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)
License
The code is released under the Apache 2.0 license.
Contribution
We welcome all contributions—whether it’s reporting issues, suggesting features, or submitting pull requests. Please read our contributor guidelines to learn about our processes and best practices.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trackers-2.2.0rc1.tar.gz.
File metadata
- Download URL: trackers-2.2.0rc1.tar.gz
- Upload date:
- Size: 326.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3375592d468959af06b808d8c0df82f61318c4e11e47340c32437b4ab323161d
|
|
| MD5 |
5a3387ab6eea8f544751aeb6dd3c1525
|
|
| BLAKE2b-256 |
443027a82b824fd510107651393732d6eba1e3117bfc7c7fa1a90122eed74e81
|
Provenance
The following attestation bundles were made for trackers-2.2.0rc1.tar.gz:
Publisher:
publish-pre-release.yml on roboflow/trackers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trackers-2.2.0rc1.tar.gz -
Subject digest:
3375592d468959af06b808d8c0df82f61318c4e11e47340c32437b4ab323161d - Sigstore transparency entry: 953621769
- Sigstore integration time:
-
Permalink:
roboflow/trackers@0691110fa508b2d1f14310dbd60c5bf2075a657d -
Branch / Tag:
refs/tags/2.2.0rc1 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pre-release.yml@0691110fa508b2d1f14310dbd60c5bf2075a657d -
Trigger Event:
push
-
Statement type:
File details
Details for the file trackers-2.2.0rc1-py3-none-any.whl.
File metadata
- Download URL: trackers-2.2.0rc1-py3-none-any.whl
- Upload date:
- Size: 64.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f53367c0be5e70251dfc8e918b2b0421e36fb158bcb60ce75e0796c3949a477e
|
|
| MD5 |
ef532e1793bc552398a1966456fa59ea
|
|
| BLAKE2b-256 |
c67bde6f9eb7aeccc7fd218e8cf4a5056872083e3ae6795c85224bbb3ccd274f
|
Provenance
The following attestation bundles were made for trackers-2.2.0rc1-py3-none-any.whl:
Publisher:
publish-pre-release.yml on roboflow/trackers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trackers-2.2.0rc1-py3-none-any.whl -
Subject digest:
f53367c0be5e70251dfc8e918b2b0421e36fb158bcb60ce75e0796c3949a477e - Sigstore transparency entry: 953621771
- Sigstore integration time:
-
Permalink:
roboflow/trackers@0691110fa508b2d1f14310dbd60c5bf2075a657d -
Branch / Tag:
refs/tags/2.2.0rc1 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pre-release.yml@0691110fa508b2d1f14310dbd60c5bf2075a657d -
Trigger Event:
push
-
Statement type: