Coder Social home page Coder Social logo

muchen2 / deepsent Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 5.0 35.05 MB

DeepSent: Music Sentiment Analysis using Machine Learning Models

License: Apache License 2.0

Python 58.63% JavaScript 15.40% CSS 11.92% HTML 14.06%
deepsent music emotion-analysis machine-learning neural-network scikit-learn music-genre-detection

deepsent's Introduction

DeepSent

Project Description

This project will analyze the user-uploaded music files based on the arousal-valence emotion model (aka Circumplex model). Arousal represents how intense or "stimulating" the music is to the human ears, ranging from a plain and relaxing feeling to a strong and arousing feeling. Valence here describes how delightful or how sad the music sounds like. This definition is narrower than the one presented in wikipedia, but is easier for the machine learning models to classify. Besides, the project also implemented the functionalities of pace detection and music genre detection.
Web Framework: Flask, jQuery
Skills Involved: HTML, CSS, javascript, python

Implmentation Details

Pace, arousal and valence detection: the middle 50% of the music's raw data is splitted into 5-second frames, with a step of 0.5 seconds. Each frame is then splitted into smaller 25ms subframes that are then transformed into an array of MFCCs (Mel-frequency cepstral coefficients). Finally, the MFCC array, which is initially in matrix form, is flattened and fed into a 3-layer neural network regressor. The intention here is trying to let the neural nets capture the patterns in the changes of the MFCCs and relates the patterns with the emotions that the music represents. (an instinctive approach, more researches are needed)

Genre detection: the middle 50% of the music's raw data is splitted into 20ms frames. From each of the frames, an vector of MFCC values is calculated. The mean vector and the upper part of the covariance matrix of the MFCC vectors are then taken and concatenated together into a single array, which is finally fed into a 6-layer neural network that outputs the numerical label for the predicted genre.

Datasets: GTZAN Music Genre Dataset + music files collected from my own favorite playlists for added genres (East Asia Classical, Electronic, New Age and Soundtracks)

Getting Started

The project is hosted on the site: mchen241.pythonanywhere.com (Expired)
Or you can download the repository and run app_main.py (For requirements that need to be installed, see "Prerequisites" below):

python app_main.py

The project will be running on localhost:5000/

Prerequisites

python>=2.7.12
scikit-learn>=0.18rc2
scipy>=0.17.0
numpy>=0.11.0
flask>=0.12.2
pydub (with libav or ffmpeg)

Author

Mu Chen muchen2

References

  1. Music Genre Classification, cs229.stanford.edu/proj2011/HaggbladeHongKao-MusicGenreClassification.pdf
  2. http://practicalcryptography.com/miscellaneous/machine-learning/guide-mel-frequency-cepstral-coefficients-mfccs/
  3. http://www.ee.columbia.edu/ln/rosa/doc/HTKBook21/node54.html
  4. Wikipedia, https://www.wikipedia.org/

deepsent's People

Contributors

muchen2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.