Skip to content

Main repository for facial expression recognition CNNs construction project.

Notifications You must be signed in to change notification settings

GFaure9/mood-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building CNNs for Facial Expression Recognition

This repository contains a project with the aim of building a simple CNN to classify faces images into 7 expressions categories:

Angry Disgust Fear Happy Sad Surprise Neutral
Image 1 Image 2 Image 3 Image 4 Image 5 Image 6 Image 7

It uses as train/test data the following Kaggle.com dataset: Facial Emotion Expressions.

This project is a work in progress and is not yet completed.
However, it provides a basis Python framework to prepare Kaggle's downloaded data and to customize, build, train and test Convolutional Neural Networks to perform human facial expression classification on images.

Feel free to fork it and make your own changes/improvements (and eventually create a pull request).

Prerequisites/Dependencies

  • Python 3.10 or higher (this is what I used but older versions probably also work, typically >=3.8)

List of needed dependencies:

  • TensorFlow (for all the DL pipelines)
  • OpenCV (to modify/visualize images)
  • Matplotlib (not mandatory, to plot curves...)

Installation

Clone the repo:

git clone https://github.com/GFaure9/mood-detection.git

And after having created clean virtual environment in project's folder:

pip install -r requirements.txt

About the project...

Some insights about implemented objects (in src):

  • CNN: main class to define, build and train a CNN using TensorFlow lib through Keras API
  • DataFacesImages: main class to build training and test datasets from faces images database
  • Pipeline: class defining pipelines to run for building, training and testing face expression classification models
  • create_downsampled_datasets(_input_path, output_path sample_size_): function that creates a new folder from a chosen folder, with the same sub-folders but keeping only a given number of files in each sub-folder

In exploration a Jupyter Notebook was started to start testing and using these objects and find the best configuration for the CNN.

About

Main repository for facial expression recognition CNNs construction project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published