- General info
- Background
- Repository Description
- Attention Mechanism
- Architecture
- Requirement
- Further development ideas
- References
- Notes
In this project, we propose an approach based on an attention mechanism in the prepossessing phase, even before training our network. which requires low resource consumption and is still able to achieve great performance over previous models on the FERG database.
Over the last few years, there is an increase in the desire to use deep learning tools to understand human behavior patterns. One of the most trendy challenges in this field is facial expression recognition. Facial expressions are a form of nonverbal communication. The immediate association when talking about human behavior is facial expression and, it's can tell us a lot about human emotions. The challenge is predicting the underlying image to one of seven different emotions (happiness, sadness, anger, fear, disgust, surprise, neutral).
Filename | description |
---|---|
emotion-recognision.ipynb |
The main file in google colab format, including the prepossessing. to open import to google colab |
emotion-recognision.py |
The main file in Python format |
prepossessing.py |
The prepossessing only in a python format |
dataset.py |
Python file consists of the implementation of the dataset object. |
architecture.py |
Python file consists of the implementation of the proposed architecture. |
res |
Folder consists of all the images from the project |
requirement.txt |
File containing all the packages we used in this project |
FinalProjectDeepLearning.pdf |
The report of the project |
We proposed an attention mechanism that relies on a prior belief that much of the clues come from two major regions- the mouse region and the eyes region. Considering this fact we divide the images into two blocks.
- Upper Block consists of the eyes and eyebrows.
- Lower Block consists of the mouse.
We extract those two blocks by a pretrained model from OpenCv library and others helper functions we implemented.
The fully explenation is in the report.
The proposed architecture used for this work is further explained in the report
To run this project, you need to install several packages. For convenience, we created a requirement.txt
file consists of all the packages used in this projcet.
In order to install all the packages in the requirement.txt
file, simply use to command pip install -r requirements.txt
.
- Try to expand our work to more facial expression datasets.
- Try different uses of the attention mechanism.
- FERG dataset source: FERG dataset
- The data, and the predictor are too big to be uploaded to GitHub. You can found them in the following links: train validation, test, raw-images, predictor (for the raw images and the predictor you need to download the files and put them in a folder with the exact same name as in the original folder)