Object tracking method using a Kalman Filter and a matching process inspired by ByteTrack.
The tracking package can be installed using pip by running the following commands:
cd object-tracking
pip install -e .
Run the following lines with Python:
from tracking import InteractiveTracker
InteractiveTracker()
Or alternatively, run:
python -m tracking.interactive_tracker
Run the following lines with Python:
from tracking import Tracker, Detection
# Initialize the tracker
config = {}
tracker = Tracker(config)
# Get some detections
detections = [Detection(500, 100, 100, 100, "object", 0.9),
Detection(200, 300, 200, 100, "object", 0.8)]
# Update the tracker
tracker.update(detections)
# Visualize the tracker state
tracker.show(savefig="tracker_1.png")
# Get some other detections
detections = [Detection(480, 120, 140, 120, "object", 0.95),
Detection(200, 300, 170, 80, "object", 0.9)]
# Update the tracker again
tracker.update(detections)
# Visualize the new tracker state
tracker.show(savefig="tracker_2.png")
The state is represented by a
The dynamics are described by the following constant velocity model with independent gaussian noise:
where
The measurements are the detections, which can be obtained via an object detector such as YOLO. The measurement model is given by:
Inspired by the NSA Kalman Filter proposed in GIAOTracker, the measurement noise should vary with the detection confidence. The following adaptive formulation is used to adapt the noise measurement:
Inspired by ByteTrack, the following three-stage matching process is employed: