EmotionFaceRecognition is a software designed to predict emotions from facial expressions written in Python. The purpose of this project is to allow a machine to be capable to detect face expressions while predicting the emotions.
# Repository files
$ git clone git@github.com:i62lucoc/EmotionFaceRecognition.git
# Download large files from Google Drive
$ cd EmotionFaceRecognition/
$ python3 download.py
# Install pipenv (Recommended) or install libraries manually
$ pip3 install pipenv
$ pipenv install
# Activate shell for executables
$ pipenv shell
Parameter | Description | Command | Required | Default | Options |
---|---|---|---|---|---|
Results Directory | Directory path to save results | -r | True | None | None |
Confidence | Confidence to accept a face detection from DNN OpenCV detector | -c | False | 0.75 | None |
Model File | Trained model filename | -m | False | vgg19.h5 | None |
Window Size | Integer number to apply temporal window operations | -w | False | 3 | < 2 (Deactivate) > 1 (Activate) |
Operation | Operation to apply when temporal window is activated | -o | False | AVG | AVG MEDIAN MAX |
Face Detector | Select which face detector is going to be used | -d | False | DNN | DNN OPENCV DLIB |
Media Input | Select input media | -i | False | 0 | 0 (Camera) Video file Image file Folder with images |
# Access to demo executable
$ cd Executables/
# Execute demo with default values (camera, AVG, DNN OpenCV detector and windowSize = 3)
$ python3 demo.py -r folder/
# Watch out! If you are going to execute demo more than once give other folder pathname or delete the existing one
$ python3 demo.py -r folderDNN/ -i ../Images/ -m ../Models/vgg19.h5 -d DNN
# Execute demo with a video and using OpenCV HaarCascade detector
$ python3 demo.py -r folderDNN/ -i ../Videos/se01.mp4 -m ../Models/vgg19.h5 -d DNN
$ python3 demo.py -r folderOPENCV/ -i ../Videos/se01.mp4 -m ../Models/vgg19.h5 -d OPENCV
$ python3 demo.py -r folderDLIB/ -i ../Videos/se01.mp4 -m ../Models/vgg19.h5 -d DLIB
# Give permissions to execute uninstall script
$ chmod 777 uninstall.sh
$ ./uninstall.sh
- TensorFlow - Tools for machine learning.
- Keras - Tools for convolutional neural networks.
- OpenCV - Tools for image processing
- EmotioNet - Database for training and validation.
- EmotionFACS - Database for training and validation.
- AffectNet - Database for training and validation.
This project is licensed under the GNU GPL v3 License - see the LICENSE.md file for details.