GithubHelp home page GithubHelp logo

demfier / pmup Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 0.0 17.95 MB

App to cheer you up with some awesome quotes when depressed using deep learning

Home Page: https://docs.google.com/presentation/d/1G3G-rxgSth77wmh_io9ng1KUspx2i5gU2vSp4J9j8Fo/edit?usp=sharing

JavaScript 19.51% CSS 2.67% HTML 5.03% Python 72.80%
capsnet sentiment-analysis emotion-recognition multimodal-deep-learning tensorflow pytorch flask node-js

pmup's Introduction

alt pump_logo

An app to cheer you up in those hard times

About

Got the Monday blues?

Pmup (pronounced pŭmp) is the perfect "Pick Me Up" app for you. It uses advanced machine learning and artificial intelligence methods to detect the slightest hint of sadness in your voice and motivate you. In short, it listens, analyses and appreciates.

In order to alleviate ambiguity-resolution problem in text (For e.g., "I am okay" can be spoken in a variety of ways), we derive features from the way you speak too. Behind the scenes, it uses two models to analyze the speech input:

  1. Acoustic: It parses the audio-data from the microphone and extracts the Mel-Frequency Cepstrum (MFC). The MFC captures various properties of the sound like loudness, and pitch. It can be thought of as the features derived from the spectrogram which are the defacto visualisation for spoken audio data. Thus, we decided to feed the MFC features to a Convolutional Neural Network (CNN) which classifies the data into various emotions by generating a probability distribution over the classes. The model is trained on open source datasets: RAVDESS and SAVEEand has an accuracy of ~75%.

  2. Text: Next it uses the HTML5 speech2Text engine to convert captured audio to text. Here we've implemented an optimized version of Compositional coding capsule network with k-means routing for text classification, one of state-of-the-art methods for sentiment analysis in text. It basically uses capsule nets for multi-class classification of the text data. This model is trained on the Yelp reviews and Amazon polarity data, and has a test accuracy of ~94%.

Finally, we combine predictions from both the models to estimate emotions in real-time. Pmup, then, uses this inferred emotion to either tell you jokes, motivativational quotes or just be your pal.

Setup instructions

Although we would be hosting the app online soon, you can follow the given steps to run the app locally:

  • Clone this repository by git clone [email protected]:Demfier/pmup.git and switch to its root directory by cd pmup
  • Install and setup the following dependencies on your system (using virtualenv is highly recommended):
    • NodeJS
    • Python3
    • Flask
    • PyTorch
    • Tensorflow
    • Numpy
    • Pandas
    • Keras (<=2.1.3)
    • Scikit-learn
    • Librosa
  • Download the pretrained model for text from here and put the files yelp.pth, sentence_encoder inside the webserver folder
  • Run node index.js from the ux folder to start your node server
  • Open another terminal and run flask run -p 8080 from the webserver folder
  • Navigate to https://localhost:5000 in your browser
  • Tap the mic and start speaking
  • Once you are finished, tap the mic again

Based on our algorithms, you should either hear a motivational quote if sad, or you'll hear a super-funny joke 😉

Privacy

Respecting privacy, we never store any voice data, or do any voice fingerprinting. All voice data is instantaneous analysed and deleted.

Next steps

We found that combining results from both audio and text helps but still, the network seems to be very shallow and hence, we will now attempt to make an end-to-end deep learning model which processes text and audio at the same time by using some fusion techniques such as LMF to learn a shared a representation for the different modalities

Team members

Gaurav, Aseem, Rishav

pmup's People

Contributors

aseemrb avatar demfier avatar rra94 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pmup's Issues

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.