Independent Study — Data Science & Machine Learning Concordia College, Moorhead, Minnesota — Spring 2026
Automated bat echolocation call detection from AudioMoth ultrasonic recordings. Converts raw WAV files into spectrogram images, then trains a MobileNetV2 CNN (transfer learning) to classify bat calls vs. background noise.
Final validation accuracy: 96.4%
| Metric | Value |
|---|---|
| Overall accuracy | 96.4% |
| Bat recall | 94.6% |
| No-bat recall | 97.5% |
| Test set size | 6,634 images |
| Training set size | ~26,500 images |
The complete project — including all 33,167 labeled recordings, generated spectrograms, trained model weights, and output plots is available here, whats in this repo is a demo due to the size of all the audio recordings I wasn't able to upload to GitHub:
Download Full Project (Google Drive)
The dataset contains:
- 12,985 confirmed bat echolocation recordings (
echolocation_calls/) - 20,182 confirmed no-bat recordings (
no_bat_noise/) - All spectrograms and diagnostic plots generated from training
pip install -r requirements.txt
- Installs libraries
Place .WAV recordings into the appropriate folders:
- Bat recordings →
data/echolocation_calls/ - No-bat recordings →
data/no_bat_noise/
python make_spectrograms.py
- Outputs 224×224 grayscale PNG spectrograms to
output/spectrograms/.
python train_cnn.py
- Outputs 5 diagnostic plots to
output/plots/and saves the best model tomodels/bat_model.keras.
Step 1 — Chunking: Each 20-second WAV is sliced into 0.5-second windows.
Step 2 — Spectrograms: Each chunk is converted to a 2D image via STFT. Only the 18–80 kHz band is kept (bat call range). Amplitude is converted to decibels and globally normalized to a fixed range so all images are comparable.
Step 3 — Transfer Learning: MobileNetV2 (pretrained on ImageNet by Google, Sandler et al. 2018) is used as a frozen feature extractor. A small classification head is trained on top to recognize bat call patterns.
Step 4 — Evaluation: The model is tested on a 80%/20% split. Output includes a confusion matrix and more.