Giter Site home page Giter Site logo

ajayns / moodify Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 8.0 8.63 MB

Moodify: Recognizes emotion from face, generates a suitable playlist in the music player

License: MIT License

JavaScript 5.06% CSS 5.76% HTML 29.02% Python 60.16%
acm machine-learning python flask web-app angularjs soundmanager2 music-player materialize material-design

moodify's Introduction

Moodify

(No longer maintained)

A WebApp which uses a snapshot taken of the user to detect emotion and using this, generate a suitable music playlist. This project was built for ACM Month Of Code, actual coding done in about 3 weeks.

Read the detailed article on building Moodify here: https://medium.com/@ajay.ns08/acm-month-of-code-2k17-building-moodify-d5d9e0c52ca7

Implementation

The Cam, Music Player, scripts for emotion recognition and Database were wired and wrapped up into a WebApp using Flask, using routes to use the Backend like an API while the frontend handles the user.

Being an experimental setup built in such a short span of time, the user interface and flow would require multiple fixes before deployment.

Installation

You should have the following preinstalled:

  • OpenCV
  • MongoDB
  • dlib Predictor data files to be placed in data/
  • Haar Cascades data files to be placed in data/
  • Python 2
  • files/mp3 and files/img store the music data and album art

Preferably setup a Virtual Env and then you'll just need to install packages:

pip install -r requirements.txt

Make sure you have MongoDB running to host the database. Also run a simple http server to serve the files/ folder at localhost:8000

cd files
python -m SimpleHTTPServer

Start the program

python app.py

Open the webapp from browser at localhost:5000

Technologies

Frontend

  • AngularJS : JavaScript framework for programming the music player.
  • Materialize : CSS Framework for skinning the app based on Google's Material Design.
  • WebcamJS : JavaScript library for Image Capture
  • Angular SoundManager 2 : Adds music player functionality for AngularJS using SoundManager 2 API

Backend

  • Flask : A microframework for Python for Web App building
  • OpenCV : Open source Computer Vision, used here for facial recognition, analysis and emotion identification.
  • A few machine learning libraries used along with OpenCV such as dlib, NumPy, scikit

Individual Components

  • ng-musicplayer : The music player component built on AngularJS and Materialize.
  • PyEmotionRecognition : The script used to detect the mood from an image using OpenCV and machine learning libraries.
  • PyMusicMood : For automatic classification of music into moods based on parameters extracted from Spotify API.
  • Cam-App, Py-Flask-Wa : Initial code in setting up the Cam and Flask Server

moodify's People

Contributors

ajayns 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

Watchers

 avatar  avatar

moodify's Issues

The app freezes at Emotion Recognition script

When running the app consecutively to detect emotion for 3rd time, the app freezes at the emotion recognition script and no value is returned as mood. Some issue with OpenCV or Python could cause this.

Music Player doesn't load mp3 data

The music player doesn't seem to play music nor load the mp3 data. The server returns a 'internal error'. The files are served from localhost:8000 which gives all access permissions but some conflict causes the files not to load.

hi

this project does not run plz help how to run this project step plz

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.