Giter VIP home page Giter VIP logo

music-genre-classification-with-deep-learning's Introduction

Music Genre Classification with Deep Learning

DOI

Abstract

In this project we adapt the model from Choi et al. to train a custom music genre classification system with our own genres and data. The model takes as an input the spectogram of music frames and analyzes the image using a Convolutional Neural Network (CNN) plus a Recurrent Neural Network (RNN). The output of the system is a vector of predicted genres for the song.

We fine-tuned their model with a small dataset (30 songs per genre) and test it on the GTZAN dataset providing a final accuracy of 80%.

Slides and Report

Code

In this repository we provide the scripts to fine-tune the pre-trained model and a quick music genre prediction algorithm using our own weights.

Currently the genres supported are the GTZAN dataset tags:

  • Blues
  • Classical
  • Country
  • Disco
  • HipHop
  • Jazz
  • Metal
  • Pop
  • Reggae
  • Rock

Prerequisites

We have used Keras running over Theano to perform the experiments. Was done previous to Keras 2.0, not sure if it will work with the new version. It should work on CPU and GPU.

Python packages necessary specified in requirements.txt run:

 # Create environment
 virtualenv env_song
 # Activate environment
 source env_song/bin/activate
 # Install dependencies
 pip install -r requirements.txt
 

Example Code

Fill the folder music with songs. Fill the example list with the song names.

 python quick_test.py
 

Results

Sea of Dreams - Oberhofer

Sea of Dreams - Oberhofer fig_sea Results

Sky Full of Stars - Coldplay

Sky Full of Stars- Coldplay fig_sky

music-genre-classification-with-deep-learning's People

Contributors

jsalbert 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.