A clean implementation of ByteTrack for multi-object tracking using Kalman filtering and two-stage association.
Click to see higher quality video
output.mp4
pip install -r requirements.txtimport numpy as np
from bytetrack import BYTETracker
tracker = BYTETracker(track_thresh=0.5, track_buffer=30, match_thresh=0.8, low_thresh=0.1)
# detections: numpy array of shape (N, 5) -> [x1, y1, x2, y2, score]
detections = np.array([[100, 100, 200, 200, 0.9], [300, 300, 400, 400, 0.8]])
# tracks: numpy array of shape (M, 5) -> [x1, y1, x2, y2, track_id]
tracks = tracker.update(detections)Face tracking demo using UniFace for detection:
python demo.py --source 0 # webcam
python demo.py --source video.mp4 --save output.mp4- ByteTrack: ifzhang/ByteTrack - Original implementation
- UniFace: yakhyo/uniface - Face detection library