Skip to content

Real time recognition of facial expressions using Keras, Flask and OpenCV

License

Notifications You must be signed in to change notification settings

anubhav11803451/Facial-Recognition

Repository files navigation

Real-Time-Facial-Expression-Recognition

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.

Link for Dataset:

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.

To Run :

Screenshot (55)_LI

Here is the sample Output on Video:

Screenshot (61) 2. Screenshot (58)

About

Real time recognition of facial expressions using Keras, Flask and OpenCV

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages