Coder Social home page Coder Social logo

adityadutt / music-genre-classification Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 2.51 MB

Classify music in two categories progressive rock and non-progressive rock using mfcc features, MLP, and CNN.

Python 100.00%
music-genre-classification cnn mfcc-features rock-music

music-genre-classification's Introduction

Music Genre Classification

Classify music into two categories progessive rock and non-prog rock.

Firstly, minimum duration song, min_duration was found. Then, all songs were divided into chunks of minimum of 30 seconds or min_duration. Librosa is used to analyze music extract frequencies. It is a Python module to analyze audio signals in general but geared more towards music. It includes the nuts and bolts to build a MIR (Music information retrieval) system. After building features, two approaches were considered to build genre classifier

  • Extract a Mel spectrogram of song chunk and then design a convolution neural net to run on input spectrograms. Spectrograms of a prog and non prog song are shown in Fig. 1 and Fig 2. The accuracy with spectrograms was 70-73%.

  • Extract 21 Mfcc features, zero crossing rate, chroma frequencies, spectral bandwidth, spectral centroid, roll off for each chunk. Then, all the features were appended into csv file using pandas. Create a model that uses LSTM with 2 layers and runs on input features. The accuracy with LSTM was 80-85%. An image of features is shown in Fig. 2.

  • Fig1. Spectrogram of non-prog rock music chunk

non-prog


  • Fig1. Spectrogram of prog rock music chunk

prog

Steps to run the project -

  1. To train the model run- python LSTM.py
  2. TO validate model run- python validate_model.py
  3. To test model run- python test_model.py

Files

All the training features are stored in training_features.py All the validation features are stored in validation_features.py All the test features are stored in test_features.py All the test djent features are stored in test_djent_features.py

Authors

  • Aditya Dutt
  • Richa Dutt
  • DingKang Wang
  • Bin XU
  • Kun Shi

music-genre-classification's People

Contributors

adityadutt avatar

Stargazers

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