CoolFace
Apppublic

mariadolores00/facial-emotion-blendshapes

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

🎭 Facial Emotion Recognition — Blendshapes + ML

Real-time facial emotion recognition using MediaPipe Blendshapes as an anonymized facial representation, combined with a Machine Learning model trained on that data.

🔍 How it works

  1. 1.Captures image from webcam
  2. 2.MediaPipe extracts 52 blendshapes (numerical values describing facial geometry)
  3. 3.A ML model classifies the emotion into: Neutral · Happy · Sad · Angry
  4. 4.Displays the prediction with per-class probabilities

🔒 Privacy by design

Blendshapes are abstract mathematical vectors. No images are stored, and it is not possible to reconstruct the original face from the data. This was a deliberate architectural decision to embed privacy from the ground up.

🏗️ Full pipeline

This project is part of an end-to-end pipeline built with two tools:

ToolTechnologyPurpose
Capture appFlask + MediaPipe (JS)Captures emotion-labeled blendshapes and generates anonymized CSV datasets
Training appPyQt5 + TensorFlow + scikit-learnTrains KNN, SVM, Decision Tree or Neural Network models on the datasets
This demoGradio + MediaPipe + TFReal-time inference with a trained model

🧠 Supported models

  • —K-Nearest Neighbors (KNN)
  • —Support Vector Machine (SVM)
  • —Decision Tree
  • —Neural Network (TensorFlow/Keras) — .h5
Note: This demo accepts .h5 neural network models. For KNN/SVM/DT, the full pipeline uses joblib .pkl.

🛠️ Tech stack

Python · MediaPipe · TensorFlow/Keras · scikit-learn · Gradio · OpenCV · Flask

👩‍💻 Author

María Dolores Belchí Martínez — Electronics Engineer | Computer Vision | AI Engineer LinkedIn · GitHub