An Implementation of a Convolutional Neural Network to Classify Music Genres
Report Bug
·
Request Feature
The goal of this project is to utilize the GTZAN dataset to train a convolutional neural network to classify melspectrograms into music genres. After training the model for some time, it reached 70.6% accuracy on the testing dataset.
About the model:
- The neural network topology includes 4 Convolutional layers
- The model includes batch normalization, L2 penalty for weight biases, and dropout layer to reduce overfitting
- Tensorboard callback for tracking model performance:smile:
To get DeepMusicClassification up and running locally, Python3.5< must be installed and added to PATH.
Additional prerequisites to get DeepMusicClassification up and running.
- Update pip3 for most Linux ditros
sudo -H pip3 install --upgrade pip
- Update pip3 for Windows
python3 -m pip3 install --upgrade pip
- Clone the repo
git clone https://github.com/nlopez99/DeepMusicClassification.git
- Pip3 install packages
pip3 install -r requirements.txt
- Download GTZAN dataset and extract it to the datasets folder
To train the model run:
python3 main.py -t train -d datasets/genres --epochs 20
To test the model against a song (WAV format) of your choosing:
python3 main.py -t test -s your_song.wav
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Nino Lopez - @Nino_Lopez - antonino.lopez@spartans.ut.edu
Project Link: https://github.com/nlopez99/DeepMusicClassification/