Computer vision / 2026 / Live in the browser
Study Focus Redirector
A webcam focus monitor that watches your head and posture while you study, and when you keep drifting off it opens the McDonald's careers page for you.
01
The problem
Focus timers cannot tell whether you are actually working. They count minutes while you scroll your phone under the desk.
02
How I approached it
Face landmarks give head yaw, pitch and iris gaze, pose landmarks give torso position, and both run through asymmetric exponential smoothing before a state machine decides whether you are focused. It calibrates against your own posture for five seconds first and sets its thresholds from your own wobble (median absolute deviation), so it measures drift from how you actually sit. Drifting builds up evidence over time and fades when you return, so a glance never triggers it. Every 20 focused minutes it pauses for a 20 second eye break, the American Academy of Ophthalmology's 20-20-20 rule, so looking into the distance is not punished, and a status pill shows the calibration countdown, a drift bar and the break timer.
03
The outcome
A study tool with genuine stakes, and a punchline that makes people actually keep it running. The signal maths, state machine, eye breaks and status line are unit tested under Node.