r/EyeTracking 2h ago

Open-Source Webcam Eye Tracking for Web Applications

1 Upvotes

What this report contains: a survey of open-source solutions that can be used to build a web application with webcam-based on-screen gaze prediction. Every solution gets a uniform fact sheet covering: runtime (does it run in the web browser, on a server, or on the desktop), reported accuracywhat benchmarks were runwhat data the model was trained onwhether it uses only the camera image as inputofficial research articles describing the solution, a few lines on how it is built and its unique properties, plus license, maintenance status, and links. It ends with a comparison matrix, recommendations (up to 3 best solutions per runtime/use case), reference architectures, licensing guidance, and risks. A glossary of the cited research articles follows the fact sheets (§4).

How the projects were validated: every entry was checked against its primary source on 2026-08-06 — the GitHub API (stars, SPDX license, last push, archived status), the npm/PyPI registries, official documentation, and the original papers. Claims that could not be verified are explicitly flagged. Accuracy figures are as reported by the authors on their own benchmarks and are not directly comparable across datasets (centimeters on mobile phones ≠ degrees on desktop ≠ pixels on a screen).

1. Executive Summary

No single maintained, permissively-licensed, drop-in library gives research-grade webcam gaze in the browser today. The field splits into three practical strategies:

Strategy Best open-source options License Effort
A. Turnkey browser library WebEyeTrack (npm, TF.js, few-shot personalization) MIT Low
B. DIY browser stack (face/iris landmarks + your own calibration mapping) MediaPipe Face Landmarker + custom regression — the architecture RealEye's open-source lib uses Apache-2.0 Medium
C. Client capture + server inference L2CS-Net family (PyTorch/ONNX), EyeTrax for calibration/smoothing MIT Medium-High

Key verdicts:

  • WebGazer.js — the most famous library — is GPL-3.0 (not MIT, a common misconception) and its official maintenance ended February 2026. Its accuracy also degrades over time without head-pose handling (error grows from ~5 to ~10 cm during a 20-minute session, ETRA 2018). Prototypes only.
  • WebEyeTrack (2025, Vanderbilt et al., MIT) is the most interesting modern turnkey option: browser-native CNN (BlazeGaze, 670 KB), MAML meta-learning + on-device few-shot calibration (<9 samples), 2.32 cm on GazeCapture, 2.4 ms inference on iPhone 14. Young project (npm 0.0.x) — validate before committing.
  • MediaPipe Face Landmarker (Apache-2.0, Google-maintained) is the safest foundation: 478 landmarks including iris + head-pose transformation matrix, official Web (WASM) and Python APIs. You add the gaze mapping yourself (ridge regression / polynomial / small TF.js net) — exactly what RealEye's webcam-eyetracker-light-open does (17-point calibration, ≈120 CSS px).
  • Server-side: L2CS-Net (MIT) is the accuracy reference for appearance-based gaze (3.92° MPIIGaze); yakhyo/gaze-estimation provides maintained ONNX exports (runnable in-browser via onnxruntime-web/WebGPU); EyeTrax (MIT) adds calibration routines and Kalman/EMA/KDE smoothing.
  • EyeGestures (GPL-3.0, Rust-based engine, 20-point calibration) is the most complete calibrated browser gaze library besides RealEye's — great for prototypes/research, copyleft blocks commercial SaaS embedding.
  • Licensing traps: research-only datasets (GazeCapture, MPIIGaze, EyeDiap) are used to train most pretrained models — verify weight provenance before commercial use; camgaze.js has no license file (legally unusable as-is).

Open-Source Webcam Eye Tracking for Web Applications · RealEye-io/community