Downloads · 30 days
10
7% of all-time downloads
stratus-labs/nocturne-v1-teacher
nocturne-v1-teacher is a audio classification model from stratus-labs. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-4.0.
Nocturne is a bioacoustic species classifier trained by Stratus Labs covering the taxa that BirdNET and Perch don't: insects, amphibians, non-bird mammals, and reptiles. It's the "night side" of the soundscape — the t…
Downloads · 30 days
10
7% of all-time downloads
All-time downloads
142
Public
Parameters
87.9M
703 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors352 MB · 100%
From the Hugging Face model README
Nocturne is a bioacoustic species classifier trained by Stratus Labs covering the taxa that BirdNET and Perch don't: insects, amphibians, non-bird mammals, and reptiles. It's the "night side" of the soundscape — the taxa that are dominantly nocturnal or crepuscular, whose acoustic signal is the half of biodiversity monitoring bird-focused models leave behind.
v1.1 (this revision) uses a 3× higher learning rate than v1 during backbone fine-tuning. Independent runs at both LRs plateaued around macro-F1 0.10; v1.1 edged past by ~3 %. Prior v1 weights are preserved in the commit history if you want to pin to revision=<v1-commit-sha>.
A newer model is available. Nocturne v1.2d beats this one on the same held-out test set — calibrated macro-F1 0.1511 vs 0.1488 and mAP 0.1541 vs 0.1498. One caveat before you switch: on a held-out monitoring site v1.2d's anuran top-1 is 0.138 against this model's 0.544, so for deploying to an unseen site for anuran work, v1 may still suit you better. v1 remains the model behind the live endpoint below.
The hosted demo and API were retired on 2026-09-27. Download the weights and run the model locally: see Inference (Python) below. Newer checkpoints: v1.2d.
| Backbone | Audio Spectrogram Transformer (AST), initialized from MIT/ast-finetuned-audioset-10-10-0.4593 |
| Head | Linear over 2182 species (multi-label BCE) |
| Input | 10-second mono waveform @ 16 kHz -> 128-band log-mel |
| Params | ~86M |
| Precision | bf16 for training and inference |
| Trained on | 1x NVIDIA GB10 (DGX Spark), unified 128 GB memory |
| License (weights) | CC-BY-4.0 |
| License (code) | Apache-2.0 |
See stratus-labs/nocturne-v1-mini for a distilled ~9.3M-parameter EfficientNet-B1 student for CPU / edge deployment.
Real numbers, run on the held-out splits. Earlier drafts of this card cited macro-F1 at threshold 0.5 (too high — kills recall). These are the corrected numbers at threshold 0.3 (default) and with per-class thresholds calibrated on val:
| split | metric | threshold 0.3 (default) | calibrated per-class |
|---|---|---|---|
| val (13,391 samples) | macro-F1 | 0.139 | 0.184 |
| micro-F1 | 0.525 | 0.485 | |
| mAP (macro) | 0.152 | 0.152 | |
| test (13,710 samples) | macro-F1 | 0.137 | 0.149 |
| micro-F1 | 0.508 | 0.433 | |
| mAP (macro) | 0.150 | 0.150 |
Per-class thresholds are shipped as thresholds.json in this repo. Use them for best F1; use sigmoid > 0.3 (or 0.15 for higher recall) as a simple default. mAP is threshold-independent and the honest number for downstream ranking-quality use cases (top-k, similarity search).
Class coverage: 2,182 species in vocab; 732 have positives in the val split (long-tail — many rare species have zero test-set representation). Median calibrated threshold: 0.30. Range: 0.02–0.94.
Full report at eval_report.json in this repo. Reproduce with:
python -m soundscape.calibrate_and_eval \
--config soundscape/configs/ast_nonbird.yaml \
--checkpoint model.safetensors --arch ast \
--out-dir report/
Head-to-head on 300 randomly-sampled non-bird test clips (insects, amphibians, mammals, reptiles). Top-1 species identification:
| model | non-bird top-1 accuracy |
|---|---|
| BirdNET (v2.4, bird-focused) | 6.7% |
| Nocturne v1.1 teacher | 76.7% |
That's an 11.5× lift. BirdNET catches ~7% because a handful of amphibians and mammals slip into its vocab, but for the non-avian half of the soundscape it's the wrong tool and Nocturne is the fit-for-purpose one. This is the point of the release.
| Taxonomic class | Species in vocab | Source |
|---|---|---|
| Insecta | 745 (iNat) + 459 (InsectSet459) | iNat 2024 non-bird subset + InsectSet459 |
| Amphibia | 650 | iNat 2024 |
| Mammalia | 296 | iNat 2024 |
| Reptilia | 32 | iNat 2024 |
| Total (merged) | 2182 | — |
| Dataset | Files | Species | License | Role |
|---|---|---|---|---|
| InsectSet459 (Zenodo 18554693) | 26,298 | 459 | CC-BY-4.0 | Insect head fine-tune |
| iNat Sounds 2024 non-bird | 25,983 | 1,723 | MIT | Multi-taxon head |
| iNat Sounds 2024 birds | 111,029 | 3,846 | MIT | Backbone exposure only, not in output vocab |
Total training exposure: ~42k annotated non-bird clips across 2182 species.
model.py in this repo is a standalone, dependency-light loader (torch, torchaudio, transformers, safetensors, soundfile). It loads strictly and remaps parameter names across transformers versions.
from huggingface_hub import snapshot_download
import sys
path = snapshot_download("stratus-labs/nocturne-v1-teacher")
sys.path.insert(0, path)
from model import load_nocturne, predict_file
model, vocab, thresholds = load_nocturne(path) # raises on any missing/unexpected key
for species, score in predict_file(model, "clip.wav", vocab, top_k=5):
print(f"{score:.3f} {species}")
# thresholds[species] = per-class calibrated threshold (see Evaluation); predict_file(..., threshold=0.3) filters instead of top-k
transformers compatibility (fixed 2026-09-06). This checkpoint was saved under transformers 5.8. transformers 5.16 renamed every AST encoder parameter, and loading with
strict=Falseon a newer install silently left the backbone at AudioSet weights — only the head loaded, with no error.load_nocturnedetects the naming, remaps, and refuses a partial load. Verified identical outputs on 5.8-style and 5.16-style names. If you reconstruct the model yourself, never usestrict=False.
@misc{stratuslabs2026nocturne,
title = {Nocturne: Bioacoustic Species Recognition for Non-Bird Taxa},
author = {Stratus Labs},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/stratus-labs/nocturne-v1-teacher}}
}
Please also cite the training datasets:
The write-up and every Nocturne release, in one place: https://runstratus.com/research/nocturne-v1-non-bird-bioacoustics