Control your computer mouse using hand gestures powered by Python, OpenCV, and MediaPipe. This project uses real-time webcam input to detect hand landmarks and translate finger movements into mouse actions without requiring a physical mouse.
- 🖐️ Real-time hand tracking using MediaPipe
- 🖱️ Control the mouse cursor using hand movements
- 👆 Gesture-based mouse click detection
- ⚡ Smooth cursor movement
- 📷 Works with a standard webcam
- 💻 Simple Python implementation
- Python 3.8+
- OpenCV
- MediaPipe
- AutoPy
- NumPy
AI-Virtual-Mouse/
│
├── AiVirtualMouseProject.py
├── HandTrackingModule.py
├── Output/
├── README.md
└── LICENSE.md
git clone https://github.com/Ruban-Edward/AI-Virtual-Mouse.git
cd AI-Virtual-MouseDownload and install Python 3.8 or later
https://www.python.org/downloads/
pip install opencv-python mediapipe autopy numpyRun the main file:
python AiVirtualMouseProject.pyMake sure your webcam is connected and accessible.
| Gesture | Action |
|---|---|
| ☝️ Index Finger Up | Move Cursor |
| 👍 Thumbs up | Select / Click |
| ✋ Hand Tracking | Detects hand landmarks in real time |
Gesture behavior may vary depending on your implementation.
- Captures live video from the webcam.
- Detects hand landmarks using MediaPipe.
- Tracks fingertip positions.
- Maps hand movement to screen coordinates.
- Controls the system mouse using AutoPy.
- Recognizes gestures to perform mouse actions.
Install the required libraries:
pip install opencv-python
pip install mediapipe
pip install autopy
pip install numpyContributions are welcome!
- Fork this repository
- Create a feature branch
git checkout -b feature-name- Commit your changes
git commit -m "Add new feature"- Push to your branch
git push origin feature-name- Open a Pull Request
Ruban Edward
GitHub: https://github.com/Ruban-Edward
This project is licensed under the MIT License.
See the LICENSE.md file for more information.
If you found this project useful, consider giving it a ⭐ on GitHub!


