Home

Awesome

This repository is deprecated for at TF-2.0 rewrite visit:

https://github.com/oarriaga/paz


Face classification and detection.

Real-time face detection and emotion/gender classification using fer2013/IMDB datasets with a keras CNN model and openCV.

For more information please consult the publication

Emotion/gender examples:

alt tag

Guided back-prop alt tag

Real-time demo:

<div align='center'> <img src='images/color_demo.gif' width='400px'> </div>

B-IT-BOTS robotics team :) alt tag

Instructions

Run real-time emotion demo:

python3 video_emotion_color_demo.py

Run real-time guided back-prop demo:

python3 image_gradcam_demo.py

Make inference on single images:

python3 image_emotion_gender_demo.py <image_path>

e.g.

python3 image_emotion_gender_demo.py ../images/test_image.jpg

Running with Docker

With a few steps one can get its own face classification and detection running. Follow the commands below:

To train previous/new models for emotion classification:

tar -xzf fer2013.tar

python3 train_emotion_classifier.py

To train previous/new models for gender classification:

tar -xfv imdb_crop.tar

python3 train_gender_classifier.py