Loading repository data…
Loading repository data…
ImaginationGod / repository
An intelligent eye-controlled cursor system built using Python, OpenCV, and MediaPipe Face Landmarker Task API. This project enables hands-free computer interaction using real-time facial landmark tracking, blink detection, gaze-based cursor movement, and scrolling zones — all using a standard laptop webcam without specialized hardware.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An intelligent, webcam-based eye-controlled cursor system that enables hands-free computer interaction using real-time facial landmark tracking, blink detection, and gaze-based interaction zones.
This project demonstrates how modern computer vision techniques can be used to build accessible and low-cost human-computer interaction systems without requiring expensive eye-tracking hardware.
Built using Python, OpenCV, and MediaPipe Face Landmarker Task API, the system transforms a standard laptop webcam into a functional eye-tracking interface capable of:
Read the full project post on LinkedIn:
Traditional eye-tracking systems often require:
This project aims to provide a hardware-efficient and accessible alternative that works using only a standard laptop webcam.
Potential applications include:
Tracks facial landmarks and maps eye/head movement to screen coordinates.
Moves the system cursor using gaze/head tracking with configurable:
Detects eye blinks using Eye Aspect Ratio (EAR) calculations.
Supports:
Custom gaze-controlled zones enable scrolling without touching the mouse or keyboard.
Allows users to temporarily disable clicking while still moving the cursor freely.
Useful for:
Visual overlays include:
All major parameters can be customized from a single settings file.
Examples:
CURSOR_SENSITIVITY
SMOOTHING
BLINK_THRESHOLD
BLINK_FRAMES
SCROLL_SPEED
ZONE_WIDTH
ZONE_HEIGHT
flowchart TD
A[Webcam Feed] --> B[MediaPipe Face Landmark Detection]
B --> C[Eye & Head Tracking]
C --> D[Cursor Mapping Engine]
D --> E[Cursor Movement]
D --> F[Blink Detection]
D --> G[Interaction Zones]
F --> H[Mouse Click]
G --> I[Scroll System]
G --> J[Click Lock / Unlock]
E --> K[System Cursor Control]
I --> K
H --> K
J --> K
.
├── config
│ └── settings.py
├── core
│ ├── blink_detector.py
│ ├── calibration.py
│ ├── camera.py
│ ├── cursor_controller.py
│ ├── eye_tracker.py
│ ├── face_mesh.py
│ └── interaction_zones.py
├── models
│ └── face_landmarker.task
├── ui
│ ├── calibration_screen.py
│ ├── overlay.py
│ ├── zones_overlay.py
│ └── debug_overlay.py
├── utils
│ ├── drawing_utils.py
│ ├── fps_counter.py
│ └── math_utils.py
├── main.py
├── requirements.txt
└── README.md
git clone https://github.com/your-username/eye-controlled-cursor.git
cd eye-controlled-cursor
pip install -r requirements.txt
Or manually:
pip install opencv-python mediapipe pyautogui numpy pygetwindow
python main.py
Press:
ESC
to exit the application.
All major system parameters are configurable from:
config/settings.py
Example:
# Cursor Movement
CURSOR_SENSITIVITY = 1.5
SMOOTHING = 5
# Blink Detection
BLINK_THRESHOLD = 0.21
BLINK_FRAMES = 2
# Interaction Zones
REST_ZONE_DWELL_TIME = 1.2
SCROLL_ZONE_DWELL_TIME = 0.8
# Scroll
SCROLL_SPEED = 3
# Zone Dimensions
ZONE_WIDTH = 120
ZONE_HEIGHT = 300
The project uses Eye Aspect Ratio (EAR) to detect blinks.
EAR = (vertical_distance_1 + vertical_distance_2) / (2 * horizontal_distance)
When eyes close:
The left edge of the screen acts as a scroll activation zone.
Upper half:
Lower half:
The right edge of the screen acts as a click toggle zone.
flowchart LR
A[Webcam Input]
--> B[Face Landmark Detection]
--> C[Eye Tracking]
--> D[Gaze Mapping]
--> E[Cursor Smoothing]
--> F[Mouse Actions]
F --> G[Move Cursor]
F --> H[Blink Click]
F --> I[Scroll Zones]
This project is also being explored from a research and accessibility perspective.
Some of the major engineering challenges included:
This project demonstrates concepts from:
Built by Harsh Tripathi in collaboration with Iqra Tabassum.
Special thanks to the open-source tools and libraries that made this project possible:
Consider giving the repository a star ⭐
It helps support future improvements and accessibility-focused innovation.