Coder Social home page Coder Social logo

lampadovnikita / emotionrecognition Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 8.0 100.32 MB

An Android application performing recognition of facial emotions on an image

License: MIT License

Java 100.00%
android tensorflowlite mlkit-android mlkit-face-detection java emotion-recognition face-detection convolutional-neural-network convolutional-neural-networks

emotionrecognition's Introduction

EmotionRecognition

This repository represents an android application performing recognition of facial emotions on an image.

The application

To detect faces on an image the application uses ML Kit. After detection complete the face image area converted into greyscale 48*48 pixel format, each pixel represents as [0, 1] float number. Finally, converted area fed to the TensorFlow Light convolutional neural network model (simple_classifier.tflite). The model provide output that consist of probabilities for each class: angry, disgust, fear, happy, neutral, sad, surprise.

The hybrid dataset

To train the CNN model there used hybrid dataset composed of the following datasets images:

  • CK+ (all images except contempt images).
  • JAFFE (all images).
  • FER2013 (all images).
  • RAF-DB (all images but only 205 happy class images).

The resulting hybrid dataset contains 46614 images and has the following data distribution:

All images was converted into the FER2013 images format - greyscale 48*48 pixels.

The convolutional neural network used

To classify facial emotions the application uses trained deep convolutional neural network (simple_classifier.tflite). Each pixel converted from [0, 255] integer number to [0, 1] float number. The neural network has the following structure:

Parameter Value
min_delata 0.0001
patience 10
optimizer Adam
learning_rate 0.0001
loss categorical_crossentropy
batch_size 96

The DNN model trained on hybrid dataset. The dataset was split into two subsets: a train subset (80%) and a test subset (20%).
Normalized confusion matrix:

Metric Value (Test subset)
Accuracy 0.678
Precision 0.662
F1 0.647

emotionrecognition's People

Contributors

lampadovnikita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

emotionrecognition's Issues

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.