Menu

How I built lookat-we: left/center/right gaze tracking in the browser
📰

How I built lookat-we: left/center/right gaze tracking in the browser

DEV Community: computervision·SuperHappycat·7 days ago
#APvDaVfy
Long article (1875 words) — no AI summary yet.
Reading 0:00
15s threshold

Hi, I'm Nate. I'm from Bangkok and I've been coding since I was 8! It's been a long journey.

This post is about lookat-we, a small library I just made. It uses your webcam to tell if you are looking left, center or right at the screen. Everything runs in the browser tab, and the video never leaves your device.

You can try the live demo here (needs a webcam): https://superhappycat.github.io/lookat-we/

I'll go through how it works step by step, with the real code. I'll also show a small trick I used to keep my face out of the demo.

Why I made it

A few months ago I entered a competition with a project called LookAtMe. For it I needed to know one thing in the browser: is the person looking left, center or right?

The main option was WebGazer.js. It's the best-known gaze library for the browser, and to be fair, it does more than mine. It gives you a full x, y gaze point. But it is GPLv3 (LGPLv3 for companies valued under $1M), and its official maintenance has ended.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.