Giter Club home page Giter Club logo

face-classification-js's Introduction

face-classification-js

Repository for gender and emotion classification using TensorFlow.js. The original repository can be seen at oarriaga/face_classification. We train MobileNet to classify gender and emotion of the face based on FER2013 and IMDB datasets. The face tracking part is done by using trackingjs, lightweight JavaScript core for computer vision.

You can see more details of analysis and examples on tupleblog.

demo

Try out the image classification demo at tupleblog.github.io/face-classification-js. You can also try webcam real-time video classification on web browser at tupleblog.github.io/face-classification-js/webcam.html

contributors

from tupleblog

face-classification-js's People

Contributors

bluenex avatar kittinan avatar titipata avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

face-classification-js's Issues

Create node module

We should create node module out of this project. Let's discuss how we should make it.

  • what should be the module name?
  • what functions should be available?
  • should it be in a class?

For example, the simplest function could be:

import { FaceDetector as fd } from 'face-classification-js';

const result = fd.classifyFace('image-of-face.png');

console.log(result.emotion);

Let's gather more information about this @kittinan @titipata @bachkukkik!

Train other images

Hi Congratulations on the application, I would like to train with another image base to buy the results in my experiment, could you help me how to perform the training to generate the models of the tensorflow, I would be very grateful beyond mentioning your work clear.

face-classification-js/webcam.html is not working properly

Despite camera access being allowed, There is no graphical return on the web browser. @kittinan suspects this is due to the web browser's version.

I tested on Google Chrome Version 71.0.3578.98 (Official Build) (64-bit) and 12.0.2 (14606.3.4). Both can't provide image return.

MacOS 10.14.2 (18C54)

screen shot 2561-12-17 at 10 46 56

Model Conversion Problem

Convert model from

https://github.com/oarriaga/face_classification/tree/master/trained_models/emotion_models

get many error

Keras.JS lastest version

