Skip to content

vamc-stash/Emotion-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Emotion-Recognition

Introduction

This repository demonstrates prediction of human face emotion both in real time video and in an offline image using openCV and keras CNN in python. This project is trained to detect angry,disgust,fear,happy,sad,surprise,neutral emotions.

1. pre-processing

I have used this dataset.
Download this and place inside this folder.
segement the dataset into training and testing samples.

2. CNN model

Train the dataset using keras CNN and store the resultant model. Obtained model gives accuracy of 0.5818 after running for 60 epochs on 28709 images.

run python3 cnn.py

3. Real time video

This program will create a window to display the scene capturing by webcam and detect the faces using HAAR features and predicts facial emotion using pre-trained CNN model.

run python3 real_time_video.py

4. Offline image

This program takes an image as input and process the input to detect faces using HAAR features. Finally, predicts facial emotion using pre-trained CNN model.

run python3 static_image.py

Installations

numpy pandas cv2 keras

Acknowledgments

https://www.edureka.co/blog/convolutional-neural-network/
https://medium.com/themlblog/how-to-do-facial-emotion-recognition-using-a-cnn-b7bbae79cd8f