Transform your webcam into an intelligent touchless mouse controller
Features • Installation • Usage • Tech Stack • Contributing
Advanced AI Virtual Mouse is a cutting-edge computer vision application that revolutionizes human-computer interaction by enabling complete touchless control through intuitive hand gestures. Powered by Google's MediaPipe for real-time hand tracking and OpenCV for robust image processing, this project demonstrates the practical application of artificial intelligence in creating accessible and hygienic computing interfaces.
This college team project showcases:
- Real-time hand tracking using state-of-the-art ML models
- 11+ gesture commands for comprehensive mouse and system control
- Low latency performance with 30-60 FPS on standard hardware
- Cross-platform compatibility for Windows, macOS, and Linux
- Intuitive gesture design requiring minimal learning curve
- 🎤 Presentations: Control slides without touching devices
- ♿ Accessibility: Hands-free computing for users with mobility limitations
- 🧪 Clean Environments: Labs and medical facilities requiring hygiene
- 🎮 Gaming & Entertainment: Immersive gesture-based interactions
- 👨💼 Professional Demos: Showcase futuristic interaction methods
| Gesture | Description | Action |
|---|---|---|
| 🤚 Palm Open | Rest position | Pause cursor movement |
| ✌️ V-Gesture | Index + middle fingers extended | Move cursor |
| 👇 Index Down | Index down, middle up | Left click |
| ☝️ Middle Down | Index up, middle down | Right click |
| 🤜 Fist (Grab) | Closed fist | Drag & multi-select |
| 🤏 Two Fingers Join | Index + middle together | Double click |
| 👌 Pinch Gesture | Pinch fingers | Zoom in/out |
| 👇👇 Two Down | Both index + middle down | Drag and drop |
| Hand | Gesture | Direction | Function |
|---|---|---|---|
| 🫲 Left | Pinch | Up/Down | Scroll vertically |
| 🫲 Left | Pinch | Left/Right | Scroll horizontally |
| 🫱 Right | Pinch | Up/Down | Adjust brightness |
| 🫱 Right | Pinch | Left/Right | Control volume |
Before you begin, ensure you have:
- Python 3.10, 3.11, or 3.12 installed (Download here)
⚠️ Python 3.13+ not supported (MediaPipe limitation)
- Webcam (built-in or USB)
- Windows OS recommended for full system control features
git clone https://github.com/MrEinsteinE/AdvancedArtificialIntelligenceVirtualMouse.git
cd AdvancedArtificialIntelligenceVirtualMouse
Windows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1
macOS/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
requirements.txt:
numpy==1.26.4
opencv-python==4.9.0.80
mediapipe==0.10.9
pyautogui==0.9.54
comtypes==1.4.8
pycaw==20181226
screen-brightness-control==0.22.0
python -c "import cv2, mediapipe, pyautogui; print('✅ All dependencies installed successfully!')"
python virtual_mouse.py
✅ DO:
- Use in well-lit environments
- Keep hand 30-50cm from camera
- Use plain backgrounds
- Make clear, deliberate gestures
- Maintain steady hand positions
❌ DON'T:
- Work in dim lighting
- Move hands too quickly
- Use cluttered backgrounds
- Position hand too close/far
- Exit Application: Press
Enterkey - Reset Position: Open palm gesture
| Technology | Purpose | Version |
|---|---|---|
| Python | Core programming language | 3.10-3.12 |
| OpenCV | Computer vision & image processing | 4.9.0.80 |
| MediaPipe | Hand landmark detection & tracking | 0.10.9 |
| PyAutoGUI | Mouse & keyboard automation | 0.9.54 |
| NumPy | Numerical computations | 1.26.4 |
| Pycaw | Windows audio control | 20181226 |
| SBC | Screen brightness management | 0.22.0 |
| Comtypes | Windows COM interface | 1.4.8 |
AdvancedArtificialIntelligenceVirtualMouse/
│
├── virtual_mouse.py # Main application
├── requirements.txt # Dependencies
├── README.md # Documentation
├── LICENSE # MIT License
└── .gitignore # Git ignore rules
❌ Camera Not Detected
# Try different camera index
cap = cv2.VideoCapture(1) # or 2, 3, etc.
❌ NumPy Compatibility Error
pip uninstall numpy
pip install numpy==1.26.4
❌ MediaPipe Installation Failed
- Verify Python version:
python --version - Must be 3.10, 3.11, or 3.12
- Reinstall with:
pip install mediapipe==0.10.9
❌ Brightness/Volume Not Working
- Windows: Run as Administrator
- Linux: Install
brightnessctl - macOS: Limited support
Contributions make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
College Team Project
- Einstein Ellandala - Project Lead
- Bhanu Prakash
- Kalyan
- Google MediaPipe - Hand tracking solution
- OpenCV - Computer vision library
- PyAutoGUI - Automation framework
- FPS: 30-60 (hardware dependent)
- Latency: <50ms gesture recognition
- CPU Usage: 15-25% (modern processors)
- RAM Usage: ~200MB
⭐ Star this repo if you find it useful! ⭐
Made with ❤️ by the Advanced AI Virtual Mouse Team