Building Emotional State Predictor using Deep Learning

1. Problem Statement

2. Data and Preprocessing

Folder structure to store our dataset
Detects faces in the image, autocrops and saves it
Code to parse the dataset using the glob module
Convert the image to grayscale using the convert_to_grayscale function
Writing the main code which takes in image path and returns the feature vector
Saving the feature vectors of training dataset in .npy format

3. Understanding the Problem statement

Note that this can also be done using eye function present in numpy module
The images are accessed serially, hence we can explicitly give the labelling by mapping it with number of images

4. Designing the network

Code which defines and compiles the model. Keras with TensorFlow backend is used.

5. Training the network

Code which trains the model.
Validation accuracy comes out to be 33%

6. Visualizing the results

  • Use more training examples
  • Add Dropout layer to the network to combat overfitting.
  • Explore more about early stopping




Aspiring Data Scientist | BITS-Pilani

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Handling Imbalanced Data by Oversampling with SMOTE and its Variants

Use Simply LSTM For Stock Price Perdiction

The Qualitative Aspects of Machine Learning

Random Forest Classifier for Bioinformatics

Using Machine Learning to classify Instrument Sounds

Inferencing indoor room semantics using random forest and relational graph convolutional networks…

Basic Feature Discovering for Machine Learning

K as in Keras…simple classification model!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sethu Iyer

Sethu Iyer

Aspiring Data Scientist | BITS-Pilani

More from Medium

Learn & Create a Neural Network from Scratch using Tensorflow

Dream Visualiser

Exploring neural networks for facial recognition

Tensorflow Basics In 5 Minutes