07FER· AI research product · 2026
A facial-expression AI that reads seven emotions live — without uploading a single frame.
A research-grade emotion recognition product: a model we trained on AffectNet, rebuilt to run entirely inside the browser, wrapped in a full app with live sessions, photo batches, history, reports and an admin console.
- Sector
- AI research product
- Year
- 2026
- Scope
- Full-stack + trained model
- Categories
- AI & machine learning, SaaS & platforms, Education
00 - frames uploaded to any server
00 - expressions scored per frame
−0KB−0KB - removed from the first page load
01The brief· What had to exist
The privacy tax
The brief was a facial expression recognition system people would actually trust with their camera. The first version was accurate but sent every video frame to a Python server — slow on weak connections, expensive to host, and a privacy problem by design. It had to become fast, private and deployable on free infrastructure, without losing the product around it: accounts, live sessions, photo analysis, history, exportable reports and an admin view of usage.
TreatmentIn-browser inference with a compact TensorFlow.js model
02The hard parts· 5 core difficulties
What made it hard. How we got through.
Every project has a part that decides whether it ships. These were this one's.
- 01
A server model that couldn't scale or be trusted
The original MobileNetV2 classifier, fine-tuned on AffectNet, ran behind a Flask API. Every frame made a network round-trip, so readings lagged and every face passed through a server. We moved inference into the browser with TensorFlow.js — a tiny face detector plus an expression network, about half a megabyte in total — so frames are analysed in memory and discarded. Nothing visual ever leaves the device.
- 02
Real-time inference on a phone's budget
Running detection on the main thread froze the UI. The detection loop was rebuilt around refs so only one prediction runs at a time, frames are downscaled before inference, and the loop adapts its interval to how long the last prediction took. The result holds around three readings a second on a mid-range phone while the interface stays at full frame rate.
- 03
Small and distant faces in photos
Wide shots — a person standing in front of a building — returned “no face found” at the detector's default resolution. Still photos now get a higher-resolution pass (608px input) with an automatic retry at 416px, so small faces are found without slowing down the live camera path.
- 04
Silent data loss between model and database
The model labels expressions “angry” and “surprised”, but the API's schema only accepted “Anger” and “Surprise” — so two of seven expressions were silently dropped from every user's history. We introduced a single emotion map used by the model, the UI, the API and the reports, and fixed the label translation at the boundary.
- 05
An admin panel calling endpoints that didn't exist
Create user, change role, reset password and delete user were wired to routes the backend never implemented, and the profile endpoints leaked bcrypt hashes to the browser. We built the missing admin routes with cascade deletes, stripped password hashes from every response, and added throttled activity tracking.
03AI & models· How the intelligence works
A model we trained, re-engineered to run on the user's device.
The first model was a MobileNetV2 classifier fine-tuned on the AffectNet facial-expression dataset and served from Python. For production we moved to an in-browser pipeline: a lightweight face detector finds and crops the face, and a compact expression network scores all seven classes at once. The model downloads once, is cached by the browser, and runs on WebGL or WebAssembly — so recognition works offline after the first visit and no image is ever transmitted.
- 1MobileNetV2 fine-tuned on AffectNet for the original classifier
- 2TensorFlow.js inference: ~0.5 MB of model weights, cached after first load
- 3Seven classes scored per frame; label mapping shared by model, API and reports
- 4Adaptive frame loop holding ~3 readings/second on mid-range phones
- 5Facial action units (FACS) shown alongside each expression for interpretability
04The approach· How it moved
From brief to running product.
- Stage 01
Discover
Profiled the original Python pipeline end to end and measured where latency and privacy risk came from.
- Stage 02
Design
A lab-instrument visual language, a seven-colour emotion spectrum reserved for data, and a live 3D point-cloud face that labels the facial action units it is reading.
- Stage 03
Build
TensorFlow.js inference with a code-split model, React app with live sessions, photo batches, history and PNG reports, Express + MongoDB API.
- Stage 04
Launch
Deployed to Cloudflare's edge with the API running inside a Durable Object; verified on desktop and mobile in light and dark themes.
05The product· Real screenshots of the live build
Screens from the running site.
06Live preview· The real product, right here
Don't take our word for it. Click around.
Load the running product inside this page. You can click, scroll and use it.
07Delivered· What shipped
Handed over, running, owned.
Stack
- TensorFlow.js
- React
- Express
- MongoDB
- Framer Motion
- Cloudflare Workers
Services
- Live camera sessions with face tracking, timer and session timeline
- Batch photo analysis with drag-and-drop, paste and URL import
- History with filters, detail drawer and PNG report export
- Overview dashboard with expression trends over 24 hours, 7 days or all time
- Admin console: users, roles, password resets, inbox and subscribers
- Multi-page marketing site with an interactive 3D face and page transitions
See it for yourself
Take FER for a spin.
It’s live, not a mock-up. Click around, then tell us what you’re building.
facial-emotion-recognition.fluxwright.co