Giter Club home page Giter Club logo

emotion-recognition-opencv-dlib's Introduction

Realtime-Emotion-Recognition-OpenCV-Dlib

we have trained our model to determine the emotions in the same pattern using a technique called Machine Learning. ML as its name denotes, is the process making an otherwise oblivious, computer learn something to predict in a real time solution. It is almost alike teaching a student how to solve a particular problem and the learned student is then able to solve test problems he is given.

This program can be run on both Linux and Windows, installation of above packages however differ on both. It is coded in Computer Programming Language, Python version 3.6.

Same have we done in this model. This program does real time emotion recognition using Machine Learning algorithm called Linear SVM. There are three aspects to this:

Pre-processing of data

We use a part of CK dataset which is labelled on 7 emotions: Anger, disgust, joy, neutral, sadness, fear and surprise. A human face has 68 landmark points of movement which can help us determine the emotion. This done through change in positions of these landmarks and they are fed as features to our training model.

Fig: Facial Landamrks Source:https://www.researchgate.net/figure/Example-face-image-annotated-with-68-landmarks_fig1_37434867

To determine change in these landmarks, we use a center point on face and we determine changes in contrast to that point.

Training our model on labelled dataset.

Then we train our Machine learning model based on this processed dataset. We extract the labels of each image and feed image landmarks as features and train them against the labels. This, in a nutshell means our system learning what positions of facial landmarks corresponds to which emotion.

Testing our model and determine scores.

Use a chunk of the same dataset, we test our model and record scores of each. Our system does 7 epochs and uses a linear SVM to train a dataset of approximately 500 images.

Alt text

Run the model for real time feed.

The program takes input from a webcam and displays on console the predicted emotion as it detects in real time. Some example snippets are attached in res1.png and res2.png.

emotion-recognition-opencv-dlib's People

Contributors

ahafeez8 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

luther-kim

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.