Skip to main content

BirdNET-only inference package for ARIA (Acoustic Recognition for Inventories of Aviaries)

Project description

aria-inference-birdnet

BirdNET-only inference package for ARIA (Acoustic Recognition for Inventories of Aviaries).

This is the baseline detection system for the BioDCASE 2026 Challenge.

Installation

Requires Python 3.11 or 3.12.

pip install aria-inference-birdnet

This automatically installs BirdNET-Analyzer and all other dependencies.

Quick start

1. Download model files

aria-inference-birdnet download-models --dir ./models

This fetches the custom BirdNET classifier and species labels from GitHub Releases.

2. Run detection on an aviary

Each aviary has a different set of species. The aviary_config.json (provided with the challenge data) maps each aviary ID to its species list, so that predictions are filtered to only the species that can actually be present.

aria-inference-birdnet detect \
  --input aviary_1/ \
  --output predictions_aviary_1.csv \
  --model-dir ./models \
  --aviary-config aviary_config.json \
  --aviary aviary_1

3. List available aviaries

aria-inference-birdnet list-aviaries --aviary-config aviary_config.json

4. Python API

from pathlib import Path
from aria_inference_birdnet import run_detection

run_detection(
    input_path=Path("aviary_1/"),
    output_csv=Path("predictions_aviary_1.csv"),
    model_dir=Path("models/"),
    aviary_config=Path("aviary_config.json"),
    aviary_id="aviary_1",
)

How aviary filtering works

The aviary_config.json contains two things:

  • Wild birds: species common to all aviaries (e.g. House Sparrow, Common Blackbird). These are always included in predictions.
  • Per-aviary species: species that live in a specific aviary.

When you specify --aviary aviary_1, the detector only keeps predictions for that aviary's species plus wild birds. This removes false positives from species that are not present in the aviary.

Alternatively, you can use a flat species file with --allowed-species-file instead of the aviary config. This applies the same species list to all input audio regardless of aviary.

CLI reference

detect

Flag Default Description
--input (required) Audio file or directory
--output (required) Output CSV path
--model-dir (required) Directory with model files
--aviary-config None Path to aviary_config.json
--aviary None Aviary ID (e.g. aviary_1). Requires --aviary-config
--allowed-species-file None Flat species whitelist (alternative to aviary config)
--min-confidence 0.05 Global confidence cutoff
--temperature 1.8 Confidence scaling (T>1 reduces saturation)
--overlap 0.0 Window overlap in seconds
--threads 4 CPU threads
--topk 3 Max species per window (0=disable)
--eval-csv (auto) Per-class threshold CSV

download-models

Flag Default Description
--dir (required) Local directory for model files
--skip-optional False Skip the evaluation CSV

list-aviaries

Flag Default Description
--aviary-config (required) Path to aviary_config.json

Pipeline stages

  1. BirdNET analysis – runs birdnet_analyzer.analyze on the input audio
  2. Species filtering – keeps only species present in the aviary (from config) or in the allowed-species file
  3. Temperature scaling – calibrates over-saturated confidences (T=1.8 by default)
  4. CSV merging – combines per-file result CSVs into one
  5. Per-class thresholds – applies optimal thresholds from training evaluation (if available)
  6. Top-K filtering – keeps at most K species per 3-second window

Output format

File name,Start (s),End (s),Scientific name,Common name,Confidence
recording_001.wav,0.0,3.0,Phoenicopterus roseus,Greater Flamingo,0.8734
recording_001.wav,3.0,6.0,Bostrychia hagedash,Hadada Ibis,0.7521

Notes

  • This package is inference-only. It does not include training, data fetching, or segmentation.
  • Model binaries are hosted as GitHub Release assets to keep the pip package small.
  • Python 3.10 is not supported because birdnet-analyzer requires ≥3.11.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aria_inference_birdnet-0.1.3.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aria_inference_birdnet-0.1.3-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file aria_inference_birdnet-0.1.3.tar.gz.

File metadata

  • Download URL: aria_inference_birdnet-0.1.3.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for aria_inference_birdnet-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4e17c9dd862b71d86e721d2cd945c8b6c67e1dc7d26ac1745bbc9ff07b2582a4
MD5 121d337e19ba587eecc1063519e47f59
BLAKE2b-256 0e5557350ca36c8415c29d09746d280dd9210fb153f2f5c38f49ae7e74cc9a71

See more details on using hashes here.

File details

Details for the file aria_inference_birdnet-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for aria_inference_birdnet-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 238c3b5f31db96b5c35818c5525705988e4bbf483dd3aa4dac6be250d62e5b8d
MD5 cd78ea2d5274d8673d9e104739c11208
BLAKE2b-256 9f3fe2b619a44d1a658a226b227069656814ab28aaabfc652f5ba36ca0e44504

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page