Giter VIP home page Giter VIP logo

insiyaa / music-genre-classification Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 6.0 4.35 MB

Genre Classification using Convolutional Neural Networks

Home Page: https://drive.google.com/open?id=1oTiXeg5luZMDcjsvigUb45hvlGaty-Xb

Jupyter Notebook 100.00%
cnn-classification cnn-for-visual-recognition cnn-pytorch cnn-model genre-classification genre-identification music-classification gtzan-dataset spectograms music-information-retrieval

music-genre-classification's Introduction

Music Genre Classification

Beginning

This project started as a mini team project with an aim to learn different machine learning models. The initial problem statement was to classify music into any two categories. Different features like tempo, beats, stft, mfccs, etc were extracted using Librosa from the GTZAN Genre Collection dataset. On that data we implemented logistic regression and neural network from scratch independent of any framework.
The repository for this task is here.

What next?

After this project, I went on learning more about computer vision and deep learning. Reading more and more about it, I started thinking if I could apply CNNs on the music data. Also I hoped that transfer learning would help me attain accuracy closer to the State of the art models on GTZAN dataset.

Representing Music as Image

A very naive idea of mine was to simply plot the y values as shown below.

By soon I realized that it won't just work as it doesn't give much information about tones. While going through different articles for visualizing music, I came across this paper (luckily having the same idea as mine) and decided to go for melspectograms.
A spectrogram is a visual representation of the spectrum of frequencies of sound or other signal as they vary with time. Spectograms allow looking at the whole song once and get the information about the tones present right away!

These looked quite promising to me and so created a dataset using this notebook.

Transfer Learning

While exploring more and more about deep learning, I came across PyTorch and decided to use it. But later on I started with Practical Deep Learning for Coders, v3 and decided to use fastai library which is easier to use, intuitive, reliable and build on the top of PyTorch.
I used the pretrained models of ResNet34 and ResNet50 as feature extractors using Google Colab GPU.
ResNet34 has the accuracy of 75.6%
ResNet50 has the accuracy of 80.3%
The accuracy are pretty much comparable with the State of the art models.

music-genre-classification's People

Contributors

insiyaa avatar

Stargazers

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