Skip to content

An approach to predict emotions from facial expressions images using deep learning.

License

Notifications You must be signed in to change notification settings

abmami/Facial-Expressions-Recognition

Repository files navigation

Facial Expressions Recognition using Deep Learning

Facial expressions are used by humans to convey various types of meaning like emotional states, feelings, and behavioral intentions. In this project, we work on analyzing humans' emotions through facial expressions. We build and train an artificial neural network that can be used to recognize and classify seven basic emotional states from facial expressions images.

Datasets

In this project, we use open and free datasets available on the internet.

These are few samples from the datasets :

Approach

To categorize emotions, we repose our work on the discrete emotional model proposed by Ekman. The model identifies six basic emotion states: Surprise, Anger, Disgust, Happiness, Sadness, and Fear. "Those six emotions are universally and biologically experienced by all humans and widely accepted as such in the community" [1]. We also add a neutral state to the list to identify the non-emotional state.
Preprocessing
Before feeding the images to the neural network, we perform the following preprocessing steps :

  • Clean labels' files of the two datasets, and join them.
  • Generate images.
  • Detect and extract the face using MTCNN (https://github.com/ipazc/mtcnn)
  • Resize images to 48*48, and center the faces.
  • Convert images to grayscale
  • Rescale images

Modeling

Results and Evaluation

Run Locally

Install Tools

Clone the project

  https://github.com/abdessalemmami/Facial-Expressions-Recognition.git

Go to the project directory

  cd Facial-Expressions-Recognition

Configure Virtual Environment

Install dependencies

  pip install -r requirements.txt

Download Required Files

  • Go to FER2013 and download icml_face_data.csv from Kaggle.
  • Move the downloaded file to /datasets directory.

Run FER

  cd src
  python run.py

When the training is done, everything will be saved to src/models/history/.

Reference

About

An approach to predict emotions from facial expressions images using deep learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages