A unified library for object tracking featuring clean room re-implementations of leading multi-object tracking algorithms
Project description
https://github.com/user-attachments/assets/eef9b00a-cfe4-40f7-a495-954550e3ef1f
Install
pip install trackers
Install from source
pip install git+https://github.com/roboflow/trackers.git
For more options, see the install guide.
Track from CLI
Point at a video, webcam, RTSP stream, or image directory. Get tracked output.
trackers track \
--source video.mp4 \
--output output.mp4 \
--model rfdetr-medium \
--tracker bytetrack \
--show-labels \
--show-trajectories
For all CLI options, see the tracking guide.
Track from Python
Plug trackers into your existing detection pipeline. Works with any detector.
import cv2
import supervision as sv
from inference import get_model
from trackers import ByteTrackTracker
model = get_model(model_id="rfdetr-medium")
tracker = ByteTrackTracker()
cap = cv2.VideoCapture("video.mp4")
while cap.isOpened():
ret, frame = cap.read()
if not ret:
break
result = model.infer(frame)[0]
detections = sv.Detections.from_inference(result)
tracked = tracker.update(detections)
For more examples, see the tracking guide.
Algorithms
Clean, modular implementations of leading trackers. All HOTA scores use default parameters.
| Algorithm | Description | MOT17 HOTA | SportsMOT HOTA | SoccerNet HOTA | DanceTrack HOTA |
|---|---|---|---|---|---|
| SORT | Kalman filter + Hungarian matching baseline. | 58.4 | 70.9 | 81.6 | 45.0 |
| ByteTrack | Two-stage association using high and low confidence detections. | 60.1 | 73.0 | 84.0 | 50.2 |
| OC-SORT | Observation-centric recovery for lost tracks. | 61.9 | 71.7 | 78.4 | 51.8 |
For detailed benchmarks and tuned configurations, see the tracker comparison.
Evaluate
Benchmark your tracker against ground truth with standard MOT metrics.
trackers eval \
--gt-dir ./data/mot17/val \
--tracker-dir results \
--metrics CLEAR HOTA Identity \
--columns MOTA HOTA IDF1
Sequence MOTA HOTA IDF1
----------------------------------------------------
MOT17-02-FRCNN 30.192 35.475 38.515
MOT17-04-FRCNN 48.912 55.096 61.854
MOT17-05-FRCNN 52.755 45.515 55.705
MOT17-09-FRCNN 51.441 50.108 57.038
MOT17-10-FRCNN 51.832 49.648 55.797
MOT17-11-FRCNN 55.501 49.401 55.061
MOT17-13-FRCNN 60.488 58.651 69.884
----------------------------------------------------
COMBINED 47.406 50.355 56.600
For the full evaluation workflow, see the evaluation guide.
Download Datasets
Pull benchmark datasets for evaluation with a single command.
trackers download mot17 \
--split val \
--asset annotations,detections
| Dataset | Description | Splits | Assets | License |
|---|---|---|---|---|
mot17 |
Pedestrian tracking with crowded scenes and frequent occlusions. | train, val, test |
frames, annotations, detections |
CC BY-NC-SA 3.0 |
sportsmot |
Sports broadcast tracking with fast motion and similar-looking targets. | train, val, test |
frames, annotations |
CC BY 4.0 |
For more download options, see the download guide.
Try It
Try trackers in your browser with our Hugging Face Playground.
Documentation
Full guides, API reference, and tutorials: trackers.roboflow.com
Contributing
We welcome contributions. Read our contributor guidelines to get started.
License
The code is released under the Apache 2.0 license.
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.3.0.tar.gz.
File metadata
- Download URL: trackers-2.3.0.tar.gz
- Upload date:
- Size: 351.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7becdc77d32c59ee37ec7bc450641cd6c76abcfce69de97f94f77e1e0764a1ea
|
|
| MD5 |
f259d3ae303d9359f42bcf7e2237cc7c
|
|
| BLAKE2b-256 |
281450ab14fe581fceb636e7ae3e5374b88104c19ea987897b4c376e823ffed4
|
Provenance
The following attestation bundles were made for trackers-2.3.0.tar.gz:
Publisher:
publish-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.3.0.tar.gz -
Subject digest:
7becdc77d32c59ee37ec7bc450641cd6c76abcfce69de97f94f77e1e0764a1ea - Sigstore transparency entry: 1109868635
- Sigstore integration time:
-
Permalink:
roboflow/trackers@32d5882c6e9bf1c7621572cc3c2d440701d2c819 -
Branch / Tag:
refs/tags/2.3.0 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yml@32d5882c6e9bf1c7621572cc3c2d440701d2c819 -
Trigger Event:
push
-
Statement type:
File details
Details for the file trackers-2.3.0-py3-none-any.whl.
File metadata
- Download URL: trackers-2.3.0-py3-none-any.whl
- Upload date:
- Size: 96.5 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 |
4e06ff1910d2ca0a54cd10b854bca44aee5f421a1766667adb5ca919d15bbf75
|
|
| MD5 |
3fb0bcb5419e8ccbfcbe0f0390635976
|
|
| BLAKE2b-256 |
2398414d7b49c266a2db2a703c71b81d659cf6e3020e137cbdb9ba1738f58ff0
|
Provenance
The following attestation bundles were made for trackers-2.3.0-py3-none-any.whl:
Publisher:
publish-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.3.0-py3-none-any.whl -
Subject digest:
4e06ff1910d2ca0a54cd10b854bca44aee5f421a1766667adb5ca919d15bbf75 - Sigstore transparency entry: 1109868649
- Sigstore integration time:
-
Permalink:
roboflow/trackers@32d5882c6e9bf1c7621572cc3c2d440701d2c819 -
Branch / Tag:
refs/tags/2.3.0 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yml@32d5882c6e9bf1c7621572cc3c2d440701d2c819 -
Trigger Event:
push
-
Statement type: