# EyeGestures V4 · Tanym integration

Based on [NativeSensors/EyeGestures](https://github.com/NativeSensors/EyeGestures),
Copyright Piotr Walas and contributors. Upstream commit:
`fd17b01d89395a7e1d4cf8356cff6e503f3b3e6c`.

The EyeGestures engine and this Tanym adaptation are available under
[GNU GPL version 3](./LICENSE), without any warranty. The tracker, integration,
and session client source are supplied in editable form beside the application.
MediaPipe remains under its own Apache-2.0 license; see [its notice](../NOTICE.md).

## Changes made by Tanym, 3 November 2026

- Uses the upstream V4 eye/face feature extraction and regression core, compiled
  to WebAssembly. MediaPipe Face Landmarker provides the 478 input landmarks.
- Exposes feature extraction separately, plus explicit train, finish-target,
  predict and reset methods. Existing automatic retraining is not invoked.
- Tanym displays 25 distinct, inset calibration targets, waits for the gaze to
  settle and accepts 24 valid frames at each target. Five separate targets test
  the frozen model. Validation samples are never used for training.
- Returns unsmoothed, unclamped predictions. Tanym applies a separate display
  filter; exports retain raw coordinates and the precise method identifier.
- Rejects missing/malformed landmarks, lost faces, closed eyes, major pose changes
  and out-of-viewport predictions. Camera, landmarks and calibration data remain
  in browser memory and are released on stop. No uploads or telemetry are added.

This is an adapted integration, not the unmodified EyeGestures demo. No measured
human accuracy advantage is claimed. Synthetic tests establish software behavior
only; every participant needs independent validation on their own camera.

## Corresponding source

- [Cargo.toml](./source/Cargo.toml) and [Cargo.lock](./source/Cargo.lock)
- [EyeGestures core](./source/src/eyegestures.rs)
- [EyeGestures calibration](./source/src/calibrator.rs)
- [Tanym WebAssembly entry points](./source/src/lib.rs)
- [Rebuild script](./source/build.sh)
- [Browser adapter](../../eyegestures-adapter.js)
- [Recorder](../../gaze.js), [display filter](../../gaze-filter.js),
  [quality checks](../../gaze-math.js), [session](../../session.js),
  [translations](../../locale.js), [HTML](../../index.html), [CSS](../../session.css)

Built with Rust 1.94.0, `wasm32-unknown-unknown`, wasm-bindgen 0.2.122.
Install the same wasm-bindgen CLI version, then run `sh source/build.sh` from
this directory. Cargo.lock pins Rust dependencies. The checked-in engine.js and
engine_bg.wasm allow ordinary Site builds without a Rust installation.

A visible EyeGestures attribution links to the original project. The rest of
Tanym's account service, robot control and private measurements are separate and
are not part of this engine source distribution.
