All Projects → rishabhjainps → Facial Expression Recognition

rishabhjainps / Facial Expression Recognition

Licence: mit
Classify each facial image into one of the seven facial emotion categories considered using CNN based on https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Facial Expression Recognition

Human Action Recognition With Keras
Keras implementation of Human Action Recognition for the data set State Farm Distracted Driver Detection (Kaggle)
Stars: ✭ 156 (+90.24%)
Mutual labels:  kaggle, convolutional-neural-networks
Artificial Intelligence Deep Learning Machine Learning Tutorials
A comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
Stars: ✭ 2,966 (+3517.07%)
Mutual labels:  kaggle, convolutional-neural-networks
Data Science Bowl 2018
End-to-end one-class instance segmentation based on U-Net architecture for Data Science Bowl 2018 in Kaggle
Stars: ✭ 56 (-31.71%)
Mutual labels:  kaggle, convolutional-neural-networks
Allstate capstone
Allstate Kaggle Competition ML Capstone Project
Stars: ✭ 72 (-12.2%)
Mutual labels:  kaggle
Quicknat pytorch
PyTorch Implementation of QuickNAT and Bayesian QuickNAT, a fast brain MRI segmentation framework with segmentation Quality control using structure-wise uncertainty
Stars: ✭ 74 (-9.76%)
Mutual labels:  convolutional-neural-networks
Kaggle Airbus Ship Detection Challenge
Oriented SSD for "Kaggle Airbus Ship Detection Challenge"
Stars: ✭ 78 (-4.88%)
Mutual labels:  kaggle
Facial emotion recognition emojifier
Recognizes the facial emotion and overlays emoji, equivalent to the emotion, on the persons face.
Stars: ✭ 82 (+0%)
Mutual labels:  convolutional-neural-networks
3d Reconstruction With Neural Networks
3D reconstruction with neural networks using Tensorflow. See link for Video (https://www.youtube.com/watch?v=iI6ZMST8Ri0)
Stars: ✭ 71 (-13.41%)
Mutual labels:  convolutional-neural-networks
Ros Openpose
CMU's OpenPose for ROS
Stars: ✭ 81 (-1.22%)
Mutual labels:  convolutional-neural-networks
Wav2letter
Speech Recognition model based off of FAIR research paper built using Pytorch.
Stars: ✭ 78 (-4.88%)
Mutual labels:  convolutional-neural-networks
Kaggle Notebooks
Sample notebooks for Kaggle competitions
Stars: ✭ 77 (-6.1%)
Mutual labels:  kaggle
Age Gender Estimation
Keras implementation of a CNN network for age and gender estimation
Stars: ✭ 1,195 (+1357.32%)
Mutual labels:  convolutional-neural-networks
Seranet
Super Resolution of picture images using deep learning
Stars: ✭ 79 (-3.66%)
Mutual labels:  convolutional-neural-networks
Recurrent Environment Simulators
Deepmind Recurrent Environment Simulators paper implementation in tensorflow
Stars: ✭ 73 (-10.98%)
Mutual labels:  convolutional-neural-networks
Vehicle Retrieval Kcnns
vehicle image retrieval using k CNNs ensemble method
Stars: ✭ 81 (-1.22%)
Mutual labels:  convolutional-neural-networks
My Journey In The Data Science World
📢 Ready to learn or review your knowledge!
Stars: ✭ 1,175 (+1332.93%)
Mutual labels:  kaggle
Emnist
A project designed to explore CNN and the effectiveness of RCNN on classifying the EMNIST dataset.
Stars: ✭ 81 (-1.22%)
Mutual labels:  convolutional-neural-networks
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-7.32%)
Mutual labels:  convolutional-neural-networks
Mlbox
MLBox is a powerful Automated Machine Learning python library.
Stars: ✭ 1,199 (+1362.2%)
Mutual labels:  kaggle
Elektronn3
A PyTorch-based library for working with 3D and 2D convolutional neural networks, with focus on semantic segmentation of volumetric biomedical image data
Stars: ✭ 78 (-4.88%)
Mutual labels:  convolutional-neural-networks

Facial Expression Recognition

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 .

Data :

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 .

Dependencies

Python 2.7, sklearn, numpy, Keras.

Library Used:

  • Keras
  • Sklearn
  • numpy

Getting started

To run the code -

  1. Download FER2013 dataset from Kaggle Facial Expression Recognition Challenge and extract in the main folder.

  2. To run deep CNN model. Open terminal and navigate to the project folder and run cnn_major.py file

    python cnn_major.py
    
    No need to train the model , already trained weights saved in model4layer_2_2_pool.h5 file.
  3. Want to train model yourself ?
    Just change the statement

       is_model_saved = True
       // to
       is_model_saved = False
     
Shallow CNN Model

Code Link - cnn_major_shallow
Model Structure- Link
Saved model trained weights - Link

Deep CNN Model

Code Link - cnn_major
Model Structure- Link
Saved model trained weights - Link

Model Training:

Shallow Convolutional Neural Network

First we built a shallow CNN. This network had two convolutional layers and one FC layer.

First convolutional layer, we had 32 3×3 filters, along with batch normalization and dropout and max-pooling with a filter size 2×2.

Second convolutional layer, we had 64 3×3 filters, along with batch normalization and dropout and max-pooling with a filter size 2×2.

In the FC layer, we had a hidden layer with 512 neurons and Softmax as the loss function.

Deep Convolutional Neural Networks

To improve accuracy we used deeper CNN . This network had 4 convolutional layers and with 2 FC layer.

Model Evaluation:

Model predicts softmax output for 7 label for an image

[  4.99624775e-07   3.69855790e-08   9.91190791e-01   8.15907307e-03  2.62175627e-06   9.97206644e-06   1.02341000e-03]

which is converted to
[ 2 ]
label having highest value . For evaluation , categorial accuracy is used .

Some Experiment are done by changing number of layers and changing hyper-parameters.

Accuracy Achieved :

Shallow CNN -- 56.31%

Deep-CNN -- 65.55%

References

  1. "Dataset: Facial Emotion Recognition (FER2013)" ICML 2013 Workshop in Challenges in Representation Learning, June 21 in Atlanta, GA.

  2. "Convolutional Neural Networks for Facial Expression Recognition" Convolutional Neural Networks for Facial Expression Recognition Shima Alizadeh, Azar Fazel

  3. "Andrej Karpathy's Convolutional Neural Networks (CNNs / ConvNets)" Convolutional Neural Networks for Visual Recognition (CS231n), Stanford University.

License

Licensed under MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].