Face detection + Age/Gender Recognition + Emotion Recognition with Python & Tensorflow
Clone the repository.
Install these dependencies with pip3 install <module name>
- tensorflow
- numpy
- scipy
- imageio
- opencv-python
- pillow
- pandas
- matplotlib
- h5py
- keras
Compile your config.json
inside config
folder.
Now, you can run the project:
python3 app.py
or using pm2.
In constants.py
you can find the models that I used to detect faces, age, gender and emotions.
I didn't include these models in my repository, but you can download them:
- Download the fer2013.tar.gz file from here
- Move the downloaded file to the datasets directory inside this repository.
- Untar the file:
tar -xzf fer2013.tar
- Download train_emotion_classifier.py from orriaga's repo here
- Run the train_emotion_classification.py file:
python3 train_emotion_classifier.py
- Computer vision powered by OpenCV.
- Neural network scaffolding powered by Keras with Tensorflow
- Convolutional Neural Network (CNN) deep learning architecture is from this research paper
- Pretrained Keras model and much of the OpenCV code provided by GitHub user oarriaga
- Emotion recognition based on petercunha/Emotion
- Age and gender recognition based on Tony607/Keras_age_gender