DeepMusicClassification
An implementation of a Convolutional Neural Network to Classify Music Genres
Install / Use
/learn @nlopez99/DeepMusicClassificationREADME
Table of Contents
<!-- ABOUT THE PROJECT -->About The Project
<p align="center"> <a href="https://github.com/nlopez99/DeepMusicClassification"> <img src="assets/topology.png" alt="Python" width="1200" height="1800"> </a> </p>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 -->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
- 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
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 -->
Roadmap
See the open issues for a list of proposed features (and known issues).
<!-- CONTRIBUTING -->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.
- 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
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 -->Acknowledgements
<!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
