Skip to content

Facial Expression Recognition using Resnet to classify people's emotions based on their face images with an accuracy of 80 percent.

License

Notifications You must be signed in to change notification settings

Aryavir07/Facial-Emotions-Recognition

Repository files navigation

Emotion Detection Using Facial Expression

Project Overview

  • The aim of project is to classify people's emotions based on their face images.
  • Project is divided into two parts which is combined to give output:
  1. Facial key points detection model
  2. Facial expression detection model
  • There is around 20000 facial images, with their associated facial expression lables and 2000 images with their facial key-point annotations.
  • To train a model that automatically shows the people emotions and expression.

Model 1: Key Facial Point Detection

  • Created a deep learning model based on convolutional neural network (CNN) and Residual Block to predict facial keypoints.
  • Dataset contsists of x and y coordinates of 15 facial key points.
  • Input images are 96x96 pixels.
  • Images consits of only one color channel i.e images are grayscaled.
  • Dataset Source: Kaggle

pic1

How?

  • Dataset contsists of x and y coordinates of 15 facial key points Input Image -> Trained Key Facial Points -> Detector Model

dsBuffer bmp

Model 2: Facial Expression Detection

  • This model classifies people's emotion.
  • Data contains images that belongs to five categories:
    0 : Angry 1 : Disgust 2 : Sad 3 : Happy 4 : Surprise

dsBuffer bmp

Dataset Source: Kaggle

How?

pic

  • RESNET(RESIDUAL NETWORK) as deep learning model Resnet includes skip connections feautres which enables training of 152 layers without vanishing gradient issue.

Methodology Flowchart

The figure below shows flowchart of our proposed methedology:

pic

Classification Report

precision recall f1-score support
0 0.78 0.76 0.77 249
1 1.00 0.73 0.84 26
2 0.79 0.83 0.81 312
3 0.92 0.94 0.93 434
4 0.96 0.88 0.91 208
accuracy 0.86 1229
macro avg 0.89 0.83 0.85 1229
weighted avg 0.86 0.86 0.86 1229

Performance of the model

  • Performance on running model with 500 epochs and learning rate of 0.0001.

download download

Final Result

download

How to run?

  • Download dataset from above Gdrive link
  • clone repo
  • run Facial Expression Recognition.ipynb on colab/notebook.

References:

About

Facial Expression Recognition using Resnet to classify people's emotions based on their face images with an accuracy of 80 percent.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published