AI Virtual Mouse is an innovative, AI-driven virtual mouse system developed to enhance Human-Computer Interaction (HCI) through a touch-free and hygienic interface. It empowers users with mobility impairments and addresses hygiene-critical environments by providing precise cursor control via hand gestures.
-
Real-time Hand Tracking & Gesture Recognition
- Uses MediaPipe and OpenCV for robust hand landmark detection.
- Precise gesture recognition for intuitive cursor control and clicking actions.
-
Seamless Cursor Control
- Smooth, low-latency tracking with FPS optimization for real-time performance.
- Cursor movement smoothed by interpolation for fluid user experience.
-
Accessibility-Focused Design
- Predicted to benefit over 15% of users with physical disabilities.
- Offers a safer, contact-free alternative addressing hygiene concerns.
-
Scalable & Optimized Architecture
- Modular structure for ease of maintenance and extensibility.
- Efficient video frame processing to avoid performance bottlenecks.
- Python 3.8+
- Required Python packages:
opencv-python
mediapipe
numpy
pyautogui
-
Clone the repository or download the project files.
-
Navigate to the
VirtualMouse
directory. -
Install dependencies using pip:
pip install opencv-python mediapipe numpy pyautogui
Run the AI Virtual Mouse script
python AIVirtualMouse.py
Use your webcam to control the mouse cursor with your hand:
- Index finger raised to move the cursor.
- Index and middle fingers raised and pinched to perform a click.
- Python (main programming language)
- OpenCV (computer vision library)
- MediaPipe (hand tracking and gesture recognition)
- NumPy (numerical operations)
- PyAutoGUI (automating GUI interactions)
- Git & GitHub (version control)
- Virtual Environment (dependency isolation)
├── VirtualMouse/ # Main directory for the AI Virtual Mouse project
│ ├── AIVirtualMouse.py # Core script for virtual mouse functionality
│ ├── HandTrackingModule.py # Module for hand tracking and gesture recognition
│ ├── __pycache__/ # Compiled Python files
│ ├── .idea/ # IDE configuration files
│ ├── .gitignore # Files to ignore in version control
│ └── README.md # Project documentation
│
├── ImageProcessing/ # Supporting image processing related code
│ └── HandTrackingMin.py # Basic hand tracking functionality
│
├── pythonProject/ # Miscellaneous project scripts and tests
│ └── main.py # Sample entry point for testing
│
└── requirements.txt # List of dependencies for the project
- Video Capture: Utilizes OpenCV for continuous webcam feed.
- Hand Detection: MediaPipe processes frames to detect and locate hand landmarks.
- Gesture Logic: Customized algorithms interpret finger states to control mouse actions.
- Cursor Control: Coordinates are smoothed and mapped to screen dimensions with NumPy.
- User Feedback: Real-time FPS displayed on screen for performance insight.