BirdNET v2.4 (GLOBAL 6K) - ONNX variants
ONNX builds of the BirdNET GLOBAL 6K V2.4 bird sound classifier, optimized for edge deployment in BirdNET-Go. This repo holds the precision/backend variants; the stock upstream TFLite model is unchanged and not re-hosted here.
Powered by BirdNET (https://birdnet.cornell.edu/)
BirdNET is developed by the K. Lisa Yang Center for Conservation Bioacoustics at the Cornell Lab of Ornithology and Chemnitz University of Technology. These ONNX files are derived from the upstream BirdNET v2.4 model. Attribution to BirdNET is a hard license requirement: do not strip it.
Model summary
- Classes: 6,522 species (scientific + common name, see
labels.txt) - Sample rate: 48 kHz
- Clip length: 3 s (raw PCM waveform)
- Input tensor:
input,float32, shape[batch, 144000](3 s x 48 kHz) - Output tensor:
output,float32, shape[batch, 6522](per-class logits; apply sigmoid for confidence scores in[0, 1])
All six files share an identical input/output interface, so they are drop-in
replacements for one another. models.json lists each file's checksum, backend support
and the recommended file per platform.
Variants
| File | Precision | Size | Recommended for | Notes |
|---|---|---|---|---|
BirdNET_v2.4_int8_arm_foldconv.onnx |
INT8 (MatMul-only) + FP32 conv | ~32 MB | ONNX Runtime on ARM / low-RAM CPU | The folded front end below plus the INT8 head. Lowest RAM and fastest on Raspberry Pi 4 and 5 under ONNX Runtime. |
BirdNET_v2.4_fp32_foldconv.onnx |
FP32 | ~52 MB | ONNX Runtime CPU (x86 and Arm A76), OpenVINO CPU (x86) | Each spectrogram's Hann window, DFT and mel filterbank folded into one strided Conv. Fastest FP32 build on CPU. Not bit-exact, see below. |
BirdNET_v2.4_fp32_dfttrunc.onnx |
FP32 | ~54 MB | OpenVINO GPU, CUDA | In-graph DFT truncated to the bins the mel filterbank uses; same graph otherwise. |
BirdNET_v2.4_int8_arm_dfttrunc.onnx |
INT8 (MatMul-only) + FP32 conv | ~39 MB | ONNX Runtime on ARM / low-RAM CPU | Dynamic INT8 applied only to the 1024x6522 classification head; the CNN backbone stays FP32. Lowest RAM. |
BirdNET_v2.4_fp32.onnx |
FP32 | ~62 MB | full-precision reference | Kept for existing installs; prefer a build above. |
BirdNET_v2.4_int8_arm.onnx |
INT8 (MatMul-only) + FP32 conv | ~47 MB | Kept for existing installs; prefer int8_arm_dfttrunc. ~98% top-1 agreement vs FP32. |
fp32_foldconv
The fold replaces the framing Gather, window multiply and two MatMuls of each
spectrogram with a single strided 1-D Conv on the waveform, built with
birdnet-onnx-converter
--fold-frontend. The folded weights are computed in float64, but the summation order
changes, so outputs are close to, not identical with, the unfolded build:
- 47,009 real-audio windows (2,597 recordings, 1.5 s hop): max logit difference 2.7e-3 against the same converter build without the fold, identical top-1 in every window, and no detection changes at thresholds 0.1 to 0.9 or sensitivities 0.75 to 1.5. Its max logit difference against the upstream TFLite model is 2.6e-3.
- OpenVINO 2026.2: about 26% faster than
fp32_dfttruncon an Intel CPU at f32. On an Intel iGPU it is about 10% slower, sofp32_dfttruncstays the GPU choice. Do not run it on an Arm A76 at OpenVINO's default f16 hint: with a static[1, 144000]input shape, windows with most of their power below 150 Hz (wind) lose their scores. On 60 such windows a Pi 5 moved confidences by up to 0.39 against the TFLite model, and 4 fell to 0.00 (fp32_dfttruncwas worse). f32 and ONNX Runtime are clean; on the A76 ONNX Runtime is also faster than OpenVINO f32.
ONNX Runtime 1.31.1, ms per 3 s window at 1 / 4 threads:
| Host | fp32_foldconv | fp32_dfttrunc | int8_arm_dfttrunc |
|---|---|---|---|
| Raspberry Pi 5 | 57.2 / 26.0 | 79.2 / 35.2 | 77.0 / 32.9 |
| Raspberry Pi 4 | 180.8 / 84.2 | 250.7 / 111.2 | 241.1 / 104.7 |
Peak RSS is about 260 MB for both FP32 builds and about 247 MB for int8_arm_dfttrunc.
int8_arm_foldconv
fp32_foldconv with the 1024x6522 classification head quantized to INT8 (dynamic,
MatMul only, no calibration data); the folded front end and all Conv layers stay FP32.
It is built by applying the converter's --int8-arm quantization to the published
fp32_foldconv file. The quantization costs a little accuracy, the same as in
int8_arm_dfttrunc:
- 4,608 real-audio windows from 500 recordings, against the upstream TFLite model: max
confidence difference 0.0225 (99.99th percentile 0.0024), top-1 agrees in 99.1% of
windows and in all 1,513 windows where the TFLite top confidence is 0.5 or higher.
About 1% of detections near the threshold flip (10 of 806 at 0.8), against 12 of 806
for
int8_arm_dfttruncon the same windows. - 162 human-verified true-positive recordings: none lost its detection against the TFLite model at thresholds 0.3, 0.5 or 0.8.
- A Raspberry Pi 5 gives the same logits as x86 within 4.2e-3.
ONNX Runtime 1.31.1, ms per 3 s window at 1 / 4 threads, and peak RSS:
| Host | int8_arm_foldconv | int8_arm_dfttrunc | fp32_foldconv |
|---|---|---|---|
| Raspberry Pi 5 | 55.8 / 24.9, 147 MB | 76.0 / 33.5, 166 MB | 56.9 / 26.7, 183 MB |
| Raspberry Pi 4 | 177.0 / 78.0, 147 MB | 235.5 / 103.3, 168 MB | 181.3 / 82.6, 183 MB |
Run it on ONNX Runtime. It has not been tested on OpenVINO, and the stock INT8 build gave non-finite scores there at f16 on an Arm A76.
Precision notes
- CPU / ARM, low RAM: use
int8_arm_foldconv. Full all-ops INT8 (ConvInteger) is not shipped: it breaks accuracy (~34% top-1) and has no fast ARM kernel. Only MatMul-only quantization of the head is accuracy-safe. - OpenVINO: use an FP32 file, and on an Arm A76 prefer ONNX Runtime for BirdNET v2.4
(see
fp32_foldconvabove). The emptyINFERENCE_PRECISION_HINTresolves to f16 on fp16-capable hardware (A76 NEON, AVX512-FP16) and to f32 elsewhere. ForceINFERENCE_PRECISION_HINT=FP32on GPU, where f16 miscompiles. - f16 is intentionally not provided as a separate file: OpenVINO derives it from the FP32 master via the precision hint, and on CPU f16 uses more RAM than fp32 (the runtime up-converts f16 weights to f32 at load).
Note: this is the bird classifier. The BirdNET v2.4 backbone is also used as an embedding extractor for bat detection; that embedding model lives separately at
tphakala/BattyBirdNET-onnxand must stay FP32 (its raw embedding output overflows at f16).
Labels
labels.txt has 6,522 lines, one per class, in BirdNET order. Format is
Scientific name_Common name, for example:
Abroscopus albogularis_Rufous-faced Warbler
Output index i corresponds to line i of labels.txt.
Usage (ONNX Runtime, Python)
import numpy as np, onnxruntime as ort
sess = ort.InferenceSession("BirdNET_v2.4_fp32_foldconv.onnx")
# 3 s of 48 kHz mono PCM as float32, shape [1, 144000]
audio = np.zeros((1, 144000), dtype=np.float32)
logits = sess.run(["output"], {"input": audio})[0] # [1, 6522]
conf = 1.0 / (1.0 + np.exp(-logits)) # sigmoid -> [0, 1]
labels = open("labels.txt").read().splitlines()
top = conf[0].argmax()
print(labels[top], float(conf[0, top]))
Checksums
See SHA256SUMS and models.json.
License
BirdNET v2.4 is distributed under CC BY-NC-SA 4.0 (non-commercial, share-alike,
attribution required). See LICENSE and keep the BirdNET attribution above with any use
or redistribution.
Source
- Upstream: birdnet-team/BirdNET-Analyzer
- ONNX conversion and optimization: tphakala/birdnet-onnx-converter
- Catalog and deployment: tphakala/birdnet-go