Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👁️ Eye-Tracker

Hands-free computer control through eye-blink detection.

Python OpenCV dlib License

An assistive-technology experiment — interact with a computer using only your eyes.


Why

Some people can't use a mouse or keyboard. Eye-Tracker turns a plain webcam into an input device: it watches your eyes in real time and converts deliberate blinks into clicks and key presses — no hardware beyond the camera you already have. It grew out of my work on Vision Voice Assist, where accessibility is the whole point.

How it works

It runs dlib's 68-point facial-landmark detector on each frame, isolates the six landmarks around each eye, and computes the Eye Aspect Ratio (EAR) — a value that drops sharply when the eye closes:

        ‖p2 - p6‖ + ‖p3 - p5‖
EAR =  ───────────────────────
            2 · ‖p1 - p4‖

When the EAR stays below a threshold for a few frames, that's a blink. Blink timing is then mapped to actions:

Gesture Action
👁️ single deliberate blink left mouse click
👁️👁️ quick double blink Enter key
EAR / blink count overlay live on-screen feedback

Install

pip install -r requirements.txt
# download dlib's landmark model (once):
#   http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2

Usage

# full mode (sends real clicks / Enter)
python eye_tracker.py --predictor shape_predictor_68_face_landmarks.dat

# safe mode — detect & display only, no input sent
python eye_tracker.py --detect-only

# tune sensitivity
python eye_tracker.py --threshold 0.23 --frames 3

Press q in the preview window to quit.

Notes

  • The landmark model (.dat, ~68 MB) and other large binaries are not committed — download them separately (see Install).
  • Blink-to-input is intentionally conservative to avoid accidental clicks; tune --threshold/--frames for your lighting and camera.
  • Gaze-to-cursor movement is on the roadmap.

Roadmap

  • Smooth gaze-based cursor movement with calibration
  • On-screen keyboard mode for full hands-free typing
  • Dwell-click (look-and-hold) as an alternative to blink-click

Əliəsgər Fətullayev (Orest) · 📫 eliesgerfetullayev@gmail.com

Technology should meet people where they are.

About

Hands-free computer control through eye-blink detection (OpenCV + dlib EAR). Assistive-tech experiment.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages