UNM CS 529 Project 3: Creation of Multilayer Perceptron (MLP) and Convolutional Neural Network (CNN) classifiers using Pytorch and Pytorch-Lightning libraries respectively.
Create a Python virtual environment
python -m venv YOURVENVActivate the environment by running this command on Windows...
YOURENV/Scripts/activateor this command on Linux/MacOS
source ./YOURENV/bin/activateInstall required dependecies with the command below (all platforms):
pip install -r requirements.txtNote that some of the dependencies require Python 3.10 to install correctly and will not install on more recent versions of Python.
-
Specify values for the variables below in
utils/consts.py:training_data_path: the path to your training data directory (audio files)testing_data_path: the path to your kaggle testing data directory (audio files)
-
Run
python -m MLP.trainingfrom the top level directory.
- A hyperparameter search will be started with Ray Tune; this will take a while.
- After training is complete, the best performing model will be used to generate a predictions file in
MLP/.
-
Specify values for the variables below in
utils/consts.py:training_data_path: the path to your training data directory (audio files)testing_data_path: the path to your kaggle testing data directory (audio files)
-
Run
python -m CNN.trainingfrom the top level directory.
- A hyperparameter search will be started with Ray Tune; this will take a while.
- After training is complete, the best performing model will be used to generate a predictions file in
CNN/.
-
Specify values for the variables below in
utils/consts.py:training_data_path: the path to your training data directory (audio files)testing_data_path: the path to your kaggle testing data directory (audio files)
-
Run
python -m Transfer.trainingfrom the top level directory.
- A hyperparameter search will be started with Ray Tune; this will take a while.
- After training is complete, the best performing model will be used to generate a predictions file in
Transfer/.
| File Name | Description |
|---|---|
CNN/training.py |
This file contains the training algorithm for the CNN. |
MLP/training.py |
This file contains the training algorithm for the MLP. |
Transfer/training.py |
This file contains the training algorithm for our transfer learning model. |
utils/consts.py |
This file has constants used throughout the library. |
utils/spectrograms.py |
This file contains our functions to convert audio files to spectrograms. |
requirements.txt |
This file contains our project's Python dependencies. |
Prasanth Reddy Guvvala
- Implemented CNN architecture.
- Implemented spectrogram transforms.
- Implemented transfer learning.
- Implemented data augmentation.
Thomas Fisher
- Implemented MLP architecture.
- Implemented Ray Tune hyperparameter searching.
- Implemented model evaluation.
- Implemented report framework.
Leaderboard position 11 achieved with accuracy 68% on May 6th (team name: Fisher & Guvvala).