Skip to content

MrEinsteinE/AdvancedArtificialIntelligenceVirtualMouse

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

Features โ€ข Installation โ€ข Usage โ€ข Tech Stack โ€ข Contributing


๐Ÿ“– 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 Bug โ€ข Request Feature

About

AI-powered virtual mouse using computer vision and hand gesture recognition

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages