项目作者: thebatclaudio

项目描述 :
Face detection + Age/Gender Recognition + Emotion Recognition with Python & Tensorflow
高级语言: Python
项目地址: git://github.com/thebatclaudio/dont-worry-be-happy.git
创建时间: 2020-05-29T13:51:38Z
项目社区:https://github.com/thebatclaudio/dont-worry-be-happy

开源协议:MIT License

下载


Don’t worry, be happy 😀

Face detection + Age/Gender Recognition + Emotion Recognition with Python & Tensorflow

Installation

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.

Models

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:

To train new models for emotion classification

  • 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

Credits

  • 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