Coder Social home page Coder Social logo

fer's Introduction

Real-Time Facial Emotion Recognition

GitHub followers GitHub contributors GitHub commit activity PyPI - Python Version

Table of Content :

In this project, I am exploring state of the art models in facial emotion recognition.

I. Context

Affective computing is a field of Machine Learning and Computer Science that studies the recognition and the processing of human affects.

Facial Emotion Recognition is a classic discipline that aims to interpret video inputs and analyze emotions from the face. Facial emotion recognition is widely used, especially for :

  • interview practice
  • customer satisfaction
  • discussion automatic classification
  • ...

II. Data Sources

I am using the popular FER2013 Kaggle Challenge data set. The data consists of 48x48 pixel grayscale images of faces. The faceshave been automatically registered so that the face is more or less centered andoccupies about the same amount of space in each image. The data set remainsquite challenging to use, since there are empty pictures, or wrongly classified images. https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge/data

III. Download

Data Processed Data (for training) Pre-trained Model Colab Notebook Other
here X-train y-train X-test y-test Weights Model Colab Notebook Face Detect Model

IV. Methodology

My aim is to develop a model able to provide a live emotion recognition with a visual user interface. I am therefore trying to display information in a clear way, and handle multi-face data.

Video Processing

Pipeline

The video processing pipeline was built the following way :

  • Launch the webcam
  • Identify the face by Histogram of Oriented Gradients
  • Zoom on the face
  • Dimension the face to 48 * 48 pixels
  • Make a prediction on the face using our pretrained model
  • Also identify the number of blinks on the facial landmarks on each picture

Model

The model I have chosen is an XCeption model, since it outperformed the other approaches we developped so far. I tuned the model with :

  • data augmentation
  • early stopping
  • decreasing learning rate on plateau
  • L2-Regularization
  • Class weight balancing
  • And kept the best model

As you might have understood, the aim was to limit overfitting as much as possible in order to obtain a robust model.

image

The XCeption architecture is based on DepthWise Separable convolutions that allow to train much fewer parameters, and therefore reduce training time on Colab's GPUs to less than 90 minutes.

image

V. How to use it ?

I will soon by publishing .py files with all the required content to launch easily the algorithm on your own computer. Meanwhile, you can run the notebooks I am providing and try the algorithm yourself. I will also be providing an app in the future using Render.

VI. Demonstration

image

VII. Deployment

The app will soon be available based on this template : https://github.com/render-examples/fastai-v3

fer's People

Contributors

maelfabien 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.