Skip to content

This program uses your local webcam to recognise 6 different emotions; Happiness, Sadness, Angry, Fear, Surprise and Neutral. Everything happens in real time using OpenCV and Convolution Neural Networks.

Notifications You must be signed in to change notification settings

Brucio1/Real-time-emotion-detection

Repository files navigation

Real-time-emotion-detection

This program uses your local webcam to recognise 6 different emotions; Happiness, Sadness, Angry, Fear, Surprise and Neutral. Everything happens in real time using OpenCV and Convolution Neural Networks.

(Excuse the silly faces lol)

Installation

  • Python 3.X
  • Tensorflow 2.0 or higher
  • OpenCV
  • Numpy

To run it on your local machine, download all files into the same folder. Run "emotion_model.py" to train the model and then "emotion_detection.py" to start the program.

python3 emotion_detection.py

Dataset and xml file

Xml file: https://opencv.org/releases/

Kaggle dataset: https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge/data

The original dataset had 7 different class labels. I got rid of "Disgust" as it only had <500 training examples, not enough to properly train the model.

About

This program uses your local webcam to recognise 6 different emotions; Happiness, Sadness, Angry, Fear, Surprise and Neutral. Everything happens in real time using OpenCV and Convolution Neural Networks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages