Skip to content

Jupyter Notebook containing a Convolutional Neural Network to classify emotions from facial expressions trained on the FER2013 dataset

Notifications You must be signed in to change notification settings

StraysWonderland/Neural-Network-for-Facial-Expression-Recognition

Repository files navigation

Network For Emotion Recogntion from Facial Expressions using the FER dataset

Codacy Badge

This repository is a simple jupyter notebook that is trained on the Facial Expressions Recognition (FER2013) Dataset Currently it does not include any additional data manipluation to avoid overfitting, but this might be added in the future

Contributing to Hacktoberfest

If you want to start a pull request to contribute to hacktoberfest, either:

  • take a look at the issues which will include some simple tasks to implement
  • add different model layout as new codeblock in the main file or in the TestNetworks/ subfolder.
  • add codeblocks to plot additional metrics

Dataset

Simply load the FER2013 dataset from kaggle and place the csv in the data folder
Dataset can be downloaded from this link

Requirements

  • tensorflow >= 2.2
  • jupyter notebook
  • python >= 3.8
  • numpy
  • Pandas
  • sklearn

the required virtual environment can be created from either the requirements.txt or the environment.yaml in the requirements folder

workflow

run

jupyter notebook

and go through all the codeblocks if you want to train the network from scratch. the model also saves its architecture and weights to json and hdf file so they can be later on loaded for testing without re-training to do so ; only run the blocks below the loading the model codeblock

Accuracy

Our network achieves around 65% test accuracy

loss

Here is the plot for the loss function:

it suffers from overfitting a lot so in future i might add data manipulation or experiment with the network layout Feel free to contribute to the network layout for better accuracy.

About

Jupyter Notebook containing a Convolutional Neural Network to classify emotions from facial expressions trained on the FER2013 dataset

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •