← Open Source

:smile: Recognizes human faces and their corresponding emotions from a video or webcam feed. Powered by OpenCV and Deep Learning.

ApplicationsOtherPython
Momentum
+0stars in 24 hours0.0%
474
Stars
171
Forks
+1
This week
1
Contributors
Created 2017-11-13 · Updated 2026-12-04 · #24393 today
Top developers
petercunha
README

Emotion

This software recognizes human faces and their corresponding emotions from a video or webcam feed. Powered by OpenCV and Deep Learning.

Installation

Clone the repository:

git clone https://github.com/petercunha/Emotion.git
cd Emotion/

Install these dependencies with pip3 install <module name>

  • tensorflow
  • numpy
  • scipy
  • opencv-python
  • pillow
  • pandas
  • matplotlib
  • h5py
  • keras

Once the dependencies are installed, you can run the project. python3 emotions.py

To train new models for emotion classification

  • Download the fer2013.tar.gz file from here
  • Move the downloaded file to the datasets directory inside this repository.
  • Untar the file: tar -xzf fer2013.tar
  • Download train_emotion_classifier.py from orriaga's repo here
  • Run the train_emotion_classification.py file: python3 train_emotion_classifier.py

Deep Learning Model

The model used is from this research paper written by Octavio Arriaga, Paul G. Plöger, and Matias Valdenegro.

Credit

  • Computer vision powered by OpenCV.
  • Neural network scaffolding powered by Keras with Tensorflow.
  • Convolutional Neural Network (CNN) deep learning architecture is from this research paper.
  • Pretrained Keras model and much of the OpenCV code provided by GitHub user oarriaga.
Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store