Views
No views yet
| 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 |
| 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 | Sweden, Nordic |
| UK | BattyBirdNET-UK-256kHz | 20 | United Kingdom |
| USA | BattyBirdNET-USA-256kHz | 38 | United States (full) |
| USA East | BattyBirdNET-USA-EAST-256kHz | 23 | Eastern United States |
| USA East (high) | BattyBirdNET-USA-EAST-256kHz-high | 17 | Eastern US, stricter thresholds |
| USA West | BattyBirdNET-USA-WEST-256kHz | 28 | Western United States |
[batch, 1024] float32 (BirdNET v2.4 embedding vectors)[batch, N_species] float32 (raw logits, apply sigmoid for probabilities)_Labels.txt file1# Install models
2mkdir -p ~/.local/share/birda/models/bat/
3cp fp32/BattyBirdNET-Bavaria-256kHz_fp32.onnx ~/.local/share/birda/models/bat/
4cp labels/BattyBirdNET-Bavaria-256kHz_Labels.txt ~/.local/share/birda/models/bat/
5
6# Run bat detection
7birda analyze -m birdnet-v24-embeddings --bat bavaria bat_recording.wav1import numpy as np
2import onnxruntime as ort
3
4# Load BirdNET v2.4 (with embeddings exposed) and bat classifier
5birdnet = ort.InferenceSession("birdnet-v24-embeddings.onnx")
6bat_model = ort.InferenceSession("fp32/BattyBirdNET-Bavaria-256kHz_fp32.onnx")
7
8# Load 256kHz bat audio (144,000 samples = 0.5625s)
9audio = np.random.randn(1, 144000).astype(np.float32) # replace with real audio
10
11# Stage 1: Extract embeddings
12outputs = birdnet.run(None, {"input": audio})
13embeddings = outputs[1] # [1, 1024]
14
15# Stage 2: Classify bat species
16logits = bat_model.run(None, {"input": embeddings})[0]
17scores = 1 / (1 + np.exp(-logits)) # sigmoid
18
19# Load labels
20with open("labels/BattyBirdNET-Bavaria-256kHz_Labels.txt") as f:
21 labels = [line.strip() for line in f if line.strip()]
22
23for i, (label, score) in enumerate(zip(labels, scores[0])):
24 if score > 0.1:
25 print(f"{label}: {score:.1%}")