BatDetect2
A spectrogram encoder-decoder with self-attention that detects bat echolocation calls and classifies their species.
Audio and speech · 87 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Audio and speech
- Parameters
- 1.9M
- Operations
- 87
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2022, bioRxiv preprint
- Cited by
- 22 (as of 28 October 2026)
- Authors
- Oisin Mac Aodha, Santiago Martínez Balvanera, Elise Damstra and others
- Source
- GitHub: macaodha/batdetect2
- License
- CC-BY-NC-4.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m14915
- Graph hash
- a10e71fc6bf15441d16f4593f3b3415b98f776c4af4b432347ebe1479ce3d844
- Skeleton hash
- bd538cb6c54d84370b129d88c7f3cb20c827805f96ff3a7498590a034123a577
- Architecture hash
- 4bfd5b4a45eb56e3fff7deffb5536814ad7ef7a7925023c960f621e8e731df0c
- Diagram SHA-256
- fbb5400def1128b83f18f9d6bdc69d197cb74f1ef6ac02bcbbb2507c9a66938b
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
BatDetect2 is a deep learning pipeline that finds bat echolocation calls in acoustic recordings and classifies the species that made them, with one model doing both jobs. Its outputs indicate directly at what time and frequency each predicted call occurs. The authors contrast this with most existing approaches, which generate a single prediction per spectrogram clip.
The network is a convolutional encoder and decoder joined by skip connections that share encoder features with the decoder. A self-attention layer in the middle of the network lets it reason over a longer temporal scale. The downsampling and upsampling blocks append non-learnable coordinates along the frequency dimension before each convolution. For every call the model predicts the time in the file, the duration, the frequency range and the species.
The paper reports a mean average precision of 0.88 on a dataset of 17 bat species from the UK, compared with 0.71 for a call parameter extraction baseline. The abstract on the preprint's page adds an ablation: temporal self-attention raised species classification mAP from 0.83 to 0.88, while the frequency coordinates gave no measurable benefit. The released package defaults to a model trained on UK data.
Key idea. The paper builds a spectrogram encoder-decoder with a temporal self-attention layer that jointly detects bat echolocation calls and classifies their species, predicting each call's time, duration and frequency range.
- BatDetect2
- Net2DFast
- bat echolocation
- bat call detection
- bat species classification
- bioacoustics
- passive acoustic monitoring
- sound event detection
- spectrogram detector
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Aodha_2022, title={Towards a General Approach for Bat Echolocation Detection and Classification}, url={http://dx.doi.org/10.1101/2022.12.14.520490}, DOI={10.1101/2022.12.14.520490}, publisher={openRxiv}, author={Aodha, Oisin Mac and Balvanera, Santiago Martínez and Damstra, Elise and Cooke, Martyn and Eichinski, Philip and Browning, Ella and Gilmour, Lia and Staniewicz, Agata and Barataud, Michel and Boughey, Katherine and Coles, Roger and Giacomini, Giada and Mac Swiney G., M. Cristina and Obrist, Martin K. and Parsons, Stuart and Sattler, Thomas and Jones, Kate E.}, year={2022}, month=Dec }