GithubHelp home page GithubHelp logo

devinbostil / webcamemocognizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deepinevil/webcamemocognizer

0.0 2.0 0.0 21.48 MB

A cool emotion detector using your laptop/desktop webcam

Python 100.00%

webcamemocognizer's Introduction

webCamEmocognizer

A cool emotion detector using your laptop/desktop webcam.

The data for this work is taken from the kaggle competiotion: Challenges in Representation Learning: Facial Expression Recognition Challenge https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge

The dataset provided in the competion consists of gray scale images which are 48 x 48 in dimension and the corresponding labels consisting of 7 emotions.

We are using a simple convolution neural network to classify the images.

Then, we are using opencv to extract 48 x 48 dimension images using the webcam and classifying them using our model.

Requirements

The code is written in python 2.7.9
Keras (1.2.1)
numpy
pandas
theano (0.8.2)
cv2 (1.0)

Data

The data consists of scaled images from the kaggle competion kept in the data folder and also the labels in .npy format.

Training and running the tool

To train using the data, use the script trainCNN.py
Firstly, create the image data scaled, run the script
python ./genScaledDat.py
check if the file Scaled.bin.npy is generated in the data folder.
Then run the following:
python ./trainCNN.py

to run the detection using the training models run:
python ./DetectEmotion.py

Sample

Here's a snapshot from the application:

Todos

play around with the hyperparameters to get the best model.

N.B.

This project was part of my Master's thesis, the thesis is also added in the documents folder.

References:

Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks.
Shima Alizadeh, Azar Fazel. Convolutional Neural Networks for Facial Expression Recognition.
https://codeplasma.com/2012/12/03/getting-webcam-images-with-python-and-opencv-2-for-real-this-time/

webcamemocognizer's People

Contributors

deepinevil avatar

Watchers

James Cloos avatar Devin G. Bost 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.