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