AirTouch is a sophisticated, native macOS menu bar application that transforms your hand into a high-precision neural interface. 🧠✨
By bridging a robust Swift IP (Interface Presentation) layer with a state-of-the-art Python Inference Engine, AirTouch delivers a Vision Pro-like interaction paradigm directly to your Mac. We leverage Google MediaPipe for sub-millisecond hand landmark detection and advanced Kalman Filtering for butter-smooth cursor control. 🧈🚀
- ✨ Features
- 🤖 Interaction Engine
- 🏗️ Architecture
- 📦 Requirements
- 🚀 Installation
- 🕹️ Usage
- 🤝 Contributing
- 📄 License
- High-Fidelity Cursor Control 👆 - Sub-pixel precision using weighted landmark fusion.
- Smart Gestures 🤏 - Intuitive Pinch-to-Click and Hold-to-Drag mechanics.
- Native Integration 🖥️ - Lives quietly in your menu bar with full Apple Security compliance.
- Performance First ⚡️ - 60+ FPS tracking pipeline optimized for Apple Silicon.
- Privacy by Design 🔒 - 100% on-device inference. No video data ever leaves your machine.
- Advanced Neural Controls:
- Right Click ✌️ - Pinch with middle finger.
- Spatial Swipe 🖖 - Swift hand movements to switch Desktop Spaces.
- Virtual Volume Dial 🔊 - Rotary hand gesture for precise audio control.
- Media Skip ⏭️ - Thumb flick gesture for track control.
AirTouch isn't just a wrapper; it's a carefully tuned Intent Engine. We mitigate the inherent jitter of computer vision using a dual-stage Kalman Filter, ensuring the cursor feels like a natural extension of your body, not a jittery pointer. 📉✨
# 🧠 The engine intelligently blends landmarks for biomechanical stability
INDEX_LANDMARKS = [5, 6, 7, 8] # MCP, PIP, DIP, TIP
INDEX_WEIGHTS = [0.15, 0.25, 0.25, 0.35] # Weighted for fingertip precision
# 🎛️ Kalman Filter Configuration (Tuned for "Vision Pro" feel)
KF_PROCESS_NOISE = 1e-5 # High trust in model physics for smoothness
KF_MEASUREMENT_NOISE = 1e-4 # Aggressive filtering of camera sensor noise
KF_PREDICTION_TIME = 0.040 # 40ms look-ahead neural latency compensationWe employ a Hybrid Microservices Architecture to maximize performance and native OS integration:
- Swift (AppKit/SwiftUI) 🍎: Orchestrates the macOS UI, manages System Permissions (Accessibility, Camera), and handles the process lifecycle.
- Python (OpenCV/MediaPipe) 🐍: Executes the heavy-duty Computer Vision pipeline, landmark extraction, and heuristic gesture logic.
The two systems communicate via optimized Standard I/O Pipes, ensuring a clean separation of concerns and crash resilience. 🛡️
| Platform | Minimum Version | Core Stack / Dependencies |
|---|---|---|
| macOS | 14.0+ (Sonoma) | SwiftUI, AppKit, ApplicationServices |
| Python | 3.9 - 3.12 | opencv-python (4.13+), mediapipe (0.10+), pynput (1.8+) |
git clone https://github.com/AlphsX/AirTouch.git
cd airtouchAirTouch requires specific CV and ML libraries. We recommend a virtual environment.
pip install -r requirements.txtNote: Ensure
python3is in your$PATH. The Swift app auto-detects your Python runtime. 🕵️♂️
- Open
AirTouchApp/AirTouchApp.xcodeproj. - check Signing & Capabilities to ensure you have a valid Team selected.
- Build and Run (CMD+R).
Once launched, look for the magical hand icon ✋ in your menu bar.
- Enable AirTouch via the dropdown menu. ✅
- Grant Accessibility Permissions (Required for cursor injection). 🔓
- Grant Camera Permissions (Required for vision pipeline). 📷
- Navigation: Raise hand & move Index Finger 👆
- Left Click: Pinch Index & Thumb 🤏
- Drag: Pinch, Hold & Move 🤏➡️
- Right Click: Pinch Middle Finger & Thumb 🖕 (Kindly!)
- Spaces: Quick Swipe Left/Right 👋
- Volume: Rotate hand like a physical dial 🎛️
We welcome fellow engineers! If you have ideas for optimization or new gesture heuristics:
- Fork the Project 🍴
- Create your Feature Branch (
git checkout -b feature/NeuralNetUpgrade) - Commit your Changes (
git commit -m 'Add: Next-gen gesture recognition') - Push to the Branch (
git push origin feature/NeuralNetUpgrade) - Open a Pull Request 📩
Distributed under the MIT License. See LICENSE for more information.