Skip to content
Emotion detection on browser using TensorFlow.js
HTML JavaScript CSS
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist update faceapi and tfjs Jan 7, 2019
images Update images/yolo_webcam.gif Oct 11, 2018
models update faceapi and tfjs Jan 7, 2019
src Update TinyFaceDetectWebcam.html May 9, 2019
LICENSE Initial commit Oct 1, 2018 Update Jan 7, 2019


This is a real-time Emotion detection using TensorFlow.js to load a pretrained model into the browser .

Packagist Packagist Packagist Packagist


Detect faces


  • We combine two datasets:
    1. Microsoft FERPlus as one of the dataset to train the emotion-detect model.
    2. Real-world Affective Faces Database (RAF-DB) as another dataset.

Convert Model


  • For MobileNetImage.html and MobileNetWebcam.html:

    Chrome Shape Detection API : FaceDetector: Chrome on Android, macOS, Windows 10 platfrom. Go to chrome browser chrome://flags/#enable-experimental-web-platform-features and enable the feature

  • For TinyFaceDetectWebcam.html you can run on Chrome, Safari and Firefox.


Note, that wearing glasses might decrease the accuracy of the prediction results.

All demos are on our LAB server

You can’t perform that action at this time.