Used Convolutional neural networks (CNN) for facial expression recognition . The goal is to classify each facial image into one of the seven facial emotion categories considered .
We trained and tested our models on the data set from the Kaggle Facial Expression Recognition Challenge, which comprises 48-by-48-pixel grayscale images of human faces,each labeled with one of 7 emotion categories: anger, disgust, fear, happiness, sadness, surprise, and neutral .
Image set of 35,887 examples, with training-set : dev-set: test-set as 80 : 10 : 10 .
Python 2.7, Tensorflow, numpy .
- Tensorflow
- numpy
To run the code -
-
Download FER2013 dataset from Kaggle Facial Expression Recognition Challenge and extract in the data/ folder.
-
After downloading dataset separate dataset into different csv for train ,dev and test. Run separate_data.py in data folder
python separate_data.py
-
To train the model run train.py file
python train.py
Separate Model weights for each epoch is saved in model/ folder -
Run evaluate.py to get accuracy on test data.
"./model/model" + str(epochNumber) + ".ckpt" -> load specific epoch Model weight.
Change this line in evaluate.py to choose which model weights should be loaded
saver.restore(sess, "./model/model100.ckpt")