Skip to content

feat: default confidence 0.15 for Just-Bird - #30

Merged
El1as42 merged 1 commit into
mainfrom
feat/just-bird-conf-0.15
Oct 21, 2026
Merged

El1as42 merged 1 commit into
mainfrom
feat/just-bird-conf-0.15

Conversation

@El1as42

@El1as42 El1as42 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Why

The repo had three different confidence defaults, none of them tuned for the current Just-Bird:

  • 0.18: Streamlit slider (set in Dec 2025 for an older model), copied into onnx_export.py, the ONNX demo, the Java example and the default_conf metadata of docs/models/Just-Bird_fp16.onnx.
  • 0.2: detect_birds.py --conf, filter_and_merge_detections.py --conf, pipeline step 3.
  • about 0.15: the recommendation on the Just-Bird model page.

Micro F1 at IoU 0.5 from the phrase-gap study (BirdBox-Train runs/Just-Bird/phrase_gap/):

conf Hawaii val, gap off Hawaii val, 0.05 s SSN hold-out, gap off SSN hold-out, 0.05 s Western-US val, 0.05 s
0.09 0.569 0.509 0.385 0.395 0.193
0.13 0.581 0.531 0.384 0.392 0.194
0.15 0.577 0.529 0.383 0.391 0.197
0.18 0.566 0.522 0.381 0.390 0.195
best at 0.13 0.14 0.09 0.08 0.16

0.15 is within 0.005 of the best on every set. The threshold is chosen on the val sets; the SSN hold-out is the unseen-site test and is not used for tuning.

What

  • detect_birds.resolve_conf: 0.15 for Just-Bird, 0.2 (unchanged) for the other models, which were not part of this study.
  • Used by detect_birds.py --conf, filter_and_merge_detections.py --conf (from model_config.species_mapping), the Streamlit slider and onnx_export.py --conf. An explicit --conf still wins.
  • ONNX demo slider and Java example: 0.15. docs/models/Just-Bird_fp16.onnx: default_conf and input_conf metadata 0.18 → 0.15, graph bytes unchanged.
  • Pipeline step 3 (.sh, .ps1, .bat) drops --conf 0.2 and uses the model default. The old comment said 0.25.
  • Docs: --conf rows in detect-birds and filter-and-merge, the API page, the Just-Bird model page.

Checks

  • detect_birds.py on tests/test.wav: Just-Bird default gives conf: 0.15 in args.yaml and 131 boxes, the same as --conf 0.15. Hawaii gives 0.2.
  • filter_and_merge_detections.py without --conf: 0.15 on a Just-Bird dump, 0.2 on a Western-US model dump; --conf 0.3 is kept; --conf 1.5 is rejected.
  • Streamlit AppTest: slider 0.15 for Just-Bird, 0.2 for Hawaii and Western-US, no exceptions.
  • Fresh fp16 exports: default_conf 0.15 (Just-Bird), 0.2 (Hawaii).
  • tests/onnx_graph_parity.py on the updated Just-Bird_fp16.onnx: conf 0.15 from the metadata, PASS (130 of 131 boxes, mean IoU 0.993).
  • mkdocs build --strict passes; the demo slider renders at 0.15.
  • Not run: the Java example (no JDK here), .ps1 and .bat (no PowerShell/CMD).

🤖 Generated with Claude Code

0.18 was set for the Streamlit slider in December 2025 for an older model
and copied into the ONNX export, the docs demo and the Java example; the
CLIs used 0.2. For the current Just-Bird the best IoU 0.5 micro F1 is at
0.13 to 0.14 on Hawaii val and 0.16 on Western-US val, and 0.15 is within
0.005 of the best on those and on the Southern Sierra Nevada hold-out.

resolve_conf gives 0.15 for Just-Bird and keeps 0.2 for the other models
in detect_birds.py, filter_and_merge_detections.py (from model_config),
the Streamlit slider and onnx_export.py. The demo slider, the Java
example and the default_conf metadata of docs/models/Just-Bird_fp16.onnx
(graph unchanged) say 0.15. Pipeline step 3 uses the model default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@El1as42
El1as42 merged commit 9f911af into main Oct 21, 2026
1 check passed
@El1as42
El1as42 deleted the feat/just-bird-conf-0.15 branch October 21, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant