Gaze lab
Can a webcam tell where you are looking?
Three different things get called eye tracking, and they are not equally hard. This page runs the middle one and then tells you, in numbers measured on your own face, how well it did.
The three things
- Iris direction relative to the head. "The eyes are pointed off to one side." Cheap, robust, no calibration. Already running on the exam page.
- Which region of the screen is being looked at. Needs a calibration. Realistic — and what this page measures. Enough for "on the exam or off it".
- A precise gaze point, like a hardware eye tracker. Not achievable from a commodity webcam, and nothing here pretends otherwise. The number this page reports is how far off it is.
1 · Camera
Detected: . The face model is about 4 MB and loads once. Frames are analysed in this tab and never uploaded.
This is the one setting worth running twice. MediaPipe's iris stage works on a 64-pixel crop of the eye, so what decides a gaze estimate is how many real pixels your eye occupies — and at 640 × 480, on a measured recording, that crop was 29 pixels being upscaled to 64, in every single frame. Calibrate at 640 × 480, read the error, then reload and do it again at 1920 × 1080: the difference between the two numbers is the answer for your camera and your seating position, and it costs nothing to find out. Timed on this stack, nine times the pixels cost 1.00× the detector time, because the models run on fixed-size crops either way.
2 · Calibrate, then watch it
Nine dots, about fifteen seconds. Look at each one and keep your head reasonably still. Afterwards the fit is scored by predicting each dot with a model that never saw it — so the error you are shown is generalisation error, not a flattering fit to its own data.
Establishing your neutral pose…
Follow the cursor is the second test, and it answers a different question. The nine-point calibration is scored by leaving one of its own nine points out — which cannot see a model that is wrong everywhere between them. Moving the pointer around while your eyes stay on it labels every frame, over the whole screen, so the trail can be split in time and both models judged on data neither was fitted on. Move slowly and cover the corners: the eye cannot smoothly follow anything fast, and a run that only swept sideways fits a model whose vertical mapping was never tested.
- Faces
- –
- Yaw
- –
- Pitch
- –
- Iris offset
- –
- Head + eyes
- –
- Eye in pixels
- –
- Eyes
- –
- Gaze
- not calibrated
- Rate
- –
Zero means "use the calibration's own measured error", which is the honest default. Tighten it to test a monitor stacked directly above or below this one: that screen is only a few degrees away across the bezel, so a tighter margin catches the glance and also starts calling ordinary looks at the top or bottom of your own screen off-screen. There is no setting that avoids that trade.
After calibrating, the yellow dot on this page is where the model thinks you are looking. Its colour says whether that counts as on the screen, at the edge, or off it — using the calibration's own error as the margin, so a coarse calibration is not allowed to accuse you of anything.
3 · Record a session
Press record, then do things: look at the screen, look away, pick up your phone, leave the frame. Tap a marker button each time so the recording is labelled. On stop, two files land in your Downloads — the measurements, and the video they came from — and you can send them to whoever needs to check the claims.
Where you are really looking. These are held states, not moments: press one and every frame from then on is labelled with it, until you press another. That is what turns the recording into a scored test — the nine-point calibration only ever labels points on the screen, so deciding that the gaze left it has never had ground truth. Press “Back on the screen” between look-aways; without on-screen frames there is nothing to measure false alarms against.
Not labelling anything yet.
Label what you are actually doing — this is what makes the recording worth reading: