Real-time facial emotion detection using OpenCV and DeepFace. This lightweight application captures video from a webcam, detects faces, and predicts the associated emotion using pre-trained deep learning models. Emotion labels are displayed live on the video feed.
- 🔍 Real-time face detection using Haar cascades
- 🧠 Emotion recognition using DeepFace (pre-trained models)
- 🎯 Minimal and efficient codebase
- 📷 Live webcam feed with emotion overlay
Install dependencies via pip: pip install -r requirements.txt
- Clone the Repository
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name
- Download Haar Cascade
haarcascade_frontalface_default.xml Place it in the project directory (if not already present).
- Run the App
python emotion.py
Load Haar cascade for face detection.
Capture frames from webcam.
Convert to grayscale for face detection.
Convert detected faces to RGB format.
Use DeepFace to analyze emotions on detected faces.
Display detected emotions on the video stream.
This project is licensed under the terms of the MIT License.
Made by Shaurya Agrawal
