Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 1.26 KB

README.md

File metadata and controls

36 lines (20 loc) · 1.26 KB

tfjs-emotion-classification

Image emotion classification based on Tensorflow.js and Webpack.

A group of girls with rectangles around their faces and annotations about their emotion

Check out the demo and upload your own picture.

Setup

I'm using yarn for my examples, but you could easily use npm as well.

Install dependencies

yarn install

Run dev server

yarn serve

Build

yarn build

About

What this thing does is:

  1. Find faces in an image using tfjs BlazeFace detector
  2. Extract those faces, and prepare them for classification (resize, grayscale, normalize, ...)
  3. Classify the emotion of each found face using a converted version of this open-sourced CNN model trained on the FER-2013 dataset.

Credits

  • brendansudol did something similar with React and faceapi.js which was the basis for my project. Check out his repository
  • Example Foto Credit: Omar Lopez on Unsplash