https://github.com/falakrana/virtualmousedetectionusingeyes
Virtual mouse simulator works with your eye. Implemented using opencv, mediapipe and pyautogui.
https://github.com/falakrana/virtualmousedetectionusingeyes
mediapipe opencv-python pyautogui python vitualmouse
Last synced: about 2 months ago
JSON representation
Virtual mouse simulator works with your eye. Implemented using opencv, mediapipe and pyautogui.
- Host: GitHub
- URL: https://github.com/falakrana/virtualmousedetectionusingeyes
- Owner: falakrana
- Created: 2025-04-05T07:34:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T07:39:31.000Z (about 1 year ago)
- Last Synced: 2025-04-05T08:27:28.775Z (about 1 year ago)
- Topics: mediapipe, opencv-python, pyautogui, python, vitualmouse
- Language: Jupyter Notebook
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🖱️ Virtual Mouse using Eye Tracking
A Python-based virtual mouse system that allows users to control their cursor and perform click actions using eye movement and blinking, powered by **OpenCV**, **MediaPipe**, and **PyAutoGUI**.
## 🚀 Features
- Cursor movement using eye gaze (tracked via the right eye).
- Left-click action triggered by blinking (detected via the left eye).
- Basic calibration support (placeholder logic included).
## 🧠 How It Works
- Uses MediaPipe's **Face Mesh** to detect facial landmarks.
- Tracks the **right eye** (landmark 474–478) for cursor control.
- Monitors **left eye** (landmarks 145 and 159) to detect blinking.
- If the eye remains closed beyond a threshold, a click is triggered.
- Smoothing is applied to prevent cursor jitter.
## 🧰 Tech Stack
- [OpenCV](https://opencv.org/) – Real-time computer vision.
- [MediaPipe](https://mediapipe.dev/) – Facial landmark detection.
- [PyAutoGUI](https://pyautogui.readthedocs.io/) – Cursor control and automation.
## 🎮 Controls
- **Move Cursor**: Look around using your right eye.
- **Click**: Blink your left eye (hold it shut briefly).
- **Calibrate**: Press `c` (Currently in development).
- **Quit**: Press `q`.
## 📌 Notes
- Works best in well with one who is not using spectacles.
- Ensure your webcam is unobstructed.
- Try adjusting the blink threshold if false positives occur.
## 👨💻 Author
**Falak Rana**
[LinkedIn]([https://www.linkedin.com/](https://www.linkedin.com/in/falak-rana-125520221/)) • [GitHub](https://github.com/falakrana)