A futuristic AI-powered desktop controller that allows you to manage system volume, screen brightness, and act as a virtual mouse using real-time hand gestures. Built with Python, OpenCV, and MediaPipe.
- Multi-Mode System: Seamlessly switch between different control modes using keyboard triggers.
- 🔊 Volume Control (Mode
V): Adjust system volume by pinching your thumb and index finger. - ☀️ Brightness Control (Mode
B): Control screen brightness with the same intuitive pinch gesture. - 🖱️ Virtual Mouse (Mode
M): Move your cursor using your index finger and click by pinching. - 📸 Quick Screenshot: Press
Sto take an instant screen capture of your workspace. - Interactive UI: Real-time visual feedback, FPS counter, and mode indicators drawn directly on the webcam feed.
- Python 3.x
- OpenCV (
cv2) - Computer vision and webcam frame processing - MediaPipe - Real-time advanced hand tracking and landmark detection
- Pycaw & Comtypes - Windows system audio manipulation
- Screen-Brightness-Control - Multi-monitor brightness adjustment
- PyAutoGUI - Virtual mouse movement and automated clicks
- NumPy & Math - Coordinate interpolation and distance calculation
gesture-control-ai/
│
├── main.py # Main application loop and mode logic
├── hand_tracker.py # MediaPipe hand tracking module
├── volume_controller.py # Pycaw volume integration
├── brightness_control.py # System brightness integration
├── virtual_mouse.py # PyAutoGUI mouse mapping
├── gesture_actions.py # Quick actions (screenshots, etc.)
├── requirements.txt # Dependencies
└── README.md
-
Clone this repository:
git clone https://github.com/YOUR_USERNAME/gesture-control-ai.git cd gesture-control-ai -
Create and activate a virtual environment (optional but recommended):
python -m venv venv # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the main script:
python main.py
-
Make sure your hand is visible to the webcam.
-
Press the following keys to change modes:
V- Switch to Volume ModeB- Switch to Brightness ModeM- Switch to Virtual Mouse ModeS- Take a ScreenshotQ- Quit the application