This project explores the use of underwater acoustics and deep learning to classify reef health states from audio recordings.
It builds a pipeline for data exploration, model training, and lightweight deployment models.
Healthy coral reefs are vibrant acoustic environments, whereas degraded reefs are quieter and less diverse.
By training models on reef soundscapes, we can automatically classify reef condition and potentially monitor ecosystem health at scale.
This repository contains three main stages:
-
Exploratory Data Analysis
data.ipynb
Explore reef audio datasets and visualize sound representations (e.g., spectrograms).
-
Baseline Model Training
AudioClassification_all.ipynb
Train a deep learning classifier on a large, labeled dataset of reef audio recordings from multiple reef sites.
-
Lightweight Transfer Learning Model
AudioClassification_Final.ipynb
Fine-tune a compact model on 24 hours of data from a single site (healthy vs degraded reef),
initializing from the baseline model’s weights for efficient transfer learning.
- Linux (Ubuntu 20.04+ recommended) or WSL2 with GPU support
- Conda
- NVIDIA GPU drivers + CUDA/cuDNN compatible with TensorFlow
Clone this repository:
git clone https://github.com/Olli365/CS-project.git
cd CS-project
cd setup
cd env_setup
conda env create -f cs_conda_env.yml
conda activate cs_project
python tf_test.py
Expected output includes TensorFlow version and available GPUs.
If no GPU is detected, check CUDA paths and run:
export NVIDIA_DIR=$(dirname $(dirname $(python -c "import nvidia.cudnn; print(nvidia.cudnn.__file__)")))
export LD_LIBRARY_PATH=$(echo ${NVIDIA_DIR}/*/lib/ | sed -r 's/\s+/:/g')${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Pipeline:
-
Data exploration:
jupyter notebook data.ipynb
-
Baseline model training:
jupyter notebook AudioClassification_all.ipynb
-
Final lightweight model (for new locations):
jupyter notebook AudioClassification_Final.ipynb