An implementation of face emotion recognition by Convolutional neurla network.
- Caffe 1.0.0
- Python 2.7/3.5
- OpenCV (cv2)
- Numpy
- mtcnn
As for humans, we classify emotions all the time without knowing it. We can see if someone is happy or sad or frustrated and in need of help. However, it is a very complex problem that involves many subtleties about facial expression. Even just the tiniest change in someone’s face can be a signal of a different emotion. Training models that understand human emotions will be critical to build truly intelligent machine that can interact with us likes humans do.
In this project, we build a classifier to recognize basic human emotion from facial expression by two steps: face detection and CNN based recognition.
FER2013 database from Kaggle Challenges in Representation Learning: Facial Expression Recognition Challenge
This dataset has 7 facial expression categories (angry, disgust, fear, happy, sad, surprise and neutral).28709 training set + 3589 validation set of 48px * 48px grayscale images.
- 3589 Testing set of FER2013.
- Preprocessing (recent accomplished)
- Extract and create images for FER2013 from csv
- Face detection
- Face alignment
- Convert to LMDB format
- Compute mean
- Training & Testing (recent accomplished)
- Build model
- Adjust hyper-parameters
- Train model
- Predicting (recent accomplished)
Totally 150 epochs training with 0.01 base learning rate and multi-steps learning strategy.
Learning rate reduced 10% during 60% and 85% training.
Highest test accuracy on FER2013: 78%.
A Real-time Facial Expression Recognizer using Deep Neural Network