A unified library for object tracking featuring clean room re-implementations of leading multi-object tracking algorithms
Project description
Try It
No install needed. Try trackers in your browser with our Hugging Face Playground.
Install
pip install trackers
install from source
pip install git+https://github.com/roboflow/trackers.git
https://github.com/user-attachments/assets/eef9b00a-cfe4-40f7-a495-954550e3ef1f
Track from CLI
Point at a video, webcam, RTSP stream, or image directory. Get tracked output.
Use our interactive command builder to configure your tracking pipeline.
trackers track \
--source video.mp4 \
--output output.mp4 \
--model rfdetr-medium \
--tracker bytetrack \
--show-labels \
--show-trajectories
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()
label_annotator = sv.LabelAnnotator()
trajectory_annotator = sv.TrajectoryAnnotator()
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)
frame = label_annotator.annotate(frame, tracked)
frame = trajectory_annotator.annotate(frame, tracked)
Evaluate
Benchmark your tracker against ground truth with standard MOT metrics.
trackers eval \
--gt-dir data/gt \
--tracker-dir data/trackers \
--metrics CLEAR HOTA Identity
Sequence MOTA HOTA IDF1 IDSW
----------------------------------------------------------
MOT17-02-FRCNN 75.600 62.300 72.100 42
MOT17-04-FRCNN 78.200 65.100 74.800 31
----------------------------------------------------------
COMBINED 75.033 62.400 72.033 73
Algorithms
Clean, modular implementations of leading trackers. See the tracker comparison for detailed benchmarks.
| Algorithm | MOT17 | SportsMOT | SoccerNet |
|---|---|---|---|
| SORT | 58.4 | 70.9 | 81.6 |
| ByteTrack | 60.1 | 73.0 | 84.0 |
| OC-SORT | — | — | — |
| BoT-SORT | — | — | — |
| McByte | — | — | — |
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.2.0.tar.gz.
File metadata
- Download URL: trackers-2.2.0.tar.gz
- Upload date:
- Size: 329.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e5bac506d756b882f27a6785906673d7482376e29715d796a8e70740908e77e
|
|
| MD5 |
2a79912dc9256d796d29ac06aed7681c
|
|
| BLAKE2b-256 |
b369993225848cea1d4031bb78932900949ddb4e43ae7d23956a66743458c96d
|
Provenance
The following attestation bundles were made for trackers-2.2.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.2.0.tar.gz -
Subject digest:
9e5bac506d756b882f27a6785906673d7482376e29715d796a8e70740908e77e - Sigstore transparency entry: 963042517
- Sigstore integration time:
-
Permalink:
roboflow/trackers@5f05879c26ef481c3237d201f404808c436bf100 -
Branch / Tag:
refs/tags/2.2.0 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yml@5f05879c26ef481c3237d201f404808c436bf100 -
Trigger Event:
push
-
Statement type:
File details
Details for the file trackers-2.2.0-py3-none-any.whl.
File metadata
- Download URL: trackers-2.2.0-py3-none-any.whl
- Upload date:
- Size: 71.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 |
3238e2df8574d269fd1a55bd331a99bbeffd899ea16177f424610448e8a5006d
|
|
| MD5 |
1bf617db0914e46ba2032820a0afcfda
|
|
| BLAKE2b-256 |
5b6c414308868dcfe445e6ca9620b8731d797b9326bf5c2e08e7d8a8ae76056d
|
Provenance
The following attestation bundles were made for trackers-2.2.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.2.0-py3-none-any.whl -
Subject digest:
3238e2df8574d269fd1a55bd331a99bbeffd899ea16177f424610448e8a5006d - Sigstore transparency entry: 963042520
- Sigstore integration time:
-
Permalink:
roboflow/trackers@5f05879c26ef481c3237d201f404808c436bf100 -
Branch / Tag:
refs/tags/2.2.0 - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yml@5f05879c26ef481c3237d201f404808c436bf100 -
Trigger Event:
push
-
Statement type: