https://github.com/hasnain3142/facial-emotion-recognition
Facial Emotion Detection using YOLOv8: A real-time facial emotion detection system built with YOLOv8 and Flask. This project leverages a custom dataset with English-translated emotion labels and provides a user-friendly web interface for image uploads and live webcam analysis. Includes instructions for setup, usage, and training your own model.
https://github.com/hasnain3142/facial-emotion-recognition
facial-recognition yolov8n
Last synced: 3 months ago
JSON representation
Facial Emotion Detection using YOLOv8: A real-time facial emotion detection system built with YOLOv8 and Flask. This project leverages a custom dataset with English-translated emotion labels and provides a user-friendly web interface for image uploads and live webcam analysis. Includes instructions for setup, usage, and training your own model.
- Host: GitHub
- URL: https://github.com/hasnain3142/facial-emotion-recognition
- Owner: hasnain3142
- License: mit
- Created: 2024-08-13T07:11:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-14T01:20:59.000Z (about 1 year ago)
- Last Synced: 2025-03-12T06:29:56.711Z (7 months ago)
- Topics: facial-recognition, yolov8n
- Language: HTML
- Homepage:
- Size: 6.39 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Facial Emotion Recognition using YOLOv8
This project enables real-time facial emotion recognition using a YOLOv8 model integrated with a Flask web application. The system can classify the following emotions:
- Disgusted
- Surprised
- Angry
- Sad
- Happy
- Scared
- Neutral### Application Screenshots
Here are some screenshots of the application in action:
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [Dataset](#dataset)
- [License](#license)## Introduction
This project leverages the YOLOv8 model for detecting facial emotions. A custom dataset was created by translating emotion labels from Malay to English for improved usability. The Flask application provides a user-friendly interface for both uploading images and real-time emotion detection via webcam.
## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/hasnain3142/Facial-Emotion-Recognition.git
cd Facial-Emotion-Recognition
```2. **Set up a virtual environment:**
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```3. **Install the required dependencies:**
```bash
pip install -r requirements.txt
```## Usage
1. **Run the Flask application:**
```bash
python app.py
```2. **Open your web browser and navigate to:**
```bash
http://127.0.0.1:5000/
```3. **Upload an image or use the webcam for real-time emotion detection.**
## Project Structure
- `app.py`: The main Flask application file.
- `requirements.txt`: List of dependencies required for the project.
- `templates/`: Directory containing HTML templates for the Flask app.
- `static/`: Directory for static files such as uploaded images.
- `models/`: Directory containing the trained YOLOv8 model.
- `train/`: Directory containing the training script.
- `README.md`: This documentation file.## Dataset
- **Original Dataset:** [Expression Detection (Malay Labels)](https://universe.roboflow.com/fardhansyah-hanafi-d9mrp/expression-detection-yofhu)
- **Modified Dataset:** [Facial Emotion Recognition (English Labels)](https://www.kaggle.com/datasets/beinghasnain16/facial-emotion-recognition)The original dataset's emotion labels were translated from Malay to English, and the modified dataset is available on Kaggle for use.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Feel free to contribute to this project by opening issues or submitting pull requests. Happy coding!