Skip to content

Threshold selection

To make a decision the model outputs values between 0 and 1, one per class. The values are then binarized (i.e. classes which values that reach a certain threshold are set as active).

The model by default uses the thresholds in the f1.toml files optimized on the BabyTrain-2025 validation set.

For a high-precision version, you can use the hp.toml thresholds using the --high_precision flag or by passing the threholds file --thresholds thresholds/hp.toml when running the model. These thresholds have been selected by maximizing the precision while ensuring at least 50% of recall for the given class.

uv run scripts/infer.py      \
    --wavs <audio_folder>    \
    --output <output_folder> \
    --high_precision \
    --device cpu

You can use the following interactive visualizer by dragging each slider, or clicking directly on a chart, to set the decision threshold per class. The macro-F1 at the top updates live as you tune.