face_emotion_detection

Face Emotion Detection

Small Flask + Socket.IO application that performs real-time face emotion detection using a prebuilt Keras model and OpenCV face detection. This project demonstrates streaming webcam frames to a browser, running emotion predictions on detected faces, and emitting live emotion data via WebSockets.

Overview

Prebuilt models & data

These are prebuilt assets bundled with the project; you can replace them with your own models if desired.

Project layout

Requirements

Python 3.8+ recommended. Key packages:

I can add a requirements.txt for you — let me know.

Installation

  1. Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
  1. Install dependencies:
python -m pip install -r requirements.txt
# or if you don't have requirements.txt:
python -m pip install flask flask-socketio tensorflow opencv-python numpy

Run the app

From the webapp directory run:

python .\app.py

Open your browser at http://localhost:5000 and go to the dashboard to see the live video and emotion updates.

Notes:

Endpoints & features

Security & Production notes

Troubleshooting

Credits

This repository stitches together OpenCV face detection and a pretrained Keras emotion model to demonstrate real-time emotion recognition in the browser.


If you want, I can also create requirements.txt, add a short README badge header, or help containerize this with Docker.