
Facial Expression Recognition
A downloadable tool for Windows
This project is a Real-Time Facial Expression Recognition system that uses a custom-trained YOLO model (via `ultralytics`) to detect and classify human emotions through a webcam feed. It also tracks the duration of each expression and generates an emotion timeline graph once the session ends.
๐ Features
Real-Time Detection: Uses OpenCV to capture the live webcam feed and performs high-speed object detection and classification using a YOLO model.
9 Facial Expressions Supported:
- Angry ๐ก
- Happy ๐
- Surprised ๐ฒ
- Sad ๐ข
- Sleepy ๐ด
- Natural ๐
- Contempt ๐
- Disgust ๐คข
- Fear ๐จ
Emotion Timeline Analysis: Once you exit the video feed, the application uses `matplotlib` to plot a visually appealing timeline, showing exactly when and for how long each emotion was detected during the session.
| Status | Released |
| Category | Tool |
| Platforms | Windows |
| Author | Frankkie |
| Tags | sourcecode |
| AI Disclosure | AI Assisted, Code |
Download
Install instructions
โ๏ธ Requirements
Make sure you have Python installed. It is recommended to use a virtual environment. You can install the required packages using the provided `requirements.txt` file.
The core dependencies include:
- ultralytics (YOLO)
- opencv-python
- matplotlib
- numpy
- torch, torchvision, torchaudio (with CUDA 12.1 support for GPU acceleration)
To install them, run:
pip install -r requirements.txt
Note: The `requirements.txt` file is configured to download PyTorch with CUDA 12.1 support. If you are using CPU only or a different CUDA version, you may need to install PyTorch manually from the [official site](https://pytorch.org/).
๐ How to Run
- Clone or download the repository to your local machine.
- Ensure your webcam is connected.
- Run the main application script:
python app.py





Leave a comment
Log in with itch.io to leave a comment.