Image emotion classification based on Tensorflow.js and Webpack.
Check out the demo and upload your own picture.
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
What this thing does is:
- Find faces in an image using tfjs BlazeFace detector
- Extract those faces, and prepare them for classification (resize, grayscale, normalize, ...)
- Classify the emotion of each found face using a converted version of this open-sourced CNN model trained on the FER-2013 dataset.
- 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