Giter Site home page Giter Site logo

zoezyh / musicgenreclassify-webapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deka014/musicgenreclassify-webapp

0.0 0.0 0.0 7.93 MB

An application to detect your favorite music genre :)

Home Page: https://guist-genre.netlify.app

Python 99.49% Procfile 0.51%

musicgenreclassify-webapp's Introduction

Music-Genre-Webapp

Genre classification, or categorizing music into different categories or genres, is a concept that helps distinguish between the two genres based on the rhythm they compose or maintain.

Abstract

This project is primarily aimed to create an automated system for classification model for music genres. The first step includes collecting a properly classified music dataset and preprocess the music for further processes. The dataset used here is GTZAN genre dataset. The second step includes the preprocessing of the data. Here in this step, the data size or the number of samples in each genre is increased in order to make the dataset suitable for feeding a Convolutional Neural Network (CNN). In the third step, the Mel-frequency cepstral coefficients (MFCCs) are calculated for each sample and classification label is added to each sample. Now the final dataset is prepared. In the fourth step, a Convolutional Neural Network is created and then the dataset is feed to the neural network model with 80% training size, 10% testing size and 10% validation size of the dataset. During training the model, a 93% of testing accuracy as well as 81% testing accuracy is obtained. The obtained model is exported and it is ready to be deployed. Lastly, a REST API is created for deployment using Python-Flask and is deployed on Heroku server.

Feature Extraction

The music feature vector is extracted using the Librosa library in python. Librosa is a python library specifically used for music/audio processing/analysis. It provides the building blocks necessary to create music information retrieval systems. Each audio file is taken and from that, its feature vector is extracted. The extracted feature vector is called Mel-Frequency Cepstral Coefficients (MFCC).

Deployment and Implementation

The music genre detection uses microservice system design architecture. The steps followed for the deployment are as follows

  1. Initially the Neural Network Model was integrated into a Flask App to convert it into an API which responds to POST method on endpoint /file-upload

  2. The Flask App was then assigned a port address and deployed to Heroku with the required authorizations. The deployed url is https://radiant-river-01801.herokuapp.com/

  3. Then the website was designed using HTML, CSS, Bootstrap and Wave-surfer Library.The user can directly upload their audio for detection through the file Input button.

  4. At the client side it uses an "Upload" Function which appends the users audio into a form and POST it to the previously Deployed API asynchronously using JS Fetch .

  5. The JSON response from the API contains the predicted Genre which is then displayed into the website using Document Object Model (DOM) Manipulation.

  6. The website is then deployed to Netlify with the required configurations. https://guist-genre.netlify.app

Client : Landing Page

image10

Client : Spectrogram and Predicted Output

image11

Conclusion and Future Works

The Music Genre Detection can be a great tool for video and audio streaming services.With the huge increase in online music databases and daily uploads, people find it increasingly difficult and tedious to manually categorize their songs to its genre. Also as music is inherently ambiguous, it may lead to confusion if the artist categorizes its music to a wrong genre. Being able to automatically classify and provide tags to the music will help better recommendations to their users and increase their engagement to the service.

The extension of this work would be to consider bigger data sets and also tracks in different formats(mp4, au etc.). Also, with time the style represented by each genre will continue to change. So the objective for the future will be to stay updated with the change in styles of genres and extending our software to work on these updated styles. This work can also be extended to work as a music recommendation system depending on the mood of the person.

References

musicgenreclassify-webapp's People

Contributors

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