travistangvh / emotion-detection-in-real-time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face Classification

The following repository is a real-time face detection and emotion classification model.

The face detection is powered by MTCNN and openCV. The emotion classification model is a built on an CNN architecture called VGGFace with weights trained on the fer2013 dataset.

The Model

The model is trained on a CNN architecture called VGGFace.

Instructions on getting started

To run the demo.

  • Clone this commit to your local machine using git clone https://github.com/travistangvh/emotion-detection-in-real-time.git

  • Install these dependencies with pip install pip install -r ../REQUIREMENTS.txt

  • Download pretrained model and weight trained_vggface.h5 from here.

  • Place trained_vggface.h5 into ../datasets/trained_models/.

  • Run emotion_webcam_demo.py using python3 emotion_webcam_demo.py

To train previous/new models for emotion classification:

  • Download the fer2013.tar.gz file from here

  • Move the downloaded file to the ../datasets/raw/ directory inside this repository.

  • Untar the file: tar -xzf fer2013.tar

  • Ensure that the file ../datasets/raw/fer2013.csv exists

  • Run the training_emotion_classification.py file python3 training_emotion_classifier.py

Citations

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%