0%

0000000

0x00

Emotions AI

Project Name: Real-time facial expression detection that runs entirely in the browser, with no build step and no server.

Technologies: TensorFlow.js WebRTC JavaScript

Project Links: Live Repository Available for similar engagements

Emotions AI with a webcam feed and a face detection overlay, labelling the detected expression in the browser.

The architecture is the absence of one

Emotions AI points your webcam at your face and labels the expression it finds, live, at frame rate. The interesting part is what is missing: there is no package.json in this repository. No build step, no bundler, no framework, no server doing inference. index.html loads two scripts, face-api.min.js and script.js, and that is the entire application.

Twelve model files sit in the repo's own models/ directory: the expression classifier, the 68-point face landmark detector, its tiny variant, and the detector weights. The browser downloads them once and runs the network locally.

That detail is what makes the privacy claim checkable rather than promised. A page that sends frames to an API for classification and a page that classifies them on your machine look identical from the outside. Here you can open the network tab and watch it: weights come down, and nothing goes back up. Your face never leaves your laptop, because there is nowhere for it to go.

Why face-api.js and not TensorFlow.js directly

face-api.js is built on TensorFlow.js, so both are true, but naming TensorFlow.js as the primary library would oversell what was written here. face-api.js supplies the detector, the landmark model and the expression classifier as a single package with the pretrained weights already matched to them. The work in script.js is wiring: a <video> element, two stacked <canvas> overlays, and a render loop that draws the landmark mesh and the current label on top of the feed.

The one that stayed

Created January 2023 and still receiving pushes in September 2024, this is the longest-lived of the five browser experiments. Its live title, "Emotions AI | Tensorflow X Javascript X Camera = Coolness", is the most 2023 sentence on this entire site, and it is staying.

Links

Live: emotions-ai.abchaudary.me. Source: github.com/abdullahchaudary/emotions.