This repository contains code for an emotion recognition system using deep learning techniques. The system is capable of detecting emotions such as confidence, confusion, and nervousness from live video input.
To run the system, ensure you have Python 3.9 installed. Then, install the required dependencies using the following command:
pip install -r requirements.txt- Clone this repository to your local machine.
- Navigate to the project directory.
- Open the
run.batfile or Run the main.py script using commad:python main.py
- Enter the name of the video file when prompted.
- The system will record a video with emotion labels and accuracies overlaid on detected faces.
- To exit the program, press
'q'on the keyboard.
The dataset used can found in the Kaggle. The emotion classification models were trained using the AffectNet dataset, focusing on three emotions: confidence, confusion, and nervousness.
I experimented with multiple architectures including VGG16, ResNet50, DenseNet121, and custom CNN models. The whole process of the training can be viewed in the notebook file personality_recognition.ipynb.
The trained models are stored in the models folder. The VGG16 model achieved the best accuracy and is employed in the emotion recognition system.
dataset: Contains the data concatenated from AffectNet.personality_recognition.ipynb: The training notebook used for the models development and evaluation.main.py: Main script for running the emotion recognition system.models/: Directory containing trained emotion classification models.saved_videos/: Directory where recorded videos are saved.requirements.txt: File specifying Python dependencies.