bioacoustic sound classification

I trained this animal-call model on tasks with only a few examples per class, following a DCASE-style few-shot setup. That fits a constraint of field recordings: a new species or call type may have only a handful of labelled clips.

I used Prototypical Networks in PyTorch for those episodic N-way K-shot tasks. For the audio input, I used Torchaudio to compute log-mel and PCEN features once and saved the arrays for training. That made the first pass slower, but it kept repeated feature processing out of the training loop.

With the saved features, episodic training was fast enough to compare architectures and distance metrics. I tried a ResNet baseline, attention and transformer variants, and a pretrained EfficientNet option. PyTorch Lightning, Hydra, and MLflow supported the training runs, configuration, and tracking.

The few-shot approach allowed adaptation from a small number of clips. It also left me with a more complex data pipeline than a flat classifier would need. The public repository (opens in a new tab) includes a small CLI with commands for training and evaluation.