On-device attention & emotion analytics for the classroom
Averaged across every face currently in frame.
Blend of head orientation, eye openness and emotional engagement.
Light faces from the front, mount the camera near eye level, and keep the whole group inside the frame. Backlit windows behind students are the most common cause of missed faces.
Seats are assigned as faces appear and are matched frame to frame by position, so keep the camera still. Type a name once and it sticks to that seat for the rest of the session.
| Seat | Name | Status | Focus | Present | Attention | Emotion | Trend |
|---|
Stored on this device only. Nothing is uploaded.
Class average in white. Tap a name to show or hide that student.
CSV for spreadsheets, PDF for a printable record, PNG for slides.
Lower the analysis size if the frame rate drops. Larger sizes find small, distant faces.
Each frame scores three signals from 0 to 1, then blends them with these weights. They are normalised, so relative size is what matters.
No video, image or audio ever leaves the browser, and none is written to storage. Only the numbers below are kept.
Every analysed frame produces three signals per face, each from 0 to 1, which are blended using the weights on the Settings tab.
Yaw comes from how far the nose tip sits off-centre between the jaw edges, pitch from where the nose falls between the eye line and the mouth, and roll from the tilt of the eye line. All three are ratios, so they hold up whether a student is near the camera or across the room.
The eye aspect ratio compares eyelid opening to eye width using the six landmarks around each eye. It separates a head that is down and eyes closed from a head that is down and reading.
Neutral and happy count as engaged, surprise partially so, and sad, angry, fearful and disgusted count against. Neutral scores high on purpose: a concentrating student usually shows no expression at all.
Treat every number here as a prompt to look up, not a verdict.
Facial expression is not a reliable read of inner emotion. The research consensus is that the same feeling produces different faces across people and cultures, and the same face can mean different things in different situations. Accuracy also varies with skin tone, glasses, face coverings, lighting and camera angle, and the models here were not trained on your class.
A quiet, still student who is thinking hard and a quiet, still student who has checked out can score identically. Autistic students and students with facial differences may be scored unfairly. Never use this output for assessment, reporting or discipline.
It works well as a teaching artefact: students can interrogate the model, argue with the focus weights and find the cases where it fails. That is often more valuable than the readings.
The camera is blocked in an iframe unless the parent page grants it. Include the permission and, if the frame is sandboxed, the download and modal flags:
This is one self-contained file with no external requests, so it works from GitHub Pages, a school
intranet, a USB stick, or a local file. Browsers only allow camera access over
https://, http://localhost, or a local file:// page, so
plain http:// on a LAN address will not work.
SpaceRM1–5Built by Digital Vector. Version , build .
Face detection, landmarks and expression classification by face-api.js (MIT) on TensorFlow.js (Apache 2.0), with the tiny face detector, 68-point landmark and expression models bundled into this file. Everything runs on your own device.