ByteTrack
Python template · sinapsis_supervision.templates.byte_track
Overview
A template class for implementing the ByteTrack tracking algorithm.
This class provides functionality to track objects across frames using the ByteTrack algorithm. It handles the conversion of annotations to detections, updates tracks, and converts detections back to annotations.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-supervision==1.0.0uv pip install sinapsis-supervision==1.0.0uv add sinapsis-supervision==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: null
The frame rate of the video.
Optional
Default: 30
Number of frames to buffer when a track is lost. Increasing lost_track_buffer enhances occlusion handling, significantly reducing the likelihood of track fragmentation or disappearance caused by brief detection gaps.
Optional
Default: 30
Number of consecutive frames that an object must be tracked before it is considered a 'valid' track. Increasing minimum_consecutive_frames prevents the creation of accidental tracks from false detection or double detection, but risks missing shorter tracks.
Optional
Default: 1
Threshold for matching tracks with detections. Increasing minimum_matching_threshold improves accuracy but risks fragmentation. Decreasing it improves completeness but risks false positives and drift.
Optional
Default: 0.7
Detection confidence threshold for track activation. Increasing track_activation_threshold improves accuracy and stability but might miss true detections. Decreasing it increases completeness but risks introducing noise and instability.
Optional
Default: 0.2
Configuration example
Example from the Python docstring:
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: ByteTrack
class_name: ByteTrack
template_input: InputTemplate
attributes:
track_activation_threshold: 0.2
lost_track_buffer: 30
minimum_matching_threshold: 0.5
frame_rate: 30
minimum_consecutive_frames: 1Show schema-based configuration skeleton
templates:
- template_name: "ByteTrack"
class_name: "ByteTrack"
attributes:
frame_rate: 30
lost_track_buffer: 30
minimum_consecutive_frames: 1
minimum_matching_threshold: 0.7
track_activation_threshold: 0.2
Inheritance
sinapsis_core.template_base.template.TemplateEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.