sort
sleap_nn.tracking.mot.sort
¶
SORT (Bewley et al., 2016) for animal pose/mask detections.
Simple Online and Realtime Tracking: a constant-velocity Kalman filter per track
([cx, cy, s, r] state) and a single Hungarian assignment on geometric
similarity per frame. Original implementation from the published algorithm.
Algorithm (per frame, after every live track is predicted to this step):
- Detections scoring at or below
track_low_thresholdare ignored entirely: they are never matched and never start a track (SORT itself has no score logic; the reference expects the caller to filter detections). - One pool holds every live track (tentative, confirmed and lost alike). A pair
is admissible when its geometric similarity is at least
min_match_similarity(0.3). If the admissible pairs already form a one-to-one pattern they are taken as is; otherwise a Hungarian assignment on1 - similarity(cost cap1 - min_match_similarity) decides. - Lifecycle (base class, SORT-family settings): a new track starts with
hits = hit_streak = 0(the spawn detection does not count), is confirmed oncehit_streak >= min_hits(min_hits=3: four consecutive detections), survives misses while tentative, and every track is removed after more thantrack_bufferunmatched steps (the referencemax_age: 1 in thepaperpreset, as published; 30 inanimal). Unmatched detections scoring at leastnew_track_thresholdstart tracks.
Classes:
| Name | Description |
|---|---|
SORTTracker |
SORT tracker (see :mod: |
SORTTracker
¶
Bases: BaseMOTTracker
SORT tracker (see :mod:sleap_nn.tracking.mot.sort).