Ir para o conteúdo
ModelListadosExterno
Browse files

BattyBirdNET Onnx

ONNX-converted regional bat species classifiers from BattyBirdNET-Analyzer, optimized for inference with ONNX Runtime.

TipoOtherVersãoRevision f685d7fCnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
12,5 KB–63,8 MB
Versão
vRevision f685d7f
Atualizado
25 de out. de 2026
Downloads
0
Fonte
Hugging Face

Descrição da fonte

BattyBirdNET ONNX Models

ONNX-converted regional bat species classifiers from BattyBirdNET-Analyzer, optimized for inference with ONNX Runtime.

These are lightweight classification heads trained on BirdNET v2.4 embeddings using transfer learning. They identify bat species from ultrasonic echolocation recordings.

Attribution

Powered by BirdNET (https://birdnet.cornell.edu/). These bat classifiers are built on BirdNET v2.4 embeddings via transfer learning and inherit BirdNET's CC BY-NC-SA 4.0 terms. The classifier heads originate from BattyBirdNET-Analyzer by rdz-oss. Crediting BirdNET is required wherever these models are used.

How It Works

BattyBirdNET uses a two-stage inference pipeline:

  1. BirdNET v2.4 extracts 1024-dim embeddings from audio
  2. Regional bat classifier (this repo) maps embeddings to bat species

The "slow-down trick": bat recordings at 256 kHz are fed directly to BirdNET without resampling. BirdNET's spectrogram pipeline (trained on 48 kHz bird audio) treats the samples as 48 kHz, shifting ultrasonic bat calls (20-120 kHz) into the audible frequency range where its learned features work.

Model Variants

Three precision formats are provided for each regional classifier:

FormatDirectoryUse Case
FP32fp32/Standard precision for GPU and desktop CPU
FP16fp16/Half precision for Raspberry Pi 5, modern GPUs
INT8int8/Quantized for low-power devices, embedded ARM

Available Regions

RegionModelSpeciesCoverage
BavariaBattyBirdNET-Bavaria-256kHz32Germany, Central Europe
Bavaria (high)BattyBirdNET-Bavaria-256kHz-high24Germany, stricter thresholds
EUBattyBirdNET-EU-256kHz30Broad European coverage
ScotlandBattyBirdNET-Scotland-256kHz11Scotland
South WalesBattyBirdNET-SouthWales-256kHz29South Wales
SwedenBattyBirdNET-Sweden-256kHz23Sweden, Nordic
UKBattyBirdNET-UK-256kHz20United Kingdom
USABattyBirdNET-USA-256kHz38United States (full)
USA EastBattyBirdNET-USA-EAST-256kHz23Eastern United States
USA East (high)BattyBirdNET-USA-EAST-256kHz-high17Eastern US, stricter thresholds
USA WestBattyBirdNET-USA-WEST-256kHz28Western United States

Model Architecture

  • Input: [batch, 1024] float32 (BirdNET v2.4 embedding vectors)
  • Output: [batch, N_species] float32 (raw logits, apply sigmoid for probabilities)
  • Activation: Sigmoid (same as BirdNET)
  • Labels: One species per line in corresponding _Labels.txt file

Usage with Birda (Rust CLI)

# Install models
mkdir -p ~/.local/share/birda/models/bat/
cp fp32/BattyBirdNET-Bavaria-256kHz_fp32.onnx ~/.local/share/birda/models/bat/
cp labels/BattyBirdNET-Bavaria-256kHz_Labels.txt ~/.local/share/birda/models/bat/

# Run bat detection
birda analyze -m birdnet-v24-embeddings --bat bavaria bat_recording.wav

See birda for full documentation.

Usage with Python (ONNX Runtime)

import numpy as np
import onnxruntime as ort

# Load BirdNET v2.4 (with embeddings exposed) and bat classifier
birdnet = ort.InferenceSession("birdnet-v24-embeddings.onnx")
bat_model = ort.InferenceSession("fp32/BattyBirdNET-Bavaria-256kHz_fp32.onnx")

# Load 256kHz bat audio (144,000 samples = 0.5625s)
audio = np.random.randn(1, 144000).astype(np.float32)  # replace with real audio

# Stage 1: Extract embeddings
outputs = birdnet.run(None, {"input": audio})
embeddings = outputs[1]  # [1, 1024]

# Stage 2: Classify bat species
logits = bat_model.run(None, {"input": embeddings})[0]
scores = 1 / (1 + np.exp(-logits))  # sigmoid

# Load labels
with open("labels/BattyBirdNET-Bavaria-256kHz_Labels.txt") as f:
    labels = [line.strip() for line in f if line.strip()]

for i, (label, score) in enumerate(zip(labels, scores[0])):
    if score > 0.1:
        print(f"{label}: {score:.1%}")

Conversion Details

Converted from BattyBirdNET-Analyzer v1.0 TFLite models using birdnet-onnx-converter:

  • TFLite to ONNX via tf2onnx (opset 17)
  • Optimized with onnxslim (graph simplification, dynamic batching)
  • FP16 and INT8 quantization via onnxconverter-common and onnxruntime

Audio Requirements

  • Sample rate: 256 kHz (standard for AudioMoth and similar bat detectors)
  • Chunk size: 144,000 samples (0.5625 seconds at 256 kHz)
  • Overlap: 25% recommended (36,000 samples)
  • Format: WAV recommended; FLAC, MP3 also supported

Training Data Sources

The original BattyBirdNET models were trained on data from:

License

CC-BY-NC-SA-4.0 (non-commercial use only), following the original BattyBirdNET-Analyzer license.

Citation

If you use these models, please cite:

Acknowledgments

  • rdz-oss for the original BattyBirdNET-Analyzer and trained models
  • BirdNET team at Cornell Lab of Ornithology for the BirdNET v2.4 backbone
  • birdnet-onnx-converter for TFLite-to-ONNX conversion and optimization

Fontes

1 fonte
Hugging FacePrimárioVersão f685d7f7de1805ef83f71ffaad7440a8f40b4e10
huggingface.co/tphakala/BattyBirdNET-onnx/tree/f685d7f7de1805ef83f71ffaad7440a8f40b4e10

Verificado 25 de out.

Download files

Artefatos de modelo

42 artefatos

birdnet-v2.4-embeddings-fp32-dfttrunc.onnx

onnx · 56,0 MB · SHA-256 b91139d3c63d…c380 · Hugging Face

Download file

birdnet-v2.4-embeddings-fp32.onnx

onnx · 63,8 MB · SHA-256 b6b8f24dc9c3…3fb0 · Hugging Face

Download file

birdnet-v24-embeddings.onnx

onnx · 63,8 MB · SHA-256 b6b8f24dc9c3…3fb0 · Hugging Face

Download file

fp16/BattyBirdNET-Bavaria-256kHz_fp16.onnx

onnx · 65,0 KB · SHA-256 9607c44c07a9…1712 · Hugging Face

Download file

fp16/BattyBirdNET-Bavaria-256kHz-high_fp16.onnx

onnx · 49,0 KB · SHA-256 eb3ec7d55ccd…33a8 · Hugging Face

Download file

fp16/BattyBirdNET-EU-256kHz_fp16.onnx

onnx · 61,0 KB · SHA-256 b8c55ea4a6f1…f4f6 · Hugging Face

Download file

fp16/BattyBirdNET-Scotland-256kHz_fp16.onnx

onnx · 23,0 KB · SHA-256 0c2a04eaeb43…d296 · Hugging Face

Download file

fp16/BattyBirdNET-SouthWales-256kHz_fp16.onnx

onnx · 59,0 KB · SHA-256 bd7e1c1aecdd…d28c · Hugging Face

Download file

fp16/BattyBirdNET-Sweden-256kHz_fp16.onnx

onnx · 47,0 KB · SHA-256 e83c5c0e9ea3…a557 · Hugging Face

Download file

fp16/BattyBirdNET-UK-256kHz_fp16.onnx

onnx · 41,0 KB · SHA-256 66727d308a9d…c59c · Hugging Face

Download file

fp16/BattyBirdNET-USA-256kHz_fp16.onnx

onnx · 77,0 KB · SHA-256 ce2e97c2cee5…4ea0 · Hugging Face

Download file

fp16/BattyBirdNET-USA-EAST-256kHz_fp16.onnx

onnx · 47,0 KB · SHA-256 92eebbf58e68…68be · Hugging Face

Download file

fp16/BattyBirdNET-USA-EAST-256kHz-high_fp16.onnx

onnx · 35,0 KB · SHA-256 15bb5171c27c…6fa6 · Hugging Face

Download file

fp16/BattyBirdNET-USA-WEST-256kHz_fp16.onnx

onnx · 57,0 KB · SHA-256 3fef1087f874…0ccf · Hugging Face

Download file

fp16/CUSTOM-BAT-256kHz_fp16.onnx

onnx · 63,0 KB · SHA-256 275306567c8f…f6c5 · Hugging Face

Download file

fp16/CUSTOM-BIRD-48kHz_fp16.onnx

onnx · 63,0 KB · SHA-256 275306567c8f…f6c5 · Hugging Face

Download file

fp32/BattyBirdNET-Bavaria-256kHz_fp32.onnx

onnx · 129 KB · SHA-256 7ee3936621d1…44ea · Hugging Face

Download file

fp32/BattyBirdNET-Bavaria-256kHz-high_fp32.onnx

onnx · 96,7 KB · SHA-256 3d1d5bc174ed…7a30 · Hugging Face

Download file

fp32/BattyBirdNET-EU-256kHz_fp32.onnx

onnx · 121 KB · SHA-256 f316073482ab…12f7 · Hugging Face

Download file

fp32/BattyBirdNET-Scotland-256kHz_fp32.onnx

onnx · 44,7 KB · SHA-256 003e3da16d36…bd85 · Hugging Face

Download file

fp32/BattyBirdNET-SouthWales-256kHz_fp32.onnx

onnx · 117 KB · SHA-256 14534d34fc54…aea4 · Hugging Face

Download file

fp32/BattyBirdNET-Sweden-256kHz_fp32.onnx

onnx · 92,7 KB · SHA-256 85fe47431c27…b591 · Hugging Face

Download file

fp32/BattyBirdNET-UK-256kHz_fp32.onnx

onnx · 80,7 KB · SHA-256 aa9d45a5e3e6…27b6 · Hugging Face

Download file

fp32/BattyBirdNET-USA-256kHz_fp32.onnx

onnx · 153 KB · SHA-256 9230fb49c87b…cc63 · Hugging Face

Download file

fp32/BattyBirdNET-USA-EAST-256kHz_fp32.onnx

onnx · 92,7 KB · SHA-256 403901ce25c3…5241 · Hugging Face

Download file

fp32/BattyBirdNET-USA-EAST-256kHz-high_fp32.onnx

onnx · 68,7 KB · SHA-256 cb3fd538fb8a…9772 · Hugging Face

Download file

fp32/BattyBirdNET-USA-WEST-256kHz_fp32.onnx

onnx · 113 KB · SHA-256 d1d3573a379e…40fa · Hugging Face

Download file

fp32/CUSTOM-BAT-256kHz_fp32.onnx

onnx · 125 KB · SHA-256 ae595245624d…17e5 · Hugging Face

Download file

fp32/CUSTOM-BIRD-48kHz_fp32.onnx

onnx · 125 KB · SHA-256 ae595245624d…17e5 · Hugging Face

Download file

int8/BattyBirdNET-Bavaria-256kHz_int8.onnx

onnx · 33,6 KB · SHA-256 203dd61bf334…99d7 · Hugging Face

Download file

int8/BattyBirdNET-Bavaria-256kHz-high_int8.onnx

onnx · 25,6 KB · SHA-256 e62a504ab8ed…8c8d · Hugging Face

Download file

int8/BattyBirdNET-EU-256kHz_int8.onnx

onnx · 31,6 KB · SHA-256 9e8fc9933daf…8f6c · Hugging Face

Download file

int8/BattyBirdNET-Scotland-256kHz_int8.onnx

onnx · 12,5 KB · SHA-256 cb25a24e522e…e90a · Hugging Face

Download file

int8/BattyBirdNET-SouthWales-256kHz_int8.onnx

onnx · 30,6 KB · SHA-256 eb58d9f7bd15…fa87 · Hugging Face

Download file

int8/BattyBirdNET-Sweden-256kHz_int8.onnx

onnx · 24,6 KB · SHA-256 72b4e707f820…7601 · Hugging Face

Download file

int8/BattyBirdNET-UK-256kHz_int8.onnx

onnx · 21,5 KB · SHA-256 2a2ae8a29c0e…3d98 · Hugging Face

Download file

int8/BattyBirdNET-USA-256kHz_int8.onnx

onnx · 39,6 KB · SHA-256 bc03c136d268…2b91 · Hugging Face

Download file

int8/BattyBirdNET-USA-EAST-256kHz_int8.onnx

onnx · 24,6 KB · SHA-256 f37fe07e5731…c415 · Hugging Face

Download file

int8/BattyBirdNET-USA-EAST-256kHz-high_int8.onnx

onnx · 18,5 KB · SHA-256 3cdf6b220aa6…67a3 · Hugging Face

Download file

int8/BattyBirdNET-USA-WEST-256kHz_int8.onnx

onnx · 29,6 KB · SHA-256 75aa2fb3252f…d8aa · Hugging Face

Download file

int8/CUSTOM-BAT-256kHz_int8.onnx

onnx · 32,6 KB · SHA-256 e211c313ea0d…72ba · Hugging Face

Download file

int8/CUSTOM-BIRD-48kHz_int8.onnx

onnx · 32,6 KB · SHA-256 e211c313ea0d…72ba · Hugging Face

Download file

Trechos de fonte

2 trechos

--- license: cc-by-nc-sa-4.0 language: - en tags: - onnx - bioacoustics - bat-detection - birdnet - echolocation - wildlife datasets: - xeno-canto - chirovox pipeline_tag: audio-classification library_name: onnxruntime --- # BattyBirdNET ONNX Models ONNX-converted regional bat species classifiers from [BattyBirdNET-Analyzer](https://github.com/rdz-oss/BattyBirdNET-Analyzer), optimized for inference with ONNX Runtime. These are lightweight classification heads trained on [BirdNET](https://github.com/birdnet-team/BirdNET-Analyzer) v2.4 embeddings using transfer learning. They identify bat species from ultrasonic echolocation recordings. ## Attribution Powered by BirdNET (https://birdnet.cornell.edu/). These bat classifiers are built on **BirdNET v2.4** embeddings via transfer learning and inherit BirdNET's CC BY-NC-SA 4.0 terms. The classifier heads originate from [BattyBirdNET-Analyzer](https://github.com/rdz-oss/BattyBirdNET-Analyzer) by rdz-oss. Crediting BirdNET is required wherever these models are used. ## How It Works BattyBirdNET uses a two-stage inference pipeline: 1. **BirdNET v2.4** extracts 1024-dim embeddings from audio 2. **Regional bat classifier** (this repo) maps embeddings to bat species The "slow-down trick": bat recordings at 256 kHz are fed directly to BirdNET without resampling. BirdNET's spectrogram pipeline (trained on 48 kHz bird audio) treats the samples as 48 kHz, shifting ultrasonic bat calls (20-120 kHz) into the audible frequency range where its learned features work. ## Model Variants Three precision formats are provided for each regional classifier: | Format | Directory | Use Case | |--------|-----------|----------| | FP32 | `fp32/` | Standard precision for GPU and desktop CPU | | FP16 | `fp16/` | Half precision for Raspberry Pi 5, modern GPUs | | INT8 | `int8/` | Quantized for low-power devices, embedded ARM | ## Available Regions | Region | Model | Species | Coverage | |--------|-------|---------|----------| | Bavaria | `BattyBirdNET-Bavaria-256kHz` | 32 | Germany, Central Europe | | Bavaria (high) | `BattyBirdNET-Bavaria-256kHz-high` | 24 | Germany, stricter thresholds | | EU | `BattyBirdNET-EU-256kHz` | 30 | Broad European coverage | | Scotland | `BattyBirdNET-Scotland-256kHz` | 11 | Scotland | | South Wales | `BattyBirdNET-SouthWales-256kHz` | 29 | South Wales | | Sweden | `BattyBirdNET-Sweden-256kHz` | 23...

Source context: 0 downloads · 0 likes · Pipeline audio-classification · Library onnxruntime · Repo tphakala/BattyBirdNET-onnx