Emotion-detection
Introduction
This project aims to classify the emotion on a person's face into one of seven categories, using deep convolutional neural networks. This repo is an implementation of this research paper.
Dependencies:
- Python 3.5+, OpenCV 3.0, TFlearn.
Usage
-
Clone the repository and download the trained model files from here, extract it and copy the files into the current working directory.
-
To run the program to detect emotions only in one face, type
python em_model.py singleface
. -
To run the program to detect emotions on all faces close to camera, type
python em_model.py multiface
.
Algorithm
-
First, we use haar cascade to detect faces in each frame of the webcam feed.
-
The region of image containing the face is resized to 48x48 and is passed as input to the ConvNet.
-
The network outputs a list of softmax scores for the seven classes.
-
The emotion with maximum score is displayed.