Skip to content

Kunjal1999/Music-Genre-Recognizer

Repository files navigation

Music-Genre-Classifier

Does what the name suggests. Classifies songs into genres: Electronic, Experimental, Folk, Hip-Hop, Instrumental, International, Pop, Rock. The features dataset includes an additional 8 genres.

Dataset

fma-small dataset was used for training and testing. The dataset consists of 8,000 tracks of 30s, with 1000 tracks for each of the 8 genres. The dataset can found here.

Preprocessing

The tracks are first converted to their corresponding Mel Spectrograms using the librosa library in Python. The conversion may take quite some time on low powered CPUs, hence one may try only a few tracks at a time and save the results as bash numpy arrays.

CNN-RNN Parallel

The CNN-RNN_parallel notebook uses the compressed spectograms to build a a parallel CNN-RNN model in Keras.

ML Models and Accuracies on Features dataset

  • Random Forest Classifier - 61%
  • KNN - 55%
  • SVM - 42%

Installation

You can install the necessary python libraries post creating a virtual environment or globally by

pip install -r requirements.txt

Model Weights

The CNN-RNN parallel trained model weights can be found here.

LICENSE

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published