Update docs with detection threshold

This commit is contained in:
mbsantiago 2026-03-28 14:26:51 +00:00
parent b253a54cc8
commit 8e33473b4e
4 changed files with 13 additions and 2 deletions

1
.gitignore vendored
View File

@ -128,6 +128,7 @@ notebooks/tmp
/notebooks /notebooks
/AGENTS.md /AGENTS.md
/scripts /scripts
/todo.md
# Assets # Assets
!assets/* !assets/*

View File

@ -8,10 +8,18 @@ Run an initial prediction workflow and keep outputs in a dedicated folder.
## 2) Sweep threshold values ## 2) Sweep threshold values
If you use the legacy `detect` command, run multiple thresholds (for example, Run `predict` multiple times with different thresholds (for example `0.1`,
`0.1`, `0.3`, `0.5`) and compare output counts and quality on a validation `0.3`, `0.5`) and compare output counts and quality on the same validation
subset. subset.
```bash
batdetect2 predict directory \
path/to/model.ckpt \
path/to/audio_dir \
path/to/outputs_thr_03 \
--detection-threshold 0.3
```
## 3) Validate against known calls ## 3) Validate against known calls
Use files with trusted annotations or expert review to select a threshold that Use files with trusted annotations or expert review to select a threshold that

View File

@ -11,6 +11,7 @@ Migration at a glance
- Legacy: ``batdetect2 detect AUDIO_DIR ANN_DIR DETECTION_THRESHOLD`` - Legacy: ``batdetect2 detect AUDIO_DIR ANN_DIR DETECTION_THRESHOLD``
- Current: ``batdetect2 predict directory MODEL_PATH AUDIO_DIR OUTPUT_PATH`` - Current: ``batdetect2 predict directory MODEL_PATH AUDIO_DIR OUTPUT_PATH``
with optional ``--detection-threshold``
.. click:: batdetect2.cli.compat:detect .. click:: batdetect2.cli.compat:detect
:prog: batdetect2 detect :prog: batdetect2 detect

View File

@ -2,6 +2,7 @@ Predict command
=============== ===============
Run model inference from a directory, a file list, or a dataset. Run model inference from a directory, a file list, or a dataset.
Use ``--detection-threshold`` to override the model default per run.
.. click:: batdetect2.cli.inference:predict .. click:: batdetect2.cli.inference:predict
:prog: batdetect2 predict :prog: batdetect2 predict