Trackers API
SORT
trackers.core.sort.tracker.SORTTracker
Bases: BaseTracker
Track objects using SORT algorithm with Kalman filter and IoU matching. Provides simple and fast online tracking using only bounding box geometry without appearance features.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lost_track_buffer
|
int
|
|
30
|
frame_rate
|
float
|
|
30.0
|
track_activation_threshold
|
float
|
|
0.25
|
minimum_consecutive_frames
|
int
|
|
3
|
minimum_iou_threshold
|
float
|
|
0.3
|
update(detections)
Update tracker state with new detections and return tracked objects. Performs Kalman filter prediction, IoU-based association, and initializes new tracks for unmatched high-confidence detections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detections
|
Detections
|
|
required |
Returns:
| Type | Description |
|---|---|
Detections
|
|
reset()
Reset tracker state by clearing all tracks and resetting ID counter. Call this method when switching to a new video or scene.
ByteTrack
trackers.core.bytetrack.tracker.ByteTrackTracker
Bases: BaseTracker
Track objects using ByteTrack algorithm with two-stage association. Associates both high and low confidence detections to reduce fragmentation and improve tracking through occlusions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lost_track_buffer
|
int
|
|
30
|
frame_rate
|
float
|
|
30.0
|
track_activation_threshold
|
float
|
|
0.7
|
minimum_consecutive_frames
|
int
|
|
2
|
minimum_iou_threshold
|
float
|
|
0.1
|
high_conf_det_threshold
|
float
|
|
0.6
|
update(detections)
Update tracker state with new detections and return tracked objects. Performs Kalman filter prediction, two-stage association (high then low confidence), and initializes new tracks for unmatched detections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detections
|
Detections
|
|
required |
Returns:
| Type | Description |
|---|---|
Detections
|
|
reset()
Reset tracker state by clearing all tracks and resetting ID counter. Call this method when switching to a new video or scene.