Skip to content

An implementation of a Convolutional Neural Network to Classify Music Genres

License

Notifications You must be signed in to change notification settings

nlopez99/DeepMusicClassification

Repository files navigation

Issues MIT License LinkedIn

Python

DeepMusicClassification

An Implementation of a Convolutional Neural Network to Classify Music Genres
Report Bug · Request Feature

Table of Contents

About The Project

Python

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:

Built With

Getting Started

To get DeepMusicClassification up and running locally, Python3.5< must be installed and added to PATH.

Prerequisites

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

Installation

  1. Clone the repo
git clone https://github.com/nlopez99/DeepMusicClassification.git
  1. Pip3 install packages
pip3 install -r requirements.txt
  1. Download GTZAN dataset and extract it to the datasets folder

Usage

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

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Nino Lopez - @Nino_Lopez - antonino.lopez@spartans.ut.edu

Project Link: https://github.com/nlopez99/DeepMusicClassification/

Acknowledgements

About

An implementation of a Convolutional Neural Network to Classify Music Genres

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages