Skip to content

Classify each facial image into one of the seven facial emotion categories considered using CNN coded in tensorflow

Notifications You must be signed in to change notification settings

rishabhjainps/Facial-Expression-Recognition-tensorflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facial Expression Recognition Using Tensorflow

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, Tensorflow, numpy .

Library Used:

  • Tensorflow
  • numpy

Train

To run the code -

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

  2. After downloading dataset separate dataset into different csv for train ,dev and test. Run separate_data.py in data folder

    python separate_data.py
    

  3. To train the model run train.py file

    python train.py
    
    Separate Model weights for each epoch is saved in model/ folder

  4. Run evaluate.py to get accuracy on test data.

    "./model/model" + str(epochNumber) + ".ckpt" -> load specific epoch Model weight.
    Change this line in evaluate.py to choose which model weights should be loaded

  saver.restore(sess, "./model/model100.ckpt")
  

About

Classify each facial image into one of the seven facial emotion categories considered using CNN coded in tensorflow

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages