GithubHelp home page GithubHelp logo

music_genre_classification's Introduction

This repository contains the code for Music Genre Recognition project

Packages

  • Python 3.6.5
  • Tensorflow - 1.7.0
  • Keras - 2.2.4
  • Numpy, Pandas, Matplotlib
  • Librosa - 0.6.2

Raw data:

Download FMA Small from: https://github.com/mdeff/fma Raw data is 8GB and consists of audio from 8000 songs + metadata with features like MFCC

Preprocessed data

The raw audio has been converted to mel-spectograms and pickled. There are 3 files for training, validation and testing on the drive link - https://drive.google.com/drive/u/0/folders/1KyHjMzsz1X7QzNx5kvhXVBvDJk8JFNKu

You only need these files for running any of the notebooks with the neural networks.

Code Notebooks

Explore data, convert raw audio into spectograms and pickle them

To run code in any of these notebooks, first please download raw data from FMA Github link above

  1. load_fma_dataset: Loads fma_dataset and explores it.
  2. Plot_Spectograms: Plots spectograms for the 8 different genres
  3. convert_to_npz: Loads the raw audio, converts each file to a spectogram and pickles the results to make it easy for training models. The output from this are the datasets in the drive link above

Building models

To run the code below, please download the processed data from the drive

  1. baseline_model_fma: This model uses the metadata in tracks.csv to load MFCC features and builds a SVC classifier.

  2. CRNN_model: This notebook uses the compressed spectograms to build a CRNN model in Keras

  3. CNN_RNN_Parallel: This notebook uses the compressed spectograms to build a a parallel CNN-RNN model in Keras

  4. models folder has the trained weights for the 2 models.

Activation Visualization and Embedding Clustering

  1. Activation_Visualization: This notebook loads the weights for Parallel CNN-RNN model and uses the keras_vis package to draw activation visualizations for the filters in convolution block 1 and convolution block 5

  2. Embedding_Clustering_CRNN: This notebook extracts the features from the first dense layer of CRNN model and performs clustering on them. It then compares the outputs of the clustering with the true labels

music_genre_classification's People

Contributors

priya-dwivedi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.