CoolFace
Apppublic

Hashmil-Muahmmed08/facial-emotion-detection

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

title: Facial Emotion Detection emoji: πŸ˜„ colorFrom: indigo colorTo: pink sdk: docker app_port: 7860 pinned: false ---

Facial Emotion Detection AI

A deep learning–based facial emotion recognition system that detects human emotions from images and live webcam input. The project uses a CNN (ResNet-based) model for emotion classification and is deployed as an interactive web application using Gradio.


Live Demo

πŸ”— Hugging Face App: https://huggingface.co/spaces/okaysatyam/EmotionDetectionAI


Overview

This project focuses on detecting facial emotions by combining classical computer vision techniques with deep learning. Faces are detected using OpenCV’s Haar Cascade, preprocessed, and passed to a ResNet-based convolutional neural network trained on the FER-2013 dataset.

The application supports both image upload and real-time webcam inference and is publicly deployed for demonstration purposes.


Features

  • β€”Facial emotion detection from static images
  • β€”Real-time emotion detection using webcam
  • β€”CNN (ResNet-based) deep learning model
  • β€”OpenCV Haar Cascade for face detection
  • β€”Interactive Gradio-based web interface
  • β€”Publicly deployed on Hugging Face Spaces

Emotion Classes

The model classifies faces into the following seven categories:

  • β€”Angry
  • β€”Disgust
  • β€”Fear
  • β€”Happy
  • β€”Neutral
  • β€”Sad
  • β€”Surprise

Tech Stack

  • β€”Python
  • β€”TensorFlow / Keras
  • β€”OpenCV
  • β€”NumPy
  • β€”Gradio
  • β€”Hugging Face Spaces

Project Architecture

  1. 1.Input image or webcam frame is captured
  2. 2.Face detection using Haar Cascade classifier
  3. 3.Face region is resized and normalized
  4. 4.CNN model predicts emotion class
  5. 5.Bounding box and emotion label are displayed