Facial Expression AI
In this project, I developed a Convolutional Neural Network (CNN) using Keras and TensorFlow to detect facial keypoints and expressions. The goal of the project was to accurately predict the expression and corresponding facial keypoints for a given image of a human face. The dataset used for training and testing the model included images of faces with different expressions, with a total of approximately 27000 images split across 5 different emotions plus keypoints. The total amount of data per emotion used to train the model is represented by the bar chart below.
A confusion matrix representing the model’s predicted emotions versus true emotions, labeled 0-4, is shown below. The matrix shows that the model was most accurate in predicting emotions 0, 2, 3, and 4, but struggled with emotion 1, representing “disgust”, mostly due to the low amounts of data to train the model as seen above.
Finally, a grid of emotions with detected keypoints and predicted emotions for their respective image is shown below. The grid provides visualizations of the model’s predictions for different emotions, including the facial keypoints detected and the predicted emotion label. The visualizations are useful for gaining insights into the strengths and weaknesses of the model, as well as for identifying areas for improvement in future iterations of the project.