READ ME FILE: ‘One Size Fits All: Adapting trained CNNs to new marine acoustic environments’

This zip folder contains the training and testing data, along with the model fine-tuning and testing scripts used within the manuscript ‘One Size Fits All: Adapting trained CNNs to new marine acoustic environments’, Methods in Ecology and Evolution. Please read the explanation of the folder structure, and file guide below, prior to running any experiments with this dataset.

Please contact the corresponding author if you have any queries or to request access to the further data.

Directory contents:

FullSet_TrainAugTest_RGBImages.zip
This folder contains the full training set for the CNN model, used in Chapters 3 and 4 of this thesis. The methodology of each chapter should be followed to replicate results as not all data is used per chapter. 

Matlab Scripts:
- CNN_Testing_Script
Matlab script which takes in the base model, or a fine-tuned version of the base model and runs the model over the test data set. This script outputs a .csv file per audio file which can be used to calculate performance metrics alongside the manual annotation spreadsheet provided within the test data folder. Use the comments within the script to guide you through. Ensure you adjust the necessary file paths prior to running the script. Please take care to adjust the RGB_function input parameters to the specific data in use. The current parameters are based on a 96 kHz sampling rate. Please see manuscript text for parameters related to 197 kHz. 
	note this script will require the natsortfile extension to run, download from: https://www.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort.

- RGB_spectrogram
	Function used within CNN_Testing_Script, computes the three-channel stacked spectrogram developed for the base model. Ensure this file is within the same 	folder as CNN_Testing_Script prior to running.

Python Scripts:
 	CNN_FineTuning_Script.ipynb: Python script for fine-tuning the base model on curated training sets. All dependencies for the code are loaded within the top two 	cells. The authors used the script within Google Colab, the training data sets had to be pulled from google drive storage. The notebook can be run from the 	terminal if you have access to a personal GPU. We recommend using Colab or another cloud computing platform for model development. 

Base Model
- A zip folder containing the pre-trained base model. 
	The EfficientNet B0 model structure can be accessed using https://keras.io/api/applications/efficientnet/

Test Data
- Audio Data
	Contains the raw .wav audio files used as the test set. A total of 96 hours. Audio data can be read within any audio processing software for visual exploration. 	Audio filename structure e.g. ‘80670GOMEX04_197K_S07_RH410_20191203_005414Z’, details the hydrophone deployment (80670GOMEX04), the sampling 	rate (197K), the mooring location (S07_RH410) and the date/time stamp of the recording (20191203_005414Z = Dec 3rd 2019, 00:54:14).

- GoMex Manual Annotations (Nov 23rd, Dec 18th, Dec 30th and Jan 4th).
	Contains manual annotation .csv files, per test day. Sheets contain manual label per data frame (3-seconds) for each hour long audio file in the Audio Data Testing 	Folder. 

Training Data
- Audio Data
	Contains the 24 raw audio files recorded on December 3rd 2019, in a .wav format. 

- GoMex Dec 3rd 2019 Manual Annotations
	Contains manual annotation .csv file for the training date December 3rd 2019. Sheet contains manual label per data frame (3-seconds) for each hour long audio 	file in the Audio Data Training Folder.