CLASSIFY THE EXPRESSION OF FACE IN IMAGE OUT OF Eight BASIC HUMAN EXPRESSION
In this project, we are predicting the facial expressions of the eight most basic human expressions: 'anger', 'surprise', 'disgust', 'fear','neutral','happiness','sadness','contempt'.
We have to downloaded data from https://github.com/muxspace/facial_expressions .
Here images folder consists of all the images and in data, legend.csv consists of the images name and the expressions associated with the images.
We use the Keras model.fit_generator to train the model with categorical_crossentropy as the loss function and adam as the optimizer. ReLU is used as the activation function in the Conv2D, hidden layer, and Softmax in the output layer. Early Stopping is used to stop early when the val_accuracy is not increasing much. To convert images to an array and one hot encode label we have used ImageDataGenerator and made different directories for different emotions in training and testing.
You need to have installed the following software and libraries on your machine before running this project.
- Python 3
- Anaconda: It will install ipython notebook and most of the libraries which are needed like sklearn, pandas, seaborn, matplotlib, numpy, PIL.
- TensorFlow
- Keras
- Python 3: https://www.python.org/downloads/
- Anaconda: https://www.anaconda.com/download/
- Tensorflow: pip install tensorflow
- Keras: pip install keras