BatClassify automates the extraction and classification of echolocation calls (for a subset of UK bat species) from time-expansion and direct-sampling detector recordings.
Getting Started (Windows)
Step 1. Download
Find 'BatClassify_win32.zip' at https://bitbucket.org/chrisscott/batclassify/downloads and right click and select 'Save link as...' to download the file. Unzip the file contents to a location of your choice.
Step 2. Run BatClassify
The BatClassify.exe is found in the 'bin' folder inside the 'BatClassify' folder previously extracted. Double-click the .exe file to bring up the BatClassify user interface.
If the recordings to be analysed were made with a time-expansion detector and are long continuous files, go to step 3. If the recordings are from a direct-sampling detector go straight to step 4.
Step 3. Split time-expansion recordings
Continuous time-expansion recordings must be broken up into smaller files prior to analysis. The 'split' process extracts non-silent regions of the recording, saving each as a separate file.
Click the 'Split' tab of the user interface. Select the folder containing the recording(s) to be split using the directory browser (click 'Browse...'). Next select the folder where the output files should be saved, as above. Click run. If a large number of files were selected for splitting, a progress bar will indicate the percentage of work complete.
Step 4. Analyse recordings
Select the Analyse tab of the user interface. Select the folder containing the recording(s) to be analysed using the directory browser (click 'Browse...'). Next select the folder where the output files should be saved, as above. Select whether spectrograms of extracted calls should be saved using the check box. Click run. If a large number of files were selected for splitting, a progress bar will indicate the percentage of work complete.
Step 5. View results
Once analysis has finished, the 'Results.csv' file will be found in the output folder selected in step 4. CSV files can be viewed in a number of programs e.g. Microsoft Excel, OpenOffice and Google Docs. Analysis results are organised with a row for each recording, and a column for each species. Classifier output for each species or species group is a number between 0 and 1, and represents an estimate of presence within that recording. For example, a recording containing calls from a lesser horseshoe only should have values near 0 for all species except Rhip, where values closer to 1 indicate increasing confidence in presence. Note that multiple species may be present in a single recording, in which case more than one value in that row may be non-zero.
- libsndfile is used to read audio files
- Audio is internally resampled to 500 kHz for consistency using libsndfile
- Time domain audio samples converted to frequency domain spectrogram using fftw
- Spectrogram background subtraction using a local average of pixel intensity
- Blob detection via connected component labelling
- Feature extraction - spectral and temporal moments, gradient histogram
- Classification using a tree-based ensemble
Precision-Recall metric to evaluate the quality of the output of the classifiers:
NSL group comprises Nyctalus noctula, Nyctalus leisleri and Eptesicus serotinus.
Notice not all UK species are covered yet, and sample sizes for Myotis alcathoe and Myotis bechsteinii are currently small.
Pettersson D240X and D500X recordings were used to train/test models.
Maintainer: Chris Scott (firstname.lastname@example.org).
Licensed under the GPL, Version 3