Real time recognition of facial expressions using Keras, Flask and OpenCV. Build and train a convolutional neural network (CNN) in Keras from scratch to recognize facial expressions. The data consists of 48x48 pixel grayscale images of faces. The objective is to classify each face based on the emotion shown in the facial expression into one of seven categories (0=Angry, 1=Disgust, 2=Fear, 3=Happy, 4=Sad, 5=Surprise, 6=Neutral). i have used OpenCV on haarcascade-file to automatically detect faces in images and draw bounding boxes around them.
You can find the original data here: https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge and split the data into train and test.
You can simply use the pre-trained models by running main.py . And using ip mentioned in main.py file followed by .5000 you can open the interface in browser as we have used flask.
Before You run the program you will have to change the path of the video accordingly in camera.py. also you can give pass (0) "self.video = cv2.VideoCapture(0)" to obtain Real Time Facial expression using your Webcam.