A deep-learning system for passive acoustic monitoring of bird species. OrniWatch uses a Convolutional Recurrent Neural Network (CRNN) to detect bird vocalisations in long-form audio recordings, outputting per-frame predictions over time for each of 10 target species.
OrniWatch identifies bird species from raw audio recordings.
Key characteristics:
- Input: Long-form audio recordings (field recordings, autonomous recorders)
- Output: Per-timestep probability scores across 10 bird species (multilabel)
- Target classes include:
- Amazonian Grosbeak (South America)
- Gray-fronted Dove (South America)
- Stock-dove (Europe)
- Thrush-like Wren (South America)
- Eurasian Blackcap (Europe)
- (+ 5 additional species)
- Challenge: extreme label sparsity, positive label fraction ≈ 0.005 in the time dimension
Data pipeline:
- Train and validation recordings are sourced from strictly separate files to prevent leakage.
- 10 species classes were selected from the full dataset.
- Long recordings are segmented into short windows according to the main annotation file.
- Segments are pre-computed and cached as tensors for training efficiency.
- Key preprocessing parameters:
hop_length: STFT hop size controlling temporal resolutionn_mels: number of mel filterbank binswindow_len(seconds): segment length fed to the model
- Data augmentation is applied during training.
The extreme label sparsity (positive fraction ≈ 0.005) was handled with large positive-sample weights in BCEWithLogitsLoss, upweighting rare bird-call frames instead of oversampling.
Small input windows caused the model to overfit rapidly, with validation loss diverging while training loss kept falling. Increasing the window to about 50 s kept validation loss stable.
Thrush-like Wren was the best-detected class, though some background noise remains in the predictions.
Two more examples from the manually gathered dataset:
- Amazonian Grosbeak: detections are reasonably clean and correlate well with actual vocalisations.
- Gray-fronted Dove (South America): shows detectable activations despite not being one of the 10 training classes, suggesting the model picked up some generalizable acoustic features.
OrniWatch uses a CNN + GRU hybrid (CRNN) for sequence-aware audio classification:
Raw Audio
│
▼
Mel Spectrogram (hop_length, n_mels, window_len)
│
▼
CNN Encoder ─── extracts local spectro-temporal features per frame
│
▼
GRU (Recurrent) ─── models temporal context across frames
│
▼
Time Head (per-frame) ←── primary training target
│
▼
Sigmoid ─── multilabel output (one score per class, per timestep)
Key design decisions:
| Decision | Rationale |
|---|---|
| GRU over LSTM | GRU size was the dominant factor in convergence speed; simpler architecture converged faster |
| Sigmoid over Softmax | Bird calls are not mutually exclusive; multiple species may vocalise simultaneously |
| Per-timestep (time head) training | Temporal label data was extremely sparse (pos fraction ≈ 0.005); clip-level head provided weaker signal |
Positive sample weighting via BCEWithLogitsLoss |
Directly counteracts class imbalance without requiring oversampling |
| Large input windows (~50 s) | Small windows caused rapid overfitting; longer context kept validation loss stable |
More target classes made training less stable, since GRU capacity has to scale with class count. Detection quality wasn't uniform: Amazonian Grosbeak was particularly clean, while other classes showed higher false-positive rates.
- Python ≥ 3.9
- PyTorch ≥ 2.0
- torchaudio
- librosa
- numpy, pandas, matplotlib



