https://github.com/silent18killer/face-emotion-recognition
Facial Expression Recognition is the process of detecting and interpreting human emotions from facial features using computer vision and machine learning techniques.
https://github.com/silent18killer/face-emotion-recognition
fer opencv-python pyhton
Last synced: 4 months ago
JSON representation
Facial Expression Recognition is the process of detecting and interpreting human emotions from facial features using computer vision and machine learning techniques.
- Host: GitHub
- URL: https://github.com/silent18killer/face-emotion-recognition
- Owner: Silent18Killer
- License: mit
- Created: 2024-09-29T19:00:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-20T09:28:56.000Z (about 1 year ago)
- Last Synced: 2025-05-13T17:24:33.360Z (about 1 year ago)
- Topics: fer, opencv-python, pyhton
- Language: Python
- Homepage:
- Size: 7.25 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Facial Expression Recognition
INTRODUCTION
Facial Expression Recognition (FER) is a field within computer vision and artificial intelligence (AI) that involves detecting and interpreting human facial expressions from digital images or video streams. The goal of FER systems is to automatically identify and classify emotions or affective states such as happiness, sadness, anger, surprise, fear, disgust, and neutral expressions. These systems can be applied in various real-world applications, ranging from human-computer interaction to healthcare, marketing, and security. FER project works to design, implement, and evaluate a system that can accurately detect and classify facial expressions in real-time or from static images. The project involves collecting or utilizing an existing dataset of facial expressions, building a machine learning model (such as a CNN), and fine-tuning the model to improve accuracy and performance. This could include tackling specific challenges such as handling facial occlusions, lighting variations, and ensuring real-time processing for practical applications.In summary, Facial Expression Recognition is an exciting and rapidly advancing field with significant implications across various industries. A successful FER project will contribute to creating more human-aware technologies, improving user experiences, and potentially enhancing various sectors like healthcare, security, and human-computer interaction.
How to use
The code uses the opencv-python and FER libraries, so you'll need to install these and any of their dependencies using pip.
-
If you want to use the live camera functionality, make sure your camera is connected and accessible. If you're using a laptop, the built-in webcam should work by default.
-
You can run the code in any Python environment (like PyCharm, VSCode, or a terminal). Save the code to a .py file (e.g., emotion_detection.py), then open a terminal in the folder where the file is saved and run the following command: python emotion_detection.py
-
When the code runs, you'll be prompted to choose between two options:
Enter 1 for Live Camera Emotion Detection.Press q to quit the live feed.
Enter 2 for Image File Emotion Detection. If you choose this option, you'll need to provide the full path to the image file you want to analyze.
Project Preview
You'll be prompted to choose between two options:
Enter 1 for Live Camera Emotion Detection.
Enter 2 for Image File Emotion Detection. If you choose this option, you'll need to provide the full path to the image file you want to analyze.
OPTION 1 : For Live Camera:

OPTION 2 : For Uploading the Image:

Explanation PPT
Here is the link to the explanation ppt. Click here
Installation
This code will work in VScode or PyCharm
1. Run the following commands for the installation of the requireds libraries:
```
pip install opencv-python fer
[Note: If error is met while installing, then run the install command separately.
For example, pip install opencv-python, pip install fer]
```
2. Run the Python file using the following command:
```
python main.py
```
License
This project is released under the MIT License. See the LICENSE file for more information.