Facial Emotion Recognition on FER2013 Dataset.
All of the code you will run in this project will be in the format of Jupyter Notebooks.
Machine learning is the science of getting computers to act without being explicitly programmed.
-
In a supervised learning model, the algorithm learns on a labeled dataset, providing an answer key that the algorithm can use to evaluate its accuracy on training data. Classification and regression are examples of supervised learning. (we will get to that later!)
-
An unsupervised model, in contrast, provides unlabeled data that the algorithm tries to make sense of by extracting features and patterns on its own.
In machine learning, classification refers to a predictive modeling problem where a class label is predicted for a given example of input data. For example given a handwritten character, classify it as one of the known characters.
Multi-class classification refers to those classification tasks that have more than two class labels. For example plant species classification. In this project you will complete a multi-class classification model.
Neural networks (NN) or artificial neural networks are computing systems inspired by the biological neural networks that constitute animal brains. They are a means of doing machine learning, in which a computer learns to perform some task by analyzing training examples. Usually, the examples have been hand-labeled in advance. An object recognition system, for instance, might be fed thousands of labeled images of cars, houses, coffee cups, and so on, and it would find visual patterns in the images that consistently correlate with particular labels.
In this project we would like to recognize emotions of the given image into 6 categories 'Angry', 'Fear', 'Happy', 'Sad', 'Surprise', 'Neutral' using both classification and neural networks.
- The commonly used dataset for this image classification is FER2013 / Face Expression Recognition which prepared by Pierre-Luc Carrier and Aaron Courville. The dataset contains 35,887 grayscale images of faces with 48*48 pixels. There are 7 categories: Angry, Disgust, Fear, Happy, Sad, Surprise, and Neutral. In this dataset images contain emotion labels (0=Angry, 1=Disgust, 2=Fear, 3=Happy, 4=Sad, 5=Surprise, 6=Neutral)
- Run each step in the
Visualization.ipynb
file and completeTODO
parts in the notebook to understand dataset.
As we said before, the model learns on a labeled dataset. Training data is used for the learning process. Test data is independent of the training data, used for assessing how good the model is.
- Run each step in the
Classification.ipynb
file and completeTODO
parts in the notebook.
- Run each step in the
NeuralNetwork.ipynb
file and completeTODO
parts in the notebook.
- Complete Beginners (Level-1) code
- Multiple face detection and emotion recognition on live stream data.
- Run each step in the
Real-Time-Application.py
file and completeTODO
parts.
-
Are the final results promising regarding emotions?
-
What about less exaggerated images?
-
What about other categories of emotions?
To answer these questions it is important to review the research on how the emotions are expressed naturally. A recent study by Lisa Feldman Barrett, a professor of psychology at Northeastern University concluded that emotions are expressed in a huge variety of ways, which makes it hard to reliably infer how someone feels from a simple set of facial movements.
As a result, AI can detect a scowl, but that’s not the same thing as detecting anger. Scowls are not the expression of anger; they’re an expression of anger — one among many. That means that more than 70 percent of the time, people do not scowl when they’re angry. And on top of that, they scowl often when they’re not angry.
Using FACS human coders can manually code nearly any anatomically possible facial expression, deconstructing it into the specific action units (AU) and their temporal segments that produced the expression.
It is often more accurate to express facial expression in terms of action units instead of emotions.