A realtime adaptation of ByteTrack.
- Python
- Numpy,
pip install numpy
- clone this repo & install bytetrack-realtime as a python package using
pip
or as an editable package if you like (-e
flag)
cd bytetrack_realtime && pip3 install .
Refer to an example here to use ScaledYOLOv4 detector with ByteTrack. You can also use any other detectors as long as the input format to the tracker is the same.
Example usage:
from bytetrack_realtime.byte_tracker import ByteTracker
tracker = ByteTracker(track_thresh=0.6, track_buffer=30, match_thresh=0.9)
bbs = object_detector.detect(frame)
tracks = tracker.update(detections=bbs)
for track in tracks:
track_id = track.track_id
ltrb = track.ltrb
score = track.score
det_class = track.det_class