Student Emotion Recognition System

On-device attention & emotion analytics for the classroom

Starting up

Emotion distribution

Averaged across every face currently in frame.

Class focus

Blend of head orientation, eye openness and emotional engagement.

0%
Camera off

Right now

In frame
0
Engagement
0%
Dominant
Detect rate
0 fps

Better results

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.

00:00
Seats tracked
0
Present now
0
Class focus
0%
Needs attention
0

Roster

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
No seats yet Start the camera on the Live tab and point it at the room. Each detected face becomes a row here.

Saved sessions

Stored on this device only. Nothing is uploaded.

Nothing recorded yet Run a class session and it will appear here with a focus timeline you can export.

Camera

Detector

Lower the analysis size if the frame rate drops. Larger sizes find small, distant faces.

Focus model

Each frame scores three signals from 0 to 1, then blends them with these weights. They are normalised, so relative size is what matters.

Facing the front scores high; turned away scores low.
Catches heads-down and drowsiness.
Neutral and happy read as engaged.

Tracking

How long a seat can go undetected before it is counted as away.
Guards against spurious detections filling the roster.

Privacy and data

No video, image or audio ever leaves the browser, and none is written to storage. Only the numbers below are kept.

How the focus score works

Every analysed frame produces three signals per face, each from 0 to 1, which are blended using the weights on the Settings tab.

Head orientation

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.

Eye openness

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.

Emotional engagement

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.

What this tool cannot tell you

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.

Before you point a camera at students

  • Check your school's policy and your jurisdiction's privacy law. In Australia this generally means an approved privacy impact assessment.
  • Tell students what is running and why, and let them opt out without penalty.
  • Get informed consent from families where students are minors.
  • Turn on Replace names with seat codes in Settings if the data will be shared beyond you.
  • Delete session data once it has served its purpose.

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.

Embedding this page

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:


            

Hosting

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.

Keyboard shortcuts

Space
Start or stop the camera
R
Start or end a class session
M
Mirror the preview
15
Jump to a tab

Credits

Digital Vector digitalvector.com.au

Built 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.