The Emotion Detector Web Application leverages Facial Expression Recognition (FER) to analyze emotions in real-time and from photos. This intuitive application provides instant and accurate emotional analysis, enhancing your understanding of human responses in different contexts.
These instructions will guide you through setting up and running the application on your local machine for development and testing purposes.
- Python 3.6 or higher
- pip (Python package installer)
- Virtual environment
-
Clone the repository:
git clone https://github.com/<USERNAME>/emotion_detector_project.git
-
Navigate to the folder repository
cd engineer-diploma
Execute the bash script in the downloaded repo folder to set up the environment, install the necessary libraries, and start the Django web application:
./run.sh
The application will be accessible at http://127.0.0.1:8000/
or the URL provided in your terminal.
To utilize the live emotion detection feature:
- Open your web browser and navigate to
http://127.0.0.1:8000
. - Go to the "Live Detection" page.
- Allow the necessary permissions to access your webcam.
- Observe the real-time emotional analysis as the application identifies faces and their associated emotions.
To perform emotion analysis on photos:
- Open your web browser and go to
http://127.0.0.1:8000
. - Go to the "Photo Detection" page.
- Upload a photo using the provided interface.
- View the results as the application detects faces and their associated emotions in the uploaded photo.
In the model/models_code
folder, you will find six subfolders rigorously tested FER approaches. Each subfolder comes with model performance metrics, aiding you in selecting the most suitable one for your needs and code of letting to train such network. Models were trained using the merged databases (Ck+, FER2013, RAF-DB). The models include:
- Deep Convolutional Network: A deep convolutional network tailored for FER.
- VGG16 Transfer Learning: Employing the VGG16 architecture with pretrained weights.
- ConvNext Vision Transformer: Leveraging the ConvNext architecture with pretrained weights for a unique combination of convolutional layers and transformers.
- ViT Vision Transformer: Utilizing the Vision Transformer architecture with pretrained weights.
- BEIT Vision Transformer: Based on the BERT pre-training technique adapted for images, with pretrained weights.
- Ensemble Model: A combination of various models to enhance performance, including models with transfer learning.
Performance metrics for each model are provided to ensure you have all the necessary information to make an informed decision.
The ConvNext Vision Transformer
model, equipped with transfer learning, is currently deployed in production due to its superior performance compared to the other models. This unique combination of convolutional layers and transformers provides an effective and efficient solution for real-time emotion detection.
- Michał Kopczyński - mkopczynski24@gmail.com
- Project Link: https://github.com/kopczyn12/engineer-diploma