Repository navigation
ONNX demo: 10 min audio, single resample, Streamlit NMS 0.7 - #25
Merged
Merged
Conversation
Streamlit hard-coded 0.5 while the CLI default and the ONNX export use 0.7, the value the window fusion constants were tuned with. On 13 test recordings this alone changed about 3% of the Just-Bird boxes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Limit raised from 60 s to 600 s, as in the Streamlit demo. The graph itself has no length limit. - Decode straight into a 32 kHz OfflineAudioContext. The default AudioContext resampled to the hardware rate first, so 32 kHz files were resampled twice. - Feed the unpadded audio: the graph pads to the clip grid and trims detections before window fusion, as detect_birds.py does. - Spectrogram drawn as 60 s canvas tiles; one canvas broke past the browser limit of about 32k px (5.5 min). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Loop.OfflineAudioContext. Before, the defaultAudioContextresampled to the hardware rate (often 48 kHz) first.detect_birds.pydoes.write_metadatainonnx_export.py.Parity check
detect_birds.pywithmodels/Just-Bird.pt(conf 0.18, phrase gap 0.05) against the all-in-one graph, run in Python ONNX Runtime. Audio:tests/test.wavplus the 12 parity soundscapes, 1231 reference boxes. A box counts as matched at IoU ≥ 0.5.docs/models)Browser demo in headless Firefox, compared with Python ONNX on librosa-resampled audio (60 s excerpts):
For input that isn't 32 kHz, the remaining gap comes from the browser's resampler. The page now says so.
Test plan
mkdocs build, then the demo page in headless Firefox on 300 s (32 kHz) and 200 s (48 kHz) files: 104 and 129 boxes, 5 and 4 spectrogram tiles, 25 s and 15 s of inferenceonnx_export.pycompiles🤖 Generated with Claude Code