Tracking¶
Tracking links the per-frame detections into one track per subject over time. You choose a detection run to track and the tracking algorithm to use.
Parameters¶
Detection run¶
detection_run_id · string · required
Detection run to track: its per-frame detections are linked into tracks (e.g. det_01).
Tracker¶
tracker_id · string · default anchor_tracker
Tracking algorithm to run, by registered tracker id. The default keeps one subject per frame: it takes the highest-confidence detection and attaches overlapping fragments of the same animal to it, which is the shape of every single-animal recording. Recordings with more than one subject are not supported yet.
Field of view¶
arena_name · string
Restrict tracking to inside the field of view with this name. A name rather than an id, because an arena id is only unique within one recording: ids are minted per recording, so the same id is a different polygon on the recording next to it. validate() resolves this to each recording's own arena_ids.
Field of view (resolved)¶
arena_ids · array
The resolved field of view: this recording's own arena id (at most one). Normally derived from arena_name; set it directly to name one particular recording's arena. Stored under the kind arena, which is what the on-disk paths still call it.
Use every¶
every_n_frames · integer · range ≥ 1
Use every Nth frame of the video. Omit to link every frame detection produced. Counted in source frames, so it must be a multiple of what detection used. Going coarser here also thins what embedding can read, and makes linking harder: the subject moves further between the frames being compared.
Hyperparameters¶
hyperparams · object
Tracker-specific hyperparameters; each tracker defines and validates its own set.
Tracker parameters¶
Tuning knobs for the chosen tracker. Which ones appear depends on the tracker you select.
Number of subjects¶
num_subjects · range 1–16
How many subjects (animals) to track. The anchor tracker currently supports a single subject.
Min detection confidence¶
conf_threshold · range 0–1
Lowest detector confidence a detection needs to be a subject candidate. Detections below it are ignored when forming tracks.
Secondary confidence¶
secondary_conf · range 0–1
Lowest confidence for a secondary (fragment) detection to attach to the subject. Must be at most the main detection confidence.
Fragment overlap¶
iou_threshold · range 0–1
Smallest box overlap (intersection over union) a lower-confidence detection needs with the subject to be merged into it as a fragment of the same animal.
Max secondary detections¶
max_secondary · range 0–100
Most lower-confidence secondary detections merged into the subject on a single frame.
Require contiguous mask¶
require_contiguous · range 0–1
Only accept a subject whose mask is a single connected region. On, a frame whose detections all have a split mask gets no subject at all, however confident the detector was. Usually leave this off.
Merge box IoU¶
merge_iou · range 0–1
Box-overlap pre-filter for merging fragments: a candidate whose box overlaps the subject less than this is not merged.
Merge mask IoU¶
merge_mask_iou · range 0–1
Mask-overlap floor for merging a fragment into the subject. It rejects a reflection whose box overlaps but whose mask does not. 0 disables the mask gate.
Max fragments merged¶
max_merge · range 0–20
Most detection fragments merged into one subject per frame. 0 keeps the single cleanest mask and merges nothing.
Continuity weight¶
iou_weight · range 0–10
How strongly a candidate's overlap with the subject's previous box is favored when scoring matches. Higher keeps the track on the same animal through crowding.
Max missed frames¶
max_missed · range 0–100000
Frames the subject may be absent, with no matching detection, before the track ends and must be re-acquired.
Max missed frames¶
max_missed_frames · range 0–100000
Frames a track survives without a matching detection before it ends.