GithubHelp home page GithubHelp logo

mylee16 / happiness-detector Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 99.44 MB

😃😶😥Happiness detector on webcam video streaming

Python 96.77% Dockerfile 3.23%
face-detector emotion-detector face-detection happiness-detector streamlit

happiness-detector's Introduction

Happiness Detector

Table of Contents

Deployment

App can be deployed on Streamlit with streamlit run app.py

Or you can run it with docker with docker build . -t happiness-detector followed by docker run -ti --rm happiness-detector

Cover page

Overview

"Happiness Detector" is an emotion detector web APP deployed on Streamlit. The app can detect 3 emotions ("Happy", "Neutral", and "Sad") and is made up of two different deep learning models, 1. Face Detector and 2. Emotion Detector

Information on the Deep Learning model

Cover page

Face Detector- CAFFE Res10 300x300 SSD

Pretrained CAFFE Res10 300x300 SSD is used for face detection. It returns the X and Y coordinate of the bounding boxes to face detected. Only detected faces with more than 50% confidence are classified with the emotion detector.

Emotion Detector

The detected faces are then classified with an Emotion Detector. TA pre-trained model - MobilenetV2 with pre-trained weights from Imagenet was utilized as the base model. The model is trained on roughly 75,000 emotion images from MMI Facial Expression DB.

Due to the imbalance dataset, class weights are used to give higher weightage to undersampled classes. Each image is preprocessed into "RGB" mode, size of 224 by 224 and into tensor arrays of shapped (224, 224, 3). The images are then batched prior to feeding into the model.

Architecture of the model consists of the following:

  • Input layer
  • Image preprocessing layer
  • Base Model: MobileNetv2
  • Global Average Pooling Layer
  • Dense layer
  • Dropout layer
  • Output dense layer

Model training codes can be found in src/train.py

Reference and Remarks

happiness-detector's People

Contributors

natelee-tw avatar

Stargazers

 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.