Skip to content

Demo ONNX

Run BirdBox detection entirely in your browser. The graphs under docs/models/ bake in PCEN preprocessing, YOLO inference, NMS, and song reconstruction. No Python install and no server-side GPU queue.

Browser limits

  • First model download is large (about 50 MB for Just-Bird fp32). The file is cached by your browser afterward.
  • Audio is decoded locally, resampled to 32 kHz, and truncated to 60 seconds.
  • Requires a recent browser with WebAssembly. Safari can be slower than Chromium or Firefox.
  • This showcase is for quick checks. Use the Streamlit demo or the CLI for long files and batch jobs.

Interactive Demo

Models are loaded from docs/models/ via manifest.json.

No file chosen

WAV or FLAC recommended. Minimum 3 seconds. Maximum 60 seconds in this demo.

0.18
0.10

Loading demo…

Songs 0
Species 0
Avg Confidence
Start (s) End (s) Low (Hz) High (Hz) Avg Conf Max Conf Merged Species

Adding models

  1. Export for the docs demo.

    python src/inference/onnx_export.py \
        --output-path docs/models/Just-Bird_fp32.onnx \
    
    python src/inference/onnx_export.py `
        --output-path docs/models/Just-Bird_fp32.onnx `
    
    python src/inference/onnx_export.py ^
        --output-path docs/models/Just-Bird_fp32.onnx ^
    

    conf and song_gap are required graph inputs. The demo sliders feed them on every run. Suggested defaults are stored in ONNX metadata (default_conf, default_song_gap).

  2. Place the .onnx file under docs/models/ if the export path was elsewhere.

  3. Add an entry to docs/models/manifest.json.

    {
      "models": [
        {
          "file": "Just-Bird_fp32.onnx",
          "label": "Just-Bird_fp32.onnx",
          "names": { "0": "bird" }
        },
        {
          "file": "Hawaii_fp32.onnx",
          "label": "Hawaii_fp32.onnx",
          "names": { "0": "hawama", "1": "ercfra" }
        }
      ]
    }
    

The dropdown reads that manifest on page load. Put class labels in the optional names map (ONNX Runtime Web does not expose ONNX metadata props).


Output columns

Column Meaning
Start / End Song bounds in seconds from the start of the (possibly truncated) audio
Low / High Frequency bounds in Hz
Avg Conf / Max Conf Mean and peak confidence over merged clip detections
Merged Number of clip-level boxes folded into the song
Species Label from model metadata (names)

For the full set of BirdBox file formats outside the browser, see Detection Output Formats.