Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Deep facial expressions recognition using Opencv and Tensorflow. Recognizing facial expressions from images or camera stream
| Date | Stars |
|---|---|
| 2026-07-24 | 518 |
| 2026-07-25 | 518 |
| 2026-07-28 | 518 |
| 2026-07-30 | 518 |
| 2026-08-06 | 518 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Facial expression recognition using CNN in Tensorflow Using a Convolutional Neural Network (CNN) to recognize facial expressions from images or video/camera stream. ## Table of contents [1. Motivation](#motivation) [2. Why is Fer2013 challenging?](#fer2013) [3. Classification results](#results) [4. How to use?](#how-to-use) - [Install the dependeciens](#install) - [Download and prepare the data](#data) - [Train the model](#train) - [Optimize the hyperparameters](#optimize) - [Evaluate a trained model](#evaluate) - [Recognizing facial expressions from an image file](#recognize-image) - [Recognizing facial expressions in real time from video/camera](#recognize-video) [5. Contributing](#contrib) <br /> # <a name="motivation">1. Motivation</a> The goal is to get a quick baseline to compare if the CNN architecture performs better when it uses only the raw pixels of images for training, or if it's better to feed some extra information to the CNN (such as face landmarks or HOG features). The results show that the extra information helps the CNN to perform better. To train the model, we used Fer2013 datset that contains 30,000 images of facial expressions grouped in seven categories: Angry, Disgust, Fear, Happy, Sad, Surprise and Neutral. The faces are first detected using opencv, then we extract the face landmarks using dlib. We also extracted the HOG features and we input the raw image data with the face landmarks+hog into a convolutional neural network. For our experiments, we used 2 CNN models:  # <a name="fer2013">2. Why is Fer2013 challenging?</a> Fer2013 is a challenging dataset. The images are not aligned and some of them are uncorrectly labeled as we can see from the following images. Moreover, some samples do not contain faces.   This makes the classification harder because the model have to generalize well and be robust to incorrect data. The best accuracy results obtained on this dataset, as far as I know, is 75.2% described in this paper: [[Facial Expression Recognition using Convolutional Neural Networks: State of the Art, Pramerdorfer & al. 2016]](https://arxiv.org/abs/1612.02903) # <a name="results">3. Classification Results (training on 5 expressions)</a> | Experiments | SVM | Model A | Model B | Difference | |----------------------------------------------|-----------|----------|-----------|-------------| | CNN (on raw pixels) | ----- | 72.4% | 73.5% | +1.1% | | CNN + Face landmarks | 46.9% | **73.5%** | 74.4% | +0.9% | | CNN + Face landmarks + HOG | 55.0% | 68.7% | 73.2% | +4.5% | | CNN + Face landmarks + HOG + sliding window | **59.4%** | 71.4% | **75.1%** | +3.7% | As expected: - The CNN models gives better results than the SVM (You can find the code for the SVM implmentation in the following repository: [Facial Expressions Recognition using SVM](https://github.com/amineHorseman/facial-expression-recognition-svm)) - Combining more features such as Face Landmarks and HOG, improves *slightly* the accuray. - Since the CNN Model B uses deep convolutions, it gives better results on all experiments (up to 4.5%). It's interesting to note that using HOG features in the CNN Model A decreased the results compared to using only the RAW data. This may be caused by an overfitting or a failure to extract the coorelation between the information. In the following table, we can see the effects of the batch normalization on improving the results: | Batch norm effects | on Model A | on Model B | |----------------------------------------------|--------------|--------------| | CNN (on raw pixels)
Excerpt of 9,317 characters
Read on GitHubAmine · France
44
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:54fd2d43b099749b, topic:deep-learning, topic:tensorflow
matched fp:54fd2d43b099749b, topic:opencv, topic:image-classification