Lumen: Blink Detection to Embedded Actuation

A webcam blink-detection pipeline drives a physical ESP32-S3 light object over serial, built to show a full computer-vision-to-hardware loop working end to end.

00

problem

Screen-work strain builds quietly. Most warning systems interrupt with a screen notification, competing for the same attention that's already the problem.

solution

Lumen tracks blink rate through a laptop webcam, scores it against a rolling personal baseline, and expresses the result as light on a physical object next to the screen instead of another pop-up.

MediaPipe Face Mesh locates facial landmarks; six per eye feed the eye aspect ratio calculation, thresholded at 0.21 to flag a blink. A BaselineEngine keeps a 30-sample rolling mean of blink rate, pre-filled with a literature prior (15/min, Rosenfield 2011) so it means something from sample one, and floored at 7/min so a sustained low rate can't drag its own reference down and quietly read as normal. RiskEngine combines that with time elapsed since the last break into one score, half blink strain, half focus time, weighted so time alone can never trigger the highest state without physiological signal alongside it. The result drives an ESP32-S3 over serial: warm white at rest, amber under rising strain, red at the break threshold, with tap-to-pause and hold-for-breathing gestures handled locally by the firmware.

Blink detection held F1 = 0.92 in the most conservative tested condition (head turns, 1m) and stayed above 0.90 across every lighting and distance combination inside the 60-150cm operating range. It drops to 0.57 at 2m under lamp-only light, a limit documented rather than tuned away.

My role: solo build, computer vision pipeline, risk-scoring logic, and firmware. Yuting Chen (KTH) collaborated on the physical hardware sessions and breathing-pattern testing.

Submitted to NordiCHI 2026 Demo track; not accepted, for logistical reasons rather than a reflection of the work.

category

Computer Vision

year

2026

Platform/Hardware

ESP32-S3, NeoPixel ring (WS2812B), momentary push-button, hand-cast silicone enclosure

Frameworks / SDKs

MediaPipe, OpenCV, Arduino/Adafruit_NeoPixel

Languages

Python, C++

.say hello

I’m happy to walk you through my projects and explore collaboration and grab a coffee.

.say hello

I’m happy to walk you through my projects and explore collaboration and grab a coffee.