Labeling¶
Labeling builds a training dataset by sampling frames across a recording and segmenting them with a prompt-capable model. The resulting masks become polygon labels for training a detector.
Parameters¶
Teacher model¶
model_id · string · default sam3
The teacher: a prompt-capable model that labels the frames (e.g. sam3).
Teacher size¶
model_variant · string
Teacher size/variant, if the model has size options; omit for the default.
Frames to label¶
n_frames · integer · required · range ≥ 1
Total frames to sample and label, allocated proportionally to recording length.
Frame sampling¶
sampling · string · default stratified
Within each video: 'stratified' spreads picks evenly across time (one draw per equal-width bin); 'uniform' is fully random.
Confidence threshold¶
logit_threshold · number · default 0.5 · range 0–1
Confidence threshold for keeping a detection.
Min contour area¶
min_contour_area · integer · default 100 · range ≥ 0 · unit px
Drop mask contours smaller than this many pixels.
Validation split¶
val_split · number · default 0.15 · range 0–<1
Fraction of labeled frames held out for validation (stratified per recording).
Background share¶
background_share · number · default 0.1 · range 0–0.5
Largest share of the dataset that may be empty background. A background image is one where the teacher found none of the classes; it is kept with an empty label so the trained detector learns what nothing there looks like. 0 keeps none.
Negative prompt¶
negative_prompt · string
Something in the video that touches the animal but is not it, such as a tether, cable or patch cord. The teacher labels it as a class of its own, so the trained detector learns to tell it apart from your classes and never reports it. Leave empty for none. For a tethered animal, cable works with SAM 3 where tether finds nothing. Check it with Test prompts: it must not take part of the animal, such as a tail.