Git Product home page Git Product logo

gender-emotion-classifier's Introduction

Gender and Emotion Classifier with Deep Learning

A classifier that uses realtime webcams to detect faces and extrapolate emotions and gender of faces

  Tensorflow CUDA

alt tag

Guided back-prop alt tag

Real-time demo:

Real-time face detection and emotion/gender classification using fer2013/IMDB datasets with a keras CNN model and openCV.

  • IMDB gender classification test accuracy: 96%.
  • fer2013 emotion classification test accuracy: 66%.

Inspiration

This project is greatly inspired from the Sandberg Paper called Google FaceNet, thereby harnessing Google's whitepaper implementations and applying them for real world production ready use cases and environments as a robust solution

Technology

Oversight uses a number of open source projects to work properly:

  • Tensorflow - A google open-source ML framework
  • Python - awesome language we love

Environment Setup

This was built on Windows 10.

These were the pre-requisities :

NVIDIA CUDA Toolkit
  • CUDA - parallel computing platform and programming model developed by NVIDIA for general computing on graphical processing units (GPUs). Download and Install all the patches. During install, choose Custom and uncheck the Visual Studio Integration checkbox.
Download cuDNN
  • cuDNN - The NVIDIA CUDA® Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. Create a NVIDIA developer account to download.
Set Path :

Add the following paths,   C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin   C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp   C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\extras\CUPTI\libx64

Install Anaconda with 3.6 x64
$ conda update conda
Run package installer
$ pip install -r requirements.txt

Instructions

Run real-time emotion demo:

$ python3 video_emotion_color_demo.py

Run real-time guided back-prop demo:

$ python3 image_gradcam_demo.py

Make inference on single images:

$ python3 image_emotion_gender_demo.py <image_path>

e.g.

$ python3 image_emotion_gender_demo.py ../images/test_image.jpg

To train previous/new models for emotion classification:

  • Download the fer2013.tar.gz file from here

  • Move the downloaded file to the datasets directory inside this repository.

  • Untar the file:

$ tar -xzf fer2013.tar
  • Run the train_emotion_classification.py file
$ python3 train_emotion_classifier.py

To train previous/new models for gender classification:

  • Download the imdb_crop.tar file from here (It's the 7GB button with the tittle Download faces only).

  • Move the downloaded file to the datasets directory inside this repository.

  • Untar the file:

$ tar -xfv imdb_crop.tar
  • Run the train_gender_classification.py file
$ python3 train_gender_classifier.py

Todos

  • Optimize Further to increase speed
  • Implement Docker and Jenkins based deployment

License

Public

gender-emotion-classifier's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.