vision-gesture-control
by 1nc0gn30
README.md
<div align="center">
# ποΈ Vision Gesture Control
### Ultra-Low-Latency Touchless Computer Vision, Gesture Recognition & Model Context Protocol (MCP) Engine
[](https://github.com/google/vision-gesture-control/actions/workflows/ci.yml)
[](https://www.python.org/)
[](https://github.com/google/vision-gesture-control)
[](https://modelcontextprotocol.io/)
[](LICENSE)
[**Live Web Studio**](public/index.html) β’ [**Gesture Math Guide**](docs/GESTURE_RECOGNITION_GUIDE.md) β’ [**MCP Integration Guide**](docs/MCP_GUIDE.md) β’ [**Privacy & Security**](docs/CAMERA_SECURITY_PRIVACY.md) β’ [**Examples**](examples/README.md)
</div>
---
## π Overview
**Vision Gesture Control** is an enterprise-grade, privacy-first computer vision framework designed for real-time human-computer interaction, touchless UI navigation, 3D air drawing, and seamless Model Context Protocol (MCP) connectivity with autonomous AI agents (Claude Desktop, Cursor, Cline, Zed, and custom LLM tool loops).
Operating with **sub-15ms pipeline latency** and zero external tracking dependencies, Vision Gesture Control processes all video frames locally in volatile memory, extracting 21 three-dimensional hand landmarks and facial telemetry metrics (EAR/MAR) without persisting or transmitting raw video frames.
---
## π Key Features
- β‘ **Sub-15ms Latency Engine**: Real-time landmark extraction with 1β¬ (OneEuro) and Kalman adaptive smoothing filters.
- ποΈ **21-Joint 3D Hand Tracking**: Complete kinematic joint topology with trigonometric joint angle calculations.
- π€ **Native Model Context Protocol (MCP)**: Turn your physical gestures into AI agent tool invocations with zero setup.
- π¨ **Google Material 3 Web Studio**: Clean, responsive, offline-first light mode UI with 4 interactive workspaces.
- π **Touchless Presentation Controller**: Hands-free slide deck navigation with index finger laser pointer and dwell actions.
- ποΈ **Spatial Air-Drawing Canvas**: Smooth 3D finger painting, color palette selection, and PNG export.
- π **100% Local-First Privacy**: Frames are processed purely in-memory and discarded immediately; zero cloud exfiltration.
- π§ͺ **15-Job CI Matrix Tested**: Verified on Ubuntu, macOS, and Windows across Python 3.9, 3.10, 3.11, 3.12, and 3.13.
---
## ποΈ Architecture
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Webcam / Video Device Feed β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β 640x480 @ 60 FPS (In-Memory)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Landmark Extraction Engine β
β (21 3D Spatial Joints + Face Mesh) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
ββββββββββββββββ΄βββββββββββββββ
βΌ βΌ
βββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
β Vector Geometry Engine β β 1β¬ Adaptive Jitter Filterβ
β (Angles, Distance, Normals) β β (Velocity-based smoothing)β
βββββββββββββββββ¬ββββββββββββββββ βββββββββββββ¬ββββββββββββββββ
β β
ββββββββββββββββ¬βββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Gesture State Machine Engine β
β (Open Palm, Pinch, Point, Victory, Fist, Swipe, Dwell) β
βββββββββββββββββ¬ββββββββββββββββββββββββββββββ¬ββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
β Interactive Web Studio β β MCP Server for AI Agents β
β β’ Presentation Controller β β β’ Claude Desktop β
β β’ Air Drawing Canvas β β β’ Cursor / Cline / Zed β
β β’ Visual Filters/Telemetry β β β’ Autonomous Tool Loops β
βββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
```
---
## β‘ Quick Start
### 1. Installation
```bash
# Clone the repository
git clone https://github.com/google/vision-gesture-control.git
cd vision-gesture-control
# Install with pip
pip install -e .
```
### 2. Launch Google Vision Studio (Web UI)
Open `public/index.html` in any modern web browser or serve it locally:
```bash
python3 -m http.server 8000 --directory public
```
Navigate to `http://localhost:8000` to access the interactive 4-tab Google Vision Studio!
---
## π€ Model Context Protocol (MCP) Integration
Integrate Vision Gesture Control with Claude Desktop, Cursor, Cline, or Zed in seconds!
### Claude Desktop Configuration
Add the following to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"vision-gesture-control": {
"command": "python",
"args": ["-m", "vision_gesture_control.mcp"]
}
}
}
```
### Supported MCP Tools:
| Tool Name | Description |
| :--- | :--- |
| `get_active_gesture` | Returns the currently recognized gesture, confidence, and handedness |
| `get_hand_landmarks` | Returns normalized 3D coordinates $(X, Y, Z)$ for all 21 hand joints |
| `trigger_key_event` | Injects virtual key presses (`ArrowRight`, `ArrowLeft`, `Space`, etc.) |
| `capture_frame_telemetry`| Returns Eye Aspect Ratio (EAR), Mouth Aspect Ratio (MAR), and FPS |
| `adjust_sensitivity` | Dynamically updates detection thresholds, dwell timers, and smoothing |
| `get_system_health` | Performs health diagnostics on camera connectivity and pipeline latency |
---
## π Python API Usage
```python
from vision_gesture_control.engine import GestureEngine
# Initialize the real-time gesture engine
engine = GestureEngine(camera_index=0, smoothing_factor=0.6)
# Register a custom callback for swipe events
@engine.on("SWIPE_RIGHT")
def handle_swipe_right(event):
print(f"π Swiped Right with confidence {event.confidence:.2f}!")
# Start the non-blocking background tracking loop
engine.start()
```
---
## π Repository Structure
```
vision-gesture-control/
βββ .github/
β βββ workflows/
β βββ ci.yml # 15-job cross-platform CI matrix
β βββ release.yml # Wheel packaging, checksums & GitHub release
βββ docs/
β βββ GESTURE_RECOGNITION_GUIDE.md # Landmark math, vector geometry & smoothing
β βββ MCP_GUIDE.md # MCP server & client integration specification
β βββ CAMERA_SECURITY_PRIVACY.md # Local-first in-memory privacy & GDPR compliance
βββ examples/
β βββ presentation-controller/ # Touchless slide deck web application
β βββ air-drawing-app/ # 3D spatial air painting canvas
β βββ mcp-clients/ # Client config JSONs for Claude, Cursor, Cline, Zed
β βββ README.md # Examples directory guide
βββ public/
β βββ index.html # Google Vision Studio (Material 3 Light UI)
βββ src/
β βββ vision_gesture_control/ # Core Python package & MCP server
βββ tests/
β βββ test_examples.py # Comprehensive unit & integration test suite
βββ README.md # This master documentation
```
---
## π§ͺ Running Tests
Run the complete test suite locally with `pytest`:
```bash
PYTHONPATH=src pytest tests/test_examples.py -v
```
---
## π Security & Privacy
Vision Gesture Control strictly adheres to **Zero-Knowledge Local Processing**:
- No video frames are ever recorded to persistent storage.
- No network connections are initiated unless explicitly configured by the user.
- Biometric landmarks are computed ephemerally in RAM and wiped upon stream close.
See [docs/CAMERA_SECURITY_PRIVACY.md](docs/CAMERA_SECURITY_PRIVACY.md) for full compliance audits.
---
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues