Skip to content

nikkipelchat/MusicGenreClassification

 
 

Repository files navigation

Classifying Music By Genre Using a Convolutional Neural Network

A CNN training on the genre of music

Code has been forked and is based on this article on Medium

Published works:

Required install:

eyed3
sox --with-lame
tensorflow
tflearn
  • Create folder Data/Raw/
  • Place your labeled .mp3 files in Data/Raw/
  • All editable parameters are in the config.py file

Available Commands:

# To run lint on all python files
pylint *.py

# To create the song slices
python main.py slice

# To train the classifier
python main.py train

# To resume train the classifier
# This will pickup training from a checkpoint file in the folder /Checkpoint and train for 15 epochs
python main.py train --resume <checkpointNumber> --epochs 15

# To test the classifier per 2.5 second slice
python main.py test

# To test the classifier by every 2.5 second slice and then take the average vote across all of one song's slices
python main.py vote

# To print a confusion matrix based on the test dataset
python main.py confusionmatrix

About

Music Genre Classification using a Convolutional Neural Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • Dockerfile 0.9%