Error: [Model] error loading weights.
    at keras.min.js:1
    at Array.map (<anonymous>)
    at t (keras.min.js:1)
    at keras.min.js:1
    at Array.forEach (<anonymous>)
    at t (keras.min.js:1)
    at t (keras.min.js:1)
    at r (keras.min.js:1)
    at Generator.i [as _invoke] (keras.min.js:1)
    at Generator.t.(:8989/anonymous function) [as next] (https://unpkg.com/[email protected]/dist/keras.min.js:1:449112)
    at i (keras.min.js:1)
    at a (keras.min.js:1)

Tensorflow.JS 0.7

Uncaught (in promise) Error: Unknown layer: SeparableConv2D
    at new t ([email protected]:1)
    at Object.n.deserializeKerasObject ([email protected]:1)
    at Object.n.deserialize ([email protected]:1)
    at p ([email protected]:1)
    at t.fromConfig ([email protected]:1)
    at Object.n.deserializeKerasObject ([email protected]:1)
    at Object.n.deserialize ([email protected]:1)
    at [email protected]:1
    at r ([email protected]:1)
    at Object.next ([email protected]:1)

Tensorflow.JS 0.9

Uncaught (in promise) Error: Could not find weights in manifest with names: conv2d_1/kernel, batch_normalization_1/gamma, batch_normalization_1/beta, conv2d_2/kernel, batch_normalization_2/gamma, batch_normalization_2/beta, separable_conv2d_1/depthwise_kernel, separable_conv2d_1/pointwise_kernel, batch_normalization_4/gamma, batch_normalization_4/beta, separable_conv2d_2/depthwise_kernel, separable_conv2d_2/pointwise_kernel, batch_normalization_5/gamma, batch_normalization_5/beta, conv2d_3/kernel, batch_normalization_3/gamma, batch_normalization_3/beta, separable_conv2d_3/depthwise_kernel, separable_conv2d_3/pointwise_kernel, batch_normalization_7/gamma, batch_normalization_7/beta, separable_conv2d_4/depthwise_kernel, separable_conv2d_4/pointwise_kernel, batch_normalization_8/gamma, batch_normalization_8/beta, conv2d_4/kernel, batch_normalization_6/gamma, batch_normalization_6/beta, separable_conv2d_5/depthwise_kernel, separable_conv2d_5/pointwise_kernel, batch_normalization_10/gamma, batch_normalization_10/beta, separable_conv2d_6/depthwise_kernel, separable_conv2d_6/pointwise_kernel, batch_normalization_11/gamma, batch_normalization_11/beta, conv2d_5/kernel, batch_normalization_9/gamma, batch_normalization_9/beta, separable_conv2d_7/depthwise_kernel, separable_conv2d_7/pointwise_kernel, batch_normalization_13/gamma, batch_normalization_13/beta, separable_conv2d_8/depthwise_kernel, separable_conv2d_8/pointwise_kernel, batch_normalization_14/gamma, batch_normalization_14/beta, conv2d_6/kernel, batch_normalization_12/gamma, batch_normalization_12/beta, conv2d_7/kernel, conv2d_7/bias, batch_normalization_1/moving_mean, batch_normalization_1/moving_variance, batch_normalization_2/moving_mean, batch_normalization_2/moving_variance, batch_normalization_4/moving_mean, batch_normalization_4/moving_variance, batch_normalization_5/moving_mean, batch_normalization_5/moving_variance, batch_normalization_3/moving_mean, batch_normalization_3/moving_variance, batch_normalization_7/moving_mean, batch_normalization_7/moving_variance, batch_normalization_8/moving_mean, batch_normalization_8/moving_variance, batch_normalization_6/moving_mean, batch_normalization_6/moving_variance, batch_normalization_10/moving_mean, batch_normalization_10/moving_variance, batch_normalization_11/moving_mean, batch_normalization_11/moving_variance, batch_normalization_9/moving_mean, batch_normalization_9/moving_variance, batch_normalization_13/moving_mean, batch_normalization_13/moving_variance, batch_normalization_14/moving_mean, batch_normalization_14/moving_variance, batch_normalization_12/moving_mean, batch_normalization_12/moving_variance. 
Manifest JSON has weights with names: batch_normalization_1_1/gamma, batch_normalization_1_1/beta, batch_normalization_1_1/moving_mean, batch_normalization_1_1/moving_variance, batch_normalization_10_1/gamma, batch_normalization_10_1/beta, batch_normalization_10_1/moving_mean, batch_normalization_10_1/moving_variance, batch_normalization_11_1/gamma, batch_normalization_11_1/beta, batch_normalization_11_1/moving_mean, batch_normalization_11_1/moving_variance, batch_normalization_12_1/gamma, batch_normalization_12_1/beta, batch_normalization_12_1/moving_mean, batch_normalization_12_1/moving_variance, batch_normalization_13_1/gamma, batch_normalization_13_1/beta, batch_normalization_13_1/moving_mean, batch_normalization_13_1/moving_variance, batch_normalization_14_1/gamma, batch_normalization_14_1/beta, batch_normalization_14_1/moving_mean, batch_normalization_14_1/moving_variance, batch_normalization_2_1/gamma, batch_normalization_2_1/beta, batch_normalization_2_1/moving_mean, batch_normalization_2_1/moving_variance, batch_normalization_3_1/gamma, batch_normalization_3_1/beta, batch_normalization_3_1/moving_mean, batch_normalization_3_1/moving_variance, batch_normalization_4_1/gamma, batch_normalization_4_1/beta, batch_normalization_4_1/moving_mean, batch_normalization_4_1/moving_variance, batch_normalization_5_1/gamma, batch_normalization_5_1/beta, batch_normalization_5_1/moving_mean, batch_normalization_5_1/moving_variance, batch_normalization_6_1/gamma, batch_normalization_6_1/beta, batch_normalization_6_1/moving_mean, batch_normalization_6_1/moving_variance, batch_normalization_7_1/gamma, batch_normalization_7_1/beta, batch_normalization_7_1/moving_mean, batch_normalization_7_1/moving_variance, batch_normalization_8_1/gamma, batch_normalization_8_1/beta, batch_normalization_8_1/moving_mean, batch_normalization_8_1/moving_variance, batch_normalization_9_1/gamma, batch_normalization_9_1/beta, batch_normalization_9_1/moving_mean, batch_normalization_9_1/moving_variance, conv2d_1_1/kernel, conv2d_2_1/kernel, conv2d_3_1/kernel, conv2d_4_1/kernel, conv2d_5_1/kernel, conv2d_6_1/kernel, conv2d_7_1/kernel, conv2d_7_1/bias, separable_conv2d_1_1/depthwise_kernel, separable_conv2d_1_1/pointwise_kernel, separable_conv2d_2_1/depthwise_kernel, separable_conv2d_2_1/pointwise_kernel, separable_conv2d_3_1/depthwise_kernel, separable_conv2d_3_1/pointwise_kernel, separable_conv2d_4_1/depthwise_kernel, separable_conv2d_4_1/pointwise_kernel, separable_conv2d_5_1/depthwise_kernel, separable_conv2d_5_1/pointwise_kernel, separable_conv2d_6_1/depthwise_kernel, separable_conv2d_6_1/pointwise_kernel, separable_conv2d_7_1/depthwise_kernel, separable_conv2d_7_1/pointwise_kernel, separable_conv2d_8_1/depthwise_kernel, separable_conv2d_8_1/pointwise_kernel.
    at Object.<anonymous> ([email protected]:1)
    at r ([email protected]:1)
    at Object.next ([email protected]:1)
    at [email protected]:1
    at new Promise (<anonymous>)
    at r ([email protected]:1)
    at Object.n.loadWeights ([email protected]:1)
    at [email protected]:1
    at r ([email protected]:1)
    at Object.next ([email protected]:1)

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.