https://github.com/sakshikanade31/mouse-tracking-using-eyeballs
Mouse Tracking using Eyeballs is a Python-based project that allows users to control their mouse cursor using only eye movement and blinks. It uses MediaPipe FaceMesh to track facial landmarks and PyAutoGUI for cursor control, making it an accessible, hands-free alternative to traditional input devices.
https://github.com/sakshikanade31/mouse-tracking-using-eyeballs
blinkdetection computervision eyeballtracking facemesh handsfreeinterface humancomputerinteraction mediapipe mousecontrol opencv pyautogui python
Last synced: about 1 month ago
JSON representation
Mouse Tracking using Eyeballs is a Python-based project that allows users to control their mouse cursor using only eye movement and blinks. It uses MediaPipe FaceMesh to track facial landmarks and PyAutoGUI for cursor control, making it an accessible, hands-free alternative to traditional input devices.
- Host: GitHub
- URL: https://github.com/sakshikanade31/mouse-tracking-using-eyeballs
- Owner: Sakshikanade31
- Created: 2025-05-27T08:55:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-28T14:33:00.000Z (about 1 year ago)
- Last Synced: 2025-06-17T08:07:29.805Z (12 months ago)
- Topics: blinkdetection, computervision, eyeballtracking, facemesh, handsfreeinterface, humancomputerinteraction, mediapipe, mousecontrol, opencv, pyautogui, python
- Language: Python
- Homepage: https://github.com/Sakshikanade31/Mouse-Tracking-using-Eyeballs
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mouse-Tracking-using-Eyeballs
Control your mouse cursor using just your eyes and blinks — no hands needed! This project uses MediaPipe and FaceMesh to track eye landmarks and PyAutoGUI to move the mouse and simulate clicks.
# Purpose
This project aims to:
1. Enable hands-free mouse control for accessibility and convenience.
2. Provide left-click functionality via blink detection.
3. Serve as a base for gesture-based human-computer interaction systems.
# How It Works
1. MediaPipe FaceMesh detects 468 facial landmarks.
2. The iris movement is tracked to move the mouse pointer on screen.
3. Left eye blink is detected by measuring the distance between eyelid landmarks (145 & 159).
4. A calibration phase in the first few seconds determines your eye-open distance, improving accuracy.
5. Mouse movement is smoothed to reduce jitter.
# Requirements
1. Make sure you have Python 3.x installed, then run:
pip install opencv-python mediapipe pyautogui
2. Download and Run the main Python script ie mouse_tracking_using_eyeball.py :
python mouse_tracking_using_eyeball.py
3. Follow the instructions:
a. Keep your eyes open during the first few seconds (for calibration).
b. Move your eyes to control the cursor.
c. Blink your left eye to perform a mouse click.
# Advantages
1. Accessible for users with physical disabilities.
2. Hardware-free — uses just your webcam.
3. Custom calibration adapts to each user.
4. Extensible — easily add gestures or voice commands.
# Future Improvements
1. Right-eye blink for right-click.
2. Eye-based scrolling or drag-and-drop.
3. Gesture-based UI for menu navigation.
4. On-screen overlay for gaze zones.
5. Voice or sound feedback.