Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖱️ Advanced AI Virtual Mouse

Python Version OpenCV MediaPipe PyAutoGUI License Platform Status Contributions

Transform your webcam into an intelligent touchless mouse controller

FeaturesInstallationUsageTech StackContributing


📖 About The Project

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.

🎯 Project Highlights

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

💡 Use Cases

  • 🎤 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

✨ Features

🖱️ Core Mouse Functions

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

⚡ Advanced System Controls

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

🚀 Installation

Prerequisites

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

Step-by-Step Setup

1. Clone the Repository

git clone https://github.com/MrEinsteinE/AdvancedArtificialIntelligenceVirtualMouse.git
cd AdvancedArtificialIntelligenceVirtualMouse

2. Create Virtual Environment

Windows (PowerShell):

python -m venv venv
.\venv\Scripts\Activate.ps1

macOS/Linux:

python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

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

4. Verify Installation

python -c "import cv2, mediapipe, pyautogui; print('✅ All dependencies installed successfully!')"

💻 Usage

Running the Application

python virtual_mouse.py

Best Practices

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

Controls

  • Exit Application: Press Enter key
  • Reset Position: Open palm gesture

🛠️ Tech Stack

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

📁 Project Structure

AdvancedArtificialIntelligenceVirtualMouse/
│
├── virtual_mouse.py           # Main application
├── requirements.txt            # Dependencies
├── README.md                   # Documentation
├── LICENSE                     # MIT License
└── .gitignore                  # Git ignore rules

🐛 Troubleshooting

Common Issues & Solutions

❌ 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

🤝 Contributing

Contributions make the open-source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


👥 Team

College Team Project


🙏 Acknowledgments


📊 Performance Metrics

  • 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

Report BugRequest Feature

Releases

Packages

Used by

Contributors

Languages