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.
I have used this dataset.
Download this and place inside this folder.
segement the dataset into training and testing samples.
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
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
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
numpy
pandas
cv2
keras
https://www.edureka.co/blog/convolutional-neural-network/
https://medium.com/themlblog/how-to-do-facial-emotion-recognition-using-a-cnn-b7bbae79cd8f