sidecar
birdnet_stm32.data.sidecar
¶
Per-file label additions read from a CSV next to the folder labels.
A training file's folder names one class. Some recordings carry more: an annotated soundscape segment can hold several species, and a validated clip can state that a species is not there. The sidecar adds both, by sample id (the file's stem):
sample_id,positives,negatives
3f2a...,american_robin;song_sparrow,
9c41...,,blue_jay;house_finch
positives: classes present besides the folder's, set to 1 in the hard label;negatives: classes confirmed absent: their hard target is 0 and the teacher's soft target is not blended in for them, whatever the teacher heard.
Either column may be missing or empty. Labels not in the class list are ignored.
load_label_sidecar(path, classes)
¶
Map sample id -> (positive class indices, negative class indices).
Source code in birdnet_stm32/data/sidecar.py
load_field_table(path)
¶
Map sample id -> (site, recording) for the field clips the class cap draws for diversity.
A CSV with sample_id,site,recording: field recordings (soundscape segments, field
clips) and where they come from. Files not listed are focal. See ClassCappedPasses.