Research

Telling deliberate from spontaneous blinks on a webcam

Few-shot calibration for blink-based Morse text entry: a small preregistered study with adult volunteers, a features-only dataset and an open-source browser system.

Research questions

RQ1 · Detection

On a consumer webcam (about 30 fps), how accurately can landmark-based detectors find deliberate blinks while ignoring spontaneous ones? How much does per-user calibration with k examples (k = 0, 1, 3, 5, 10) help?

RQ2 · Timing

What are the duration distributions of spontaneous blinks and deliberate short and long closures? What dot, dash and reject thresholds do they imply, and how much does the frame rate limit timing precision?

RQ3 · Text entry

What entry rate and error rate do novices reach, and how do they change over three short blocks of practice?

The hypotheses are written down in docs/preregistration.md before the first session; its commit date shows when. Any later change is listed there under “Deviations”, with its date.

Planned design · preregistration in docs/preregistration.md

Study design

Study A: blink detection benchmark

At least 8 adult volunteers (aiming for 10–12), each in a session of about 12 minutes on a laptop webcam 50–70 cm away, in normal room light. Age range, glasses, lighting, camera model and the measured frame rate are recorded. Data files hold participant IDs only, never names.

Study A protocol
Block Length What happens
Consent – Consent screen, with a separate opt-in for video
Calibration 1 min 15 s eyes open on a dot; 10 cued short and 10 cued long closures
Spontaneous 3 min Read a neutral text; natural blinks only
Deliberate 3 min 40 random cues (short, long, wink left, wink right), 2–4 s apart
Mixed 3 min Read, and respond to cues that appear in a corner

Ground truth. Every closure’s onset, offset and type is labelled by hand by the experimenter, using cues only as hints. Two participants are re-labelled a week later to report self-agreement (Cohen’s κ for type, mean onset difference in ms). Labelling time is reported.

Detectors compared

All five run offline on the same recorded features, with hysteresis and no smoothing buffer.

Detectors D1–D5
ID Signal Threshold
D1 Mean EAR of both eyes Fixed 0.21 (the original app)
D2 Mean EAR Per user, from k closures
D3 Blink blendshape, max of both eyes Fixed 0.5
D4 Blink blendshape Per user, from k closures
D5 Wink: one eye closed, the other open Per user (exploratory)

Calibrated threshold: open − 0.5 · (open − closed), from the median open level and the median of k closures’ deepest points.

Metrics and statistics

  • Event-level precision, recall and F1 for deliberate closures (a match needs interval IoU ≥ 0.3).
  • False triggers per minute in the spontaneous (reading) block.
  • Duration error (detected minus labelled), compared with the frame interval.
  • Short/long classification accuracy and confusion matrix.
  • Per-participant metrics, summarised as the mean with a 95% bootstrap interval over participants (10,000 resamples). Paired detector comparisons use Wilcoxon signed-rank tests with Holm correction. With about ten people, statistical power is low.
  • Few-shot calibration: for each participant and each k, 20 random draws of k calibration closures; each fitted threshold is evaluated on that participant’s other blocks.

Study B: text entry

The best detector from Study A, with thresholds fixed in advance from the Study A distributions. Fifteen short phrases from the MacKenzie and Soukoreff (2003) set, in three blocks of five, with a Morse reference card on screen.

  • Entry rate in characters per minute (WPM = CPM / 5).
  • Character error rate from the minimum string distance, corrected and uncorrected.
  • Closures per character, including deletions.
  • Raw NASA-TLX workload after each block.

Results

Loading results…

Duration explorer

How long eyes stay closed, by labelled type. Drag the two threshold lines, or focus one and use the arrow keys, to see what each choice of bands would do.

False triggers while reading
–
Deliberate closures rejected
–
Dots read as dashes
–
Dashes read as dots
–

Show the data as a table

Detector comparison

Mean across participants with 95% interval; faint dots are individual participants (shown where per-participant values exist).

Show the data as a table

Few-shot calibration

Event F1 against the number of calibration closures k (k = 0 is the fixed threshold). Each point averages 20 random draws per participant. This mirrors the label-budget curves of FewGaze: how much does each extra example from a new person buy?

Show the data as a table

Text entry by practice block

Characters per minute and uncorrected error rate in each of the three blocks; one faint line per participant, the mean with its 95% interval in bold.

Show the data as a table

Frame rate and timing

Mean duration error per participant against the measured frame rate. The dashed curve is one frame interval (1000 / fps): no detector can time a closure more finely than the camera delivers frames.

Show the data as a table

Limitations and threats to validity

Participants are able-bodied adult volunteers. The system has not been tested with people with motor impairments, and no clinical claim is made.

  • Small N. About ten participants; confidence intervals are wide and tests have low power.
  • Experimenter is the labeller. The same person runs the sessions and labels the data, which risks labeller bias; self-agreement κ addresses this only in part.
  • Convenience sample. Mostly friends and classmates.
  • Few devices. One or two camera models.
  • Cued closures. Deliberate blinks are made on cue, not from a natural intent to write.
  • Lab task. The reading task is an in-the-lab stand-in for everyday use.

Paper

Short paper (ACM format, 4–6 pages) · in preparation

Abstract

In preparation. The abstract will be added when the paper draft exists; every number in it will be generated from the logged data by the analysis scripts.

Read the draft (PDF)

A working draft: it shows the paper’s planned structure, figures and tables. The text is still being written, and every figure and table currently uses synthetic test data.

Data: features-only dataset and datasheet · Code: github.com/1sakshm/MorsEye

Cite (draft)

@misc{sharma2026morseye,
  title  = {Telling Deliberate from Spontaneous Blinks on a Webcam:
            Few-Shot Calibration for Blink-Based Morse Text Entry},
  author = {Sharma, Saksham},
  year   = {2026},
  note   = {DRAFT entry: paper in preparation, details will change},
  url    = {https://github.com/1sakshm/MorsEye}
}