No install needed. Try trackers in your browser with our Hugging Face Playground.
pip install trackersinstall from source
pip install git+https://github.com/roboflow/trackers.gittrackers-2.0.0-promo.mp4
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-trajectoriesPlug 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)Benchmark your tracker against ground truth with standard MOT metrics.
trackers eval \
--gt-dir data/gt \
--tracker-dir data/trackers \
--metrics CLEAR HOTA IdentitySequence 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
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 | — | — | — |
We welcome contributions. Read our contributor guidelines to get started.
The code is released under the Apache 2.0 license.