Docs /Templates/ sinapsis-rf-trackers

SORTTrackerInference

sinapsis-rf-trackersRFTrackerstrackersimageinferencemodels

Python template · sinapsis_rf_trackers.templates.sort_tracker_inference

Overview

This template provides the logic to use the SORT tracker from Roboflow's trackers library. It processes detection annotations from upstream templates and adds tracking IDs to maintain object identity across video frames.

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-rf-trackers==1.0.0
uv pip install sinapsis-rf-trackers==1.0.0
uv add sinapsis-rf-trackers==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
frame_rate

The frame rate of the video sequence being processed. This affects the temporal dynamics of the tracking algorithm. Defaults to 30.0.

float
Optional
Default: 30
lost_track_buffer

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. Defaults to 30.

int
Optional
Default: 30
minimum_iou_threshold

Minimum IoU threshold for associating detections with tracks. Higher values require better spatial overlap for association, improving precision but potentially reducing recall. Defaults to 0.3.

float
Optional
Default: 0.3
minimum_consecutive_frames

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. Defaults to 3.

int
Optional
Default: 3
track_activation_threshold

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. Defaults to 0.25.

float
Optional
Default: 0.25

Configuration example

Example from the Python docstring:

yaml
agent:
      name: sort_tracker_agent
    templates:
    - template_name: InputTemplate
      class_name: InputTemplate
      attributes: {}
    - template_name: SORTTrackerInference
      class_name: SORTTrackerInference
      template_input: InputTemplate
      attributes:
        track_activation_threshold: 0.25
        lost_track_buffer: 30
        minimum_consecutive_frames: 3
        minimum_iou_threshold: 0.3
        frame_rate: 30
Show schema-based configuration skeleton
yaml
templates:
  - template_name: "SORTTrackerInference"
    class_name: "SORTTrackerInference"
    attributes:
      frame_rate: 30
      lost_track_buffer: 30
      minimum_iou_threshold: 0.3
      minimum_consecutive_frames: 3
      track_activation_threshold: 0.25

Inheritance

Immediate parent: sinapsis_rf_trackers.templates.rf_tracker_base.RFTrackerBase

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.