A pre-TF-2.0 Keras mirror that reads faces and feelings
It pipelines OpenCV face detection into Keras CNNs to guess gender and emotion from a webcam feed in real time.

What it does
This project pairs OpenCV face detection with Keras CNNs trained on the IMDB and fer2013 datasets to label gender and emotion in real time. Pretrained weights, webcam demos, still-image inference, and an academic report are all included. A separate Docker image by ekholabs exposes the model over HTTP.
The interesting bit The author has explicitly deprecated the codebase in favor of a TensorFlow 2.0 rewrite, making it a well-preserved fossil of mid-2010s Keras computer vision. The 96% gender accuracy on IMDB sits beside a humbler 66% on fer2013, a gap that neatly illustrates how much easier binary classification is than reading human expressions.
Key highlights
- Real-time pipeline: OpenCV detection → Keras CNN inference
- Reported test accuracy: 96% gender (IMDB), 66% emotion (fer2013)
- Includes Grad-CAM guided back-propagation visualizations
- Academic paper bundled in the repo
- Third-party Docker image (
ekholabs/face-classifier) for HTTP inference
Caveats
- The repository is deprecated; the author recommends the TF-2.0 successor
pazinstead. - Emotion classification tops out at 66% on fer2013, so expect frequent misreads.
- The Docker image is published by
ekholabs, not the repo author.
Verdict A decent reference for historians of Keras CV or anyone who needs a quick, fully offline baseline. Look elsewhere if you want actively maintained, production-grade face analysis.
Frequently asked
- What is oarriaga/face_classification?
- It pipelines OpenCV face detection into Keras CNNs to guess gender and emotion from a webcam feed in real time.
- Is face_classification open source?
- Yes — oarriaga/face_classification is open source, released under the MIT license.
- What language is face_classification written in?
- oarriaga/face_classification is primarily written in Python.
- How popular is face_classification?
- oarriaga/face_classification has 5.7k stars on GitHub.
- Where can I find face_classification?
- oarriaga/face_classification is on GitHub at https://github.com/oarriaga/face_classification.