██████╗ ███████╗██╗ ██╗████████╗██████╗ █████╗
██╔══██╗██╔════╝╚██╗██╔╝╚══██╔══╝██╔══██╗██╔══██╗
██║ ██║█████╗ ╚███╔╝ ██║ ██████╔╝███████║
██║ ██║██╔══╝ ██╔██╗ ██║ ██╔══██╗██╔══██║
██████╔╝███████╗██╔╝ ██╗ ██║ ██║ ██║██║ ██║
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝
Control Without Contact · Gesture-Driven Computing, Reimagined
Powered by MediaPipe · OpenCV · PyAutoGUI · Python · React · Hugging Face
- Executive Summary & Concept
- Problem Statement
- Developer Story & Team Assignments
- System Architecture & Data Flow
- Folder & Component Structure
- Core Gesture Engine & Gesture Catalog
- Voice Command Engine & Command Catalog
- Settings GUI & Gesture Trainer
- API & WebSocket Specifications
- Configuration Schema
- System Requirements
- Installation & Deployment
- Verification & Testing
- Challenges, Mitigations & Future Roadmap
- Development Roadmap (14-Day Timeline)
- Contributors & Licensing
DEXTRA is a software solution that replaces the conventional computer mouse with real-time hand gesture recognition via a standard webcam. Using Google's MediaPipe framework for hand landmark detection, DEXTRA maps natural hand gestures to every standard mouse operation — including cursor movement, left and right clicking, double-clicking, drag-and-drop, and scrolling — without requiring specialized hardware depth cameras.
DEXTRA is further enhanced by:
- Voice Command Engine: 40+ spoken commands across 6 categories powered by local Hugging Face transformer models (
openai/whisper-tiny). - Settings GUI: A browser-based React SPA local control panel served by FastAPI.
- Gesture Trainer Module: Allows users to record, name, and assign custom hand poses to OS shortcuts.
Key Value: DEXTRA delivers a fully mouse-free computing experience using 22 hand gestures, 40+ voice commands, and a standard laptop webcam — no specialized hardware required.
The physical mouse has remained the dominant pointing device for over four decades. While reliable, it presents barriers in several real-world scenarios:
- Accessibility: Users with limited hand mobility or physical disabilities struggle with precise physical mouse control.
- Hygiene-Sensitive Environments: Medical, cleanroom, and laboratory settings require touchless interaction with computer systems.
- Space Constraints: Mobile workers and students in crowded environments often lack a flat physical surface for mouse operation.
- AR/VR & Kiosk Environments: Emerging interfaces have no surface on which a physical mouse can operate.
- Fatigue & RSI: Prolonged mouse use contributes to Repetitive Strain Injury.
DEXTRA addresses all five scenarios simultaneously by providing a hygienic, natural, and hardware-free input alternative.
| Team Member | Role / Focus Area | Assigned Modules | Key Responsibilities |
|---|---|---|---|
| Harihar R (@HARIHAR1406) | System Ideator | System Concept & Architecture | Conceived initial vision and conceptual design for gesture-driven touchless computing. |
| Mohamed Salman P (@Salman4256) | Core Gesture & Tracking Engine Lead | python/camera.pypython/gesture_engine.pypython/gesture_mapping.py |
Video capture, MediaPipe 21 landmark detection, smoothing filter, PyAutoGUI mouse event binding. |
| Logesh M (@logeshM1) | Voice Command Engine Lead | python/voice_wakeword.pypython/voice_engine.pypython/voice_mapping.py |
Background audio capture, "DEXTRA" wakeword monitor, Hugging Face Whisper ASR transcription, shortcut mapper. |
| Muthamil V (@muthamil13) | FastAPI Backend GUI Server Lead | python/config.pypython/gui_server.pypython/main.py |
File lock thread safety on config JSONs, FastAPI REST & WebSockets JPEG stream, system CLI launcher menu. |
| Godfrey T R (@TheOrionGD) | React Settings & Trainer SPA Lead | Frontend/ React Application |
Vite React SPA layout, WebSocket HTML5 Canvas video feed renderer, voice controller status component, form bindings. |
DEXTRA's architecture separates tasks into distinct background daemon threads. Visual tracking, speech transcription, configuration management, and the API server run concurrently, sharing state via configuration files and thread-safe queues.
+------------------+ +--------------------+ +-------------------+
| Webcam Input | --> | OpenCV/MediaPipe | --> | PyAutoGUI Mouse |
| (30+ FPS Frame) | | Landmark Engine | | Event Execution |
+------------------+ +--------------------+ +-------------------+
^
+------------------+ +--------------------+ |
| Mic Audio | --> | Hugging Face | --------------+
| (Local Stream) | | Whisper STT Engine |
+------------------+ +--------------------+
graph TD
A[Webcam Feed cv2] --> B(python/camera.py)
B --> C(python/gesture_engine.py)
C -->|21 landmarks coordinates| D(python/gesture_mapping.py)
D -->|Coordinate Smoothing| E{PyAutoGUI Event}
F[Mic Stream sounddevice] --> G(python/voice_wakeword.py)
G -->|Trigger: 'DEXTRA'| H(python/voice_engine.py)
H -->|ASR Whisper Transcription| I(python/voice_mapping.py)
I -->|Keyboard Hotkeys| E
J(python/config.py) -->|Thread Lock Settings| K[dextra_settings.json]
K -->|Read Thresholds| D
K -->|Read Wakeword Config| G
L(python/gui_server.py) -->|REST API & WS| M[React Frontend Client]
M -->|GET/POST Settings| L
L -->|Update Settings| J
- Webcam Frame Capture: OpenCV captures a raw BGR frame at 30+ FPS.
- Pre-processing: Frame is mirrored (flipped) and converted to RGB color space.
- Hand Detection: MediaPipe locates 21 3D landmark coordinates on the hand.
- Gesture Logic: Python checks finger extension states and landmark Euclidean distances.
- Coordinate Mapping: NumPy interpolates index finger position to screen resolution.
- Smoothing Filter: Moving average buffer removes hand tremor jitter.
- Mouse Execution: PyAutoGUI issues OS-level pointer or hotkey events.
- UI Overlay: Annotated frame delivery to WebSocket clients at 30 FPS.
Dextra/
├── README.md # Primary documentation & architecture guide
├── LICENSE # MIT open-source license
├── dextra_settings.json # System configurations and thresholds database
├── dextra_custom_gestures.json # Saved custom trained hand poses database
├── requirements.txt # Python dependencies manifest
├── run_dextra.ps1 # PowerShell automated launcher script
├── python/ # Python backend daemon files
│ ├── main.py (CLI launcher interface & menu)
│ ├── config.py (Thread-safe settings manager)
│ ├── camera.py (OpenCV webcam frame capture loop)
│ ├── gesture_engine.py (MediaPipe hand landmarker engine)
│ ├── gesture_mapping.py (PyAutoGUI mouse movements and coordinates filter)
│ ├── voice_wakeword.py (Background audio wakeword monitor)
│ ├── voice_engine.py (Hugging Face speech-to-text pipeline)
│ ├── voice_mapping.py (Shortcut and command execution mapper)
│ └── gui_server.py (FastAPI REST & WebSockets server)
├── Frontend/ # React frontend client
│ ├── package.json # Node package manifest
│ ├── vite.config.js # Vite configuration proxying requests to port 8000
│ ├── index.html # HTML SPA template
│ └── src/ # React components & styles
│ ├── main.jsx # Client entry point
│ ├── App.jsx # Main router navigation wrapper
│ ├── index.css # CSS variables, glassmorphism, and dark theme
│ └── components/ # Modular UI view components
│ ├── Dashboard.jsx (System Overview & status KPIs)
│ ├── Trainer.jsx (Gesture Trainer & canvas recorder)
│ ├── VoiceController.jsx (Voice engine controls & logs)
│ ├── Settings.jsx (Configuration sliders and options)
│ └── CommandPalette.jsx (Searchable command modal)
└── tests/ # Unit & Integration test suites
├── test_api.py (FastAPI REST endpoint tests)
├── test_camera.py (OpenCV capture & setting tests)
├── test_config.py (SettingsManager CRUD & fallback tests)
├── test_gesture_mapping.py (Finger states & posture heuristic tests)
└── test_voice_mapping.py (Command matching & alias tests)
DEXTRA tracks 21 3D coordinates on the hand, using landmark spatial relationships to classify gestures.
8 12 16 20
| | | |
7 11 15 19
4 | | | |
| 6 10 14 18
3 \___|___|___/
\ 5 9 13 17
2 \ | / /
\ \ | / /
1______\|/ /
| /
0__/
| Gesture | Description | Action |
|---|---|---|
| ☝️ Index Finger Up | Only index finger extended, hand moves freely | Move Cursor |
| 🤏 Quick Pinch | Index + thumb touch and release | Left Click |
| 🤏🤏 Double Pinch | Two rapid pinches within 0.35s | Double Click |
| ✊ Hold Pinch + Move | Pinch held >0.6s while moving hand | Drag & Drop |
| 🖕 Middle + Thumb Pinch | Middle finger + thumb touch | Right Click |
| 🤌 Ring + Thumb Pinch | Ring finger + thumb touch | Middle Click |
| 👌 OK Sign | Index + thumb form circle, other fingers extended | Confirm / Enter Key |
| Gesture | Description | Action |
|---|---|---|
| ✌️ Two Fingers Up + Move | Index & middle extended, move up/down | Vertical Scroll |
| ✌️↔ Two Fingers Lateral | Index & middle extended, move left/right | Horizontal Scroll |
| 👋 Wrist Flick Left | Quick leftward wrist snap (index up) | Navigate Back |
| 👋 Wrist Flick Right | Quick rightward wrist snap (index up) | Navigate Forward |
| ☝️⬆ Index Hold Up (1s) | Index up, hand stationary for 1 second | Page Up |
| ☝️⬇ Index Hold Down (1s) | Index down, hand stationary for 1 second | Page Down |
| Gesture | Description | Action |
|---|---|---|
| 🤏➡ Pinch Expand | Thumb & index spread outward rapidly | Zoom In (Ctrl +) |
| 🤏⬅ Pinch Contract | Thumb & index pinch inward rapidly | Zoom Out (Ctrl -) |
| Gesture | Description | Action |
|---|---|---|
| 🖖 V-Spread | Index & middle spread wide apart | Switch Window (Alt+Tab) |
| ✊ Closed Fist (still) | All fingers curled, no movement for 0.5s | Minimize Window |
| 🖐 Four Fingers Up | All fingers except thumb extended | Close Window (Alt+F4) |
| 🤟 Spider-Man Pose | Thumb + index + pinky extended | Open Start Menu |
| Gesture | Description | Action |
|---|---|---|
| ✋ Open Palm | All 5 fingers extended, hand still | Freeze / Rest Mode |
| 🤙 Shaka Sign | Thumb + pinky extended | Toggle Voice Mode |
| 🤞 Crossed Fingers | Index + middle crossed | Lock Screen |
DEXTRA transcribes speech locally using Hugging Face's transformers library (openai/whisper-tiny).
| Category | Commands |
|---|---|
| Editing | "copy", "cut", "paste", "undo", "redo", "select all", "save", "save as", "find", "replace", "delete", "bold", "italic", "underline", "new line" |
| Navigation | "scroll up", "scroll down", "scroll top", "scroll bottom", "go back", "go forward", "page up", "page down", "zoom in", "zoom out", "reset zoom" |
| Window & Tab | "close tab", "new tab", "reopen tab", "next tab", "previous tab", "new window", "close window", "switch window", "minimize", "maximize", "restore", "task view", "snap left", "snap right" |
| Media & Volume | "volume up", "volume down", "mute", "unmute", "play", "pause", "play pause", "next track", "previous track", "fullscreen", "exit fullscreen" |
| System & Apps | "screenshot", "open explorer", "show desktop", "lock screen", "open settings", "task manager", "open notepad", "open calculator" |
| DEXTRA Control | "start listening", "stop listening", "open trainer", "open settings", "toggle gestures", "calibrate", "help" |
The React-based settings dashboard enables users to configure system parameters without code edits:
- Camera Selection (internal webcam index
0vs external USB camera1). - Cursor Smoothing Level (1–15 frame moving average buffer).
- Click Distance Threshold (pixels).
- Drag Hold Time & Double-click Timing.
- Cooldown Period between actions.
The Gesture Trainer features a real-time HTML5 Canvas preview fed via WebSockets (/trainer/stream). Users can:
- Hold a custom hand posture in front of the webcam.
- Observe live 5-finger extended/curled state indicators.
- Enter a custom gesture name and map it to a system action.
- Hit Record (3-second countdown) to save custom postures to
dextra_custom_gestures.json.
GET /health->{"status": "ok"}GET /settings-> Returnsdextra_settings.jsonparameters.POST /settings-> Persists updated configuration options.GET /gestures-> Returns list of saved custom gestures.POST /gestures-> Saves a new custom gesture payload.DELETE /gestures/{name}-> Deletes a saved custom gesture by name.GET /api/system-status-> Returns live statuses for mouse engine, voice engine, camera index, smoothing frames, and gesture counts.GET /api/all-gestures-> Returns combined list of built-in and custom gestures.GET /api/voice-commands-> Returns voice command categories reference.POST /api/engines/start-> Activates camera tracking and voice daemon worker threads.
WS /trainer/stream: Streams annotated camera JPEG frames and real-time finger state metadata at 30 FPS.WS /voice/stream: Streams real-time voice status events, live transcriptions, and executed command logs.
{
"camera_index": 0,
"cursor_smoothing": 5,
"click_threshold_px": 30,
"drag_hold_time_sec": 0.6,
"double_click_time_sec": 0.35,
"cooldown_period_sec": 0.3,
"voice_commands_enabled": true,
"gesture_trainer_enabled": true
}- Webcam: Built-in or USB webcam (720p recommended, 480p minimum).
- Processor: Intel Core i5 / AMD Ryzen 5 or equivalent (2.0 GHz+).
- RAM: 4 GB minimum, 8 GB recommended.
- Microphone: Built-in or external mic.
- Operating System: Windows 10 / 11 (64-bit), macOS, or Linux.
- Python: Version 3.8, 3.9, or 3.10.
- Node.js: Node 18+ (for building frontend SPA assets).
.\run_dextra.ps1# 1. Clone repository
git clone https://github.com/your-org/Dextra.git
cd Dextra
# 2. Set up Python virtual environment & dependencies
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txt
# 3. Build React Frontend SPA
cd Frontend
npm install
npm run build
cd ..
# 4. Launch DEXTRA Launcher Menu
python python/main.pypython -m unittest discover -s tests -p "test_*.py"(Runs 24 unit & API endpoint tests covering settings CRUD, gesture heuristics, voice mappings, and REST endpoints).
cd Frontend
npm test(Runs Vitest / Node test suite validating metadata schemas and API utilities).
| Challenge / Risk | Mitigation Strategy |
|---|---|
| Cursor Jitter | Moving average smoothing buffer (configurable 1–15 frames). |
| Accidental Clicks | Configurable cooldown timer + Euclidean click distance threshold. |
| Poor Lighting | Confidence threshold tuning; recommend adequate front lighting. |
| Gorilla Arm Fatigue | Rest Mode ("Open Palm") gesture suspends active mouse updates. |
| Background Noise | Signal RMS threshold check before triggering Whisper ASR. |
- Kalman Filter Smoothing: Superior jitter reduction over moving average.
- System Tray Icon: Silent background task control via
pystray. - Multi-hand Support: Two-hand gestures for spatial 3D rotate and multi-monitor movement.
- Standalone Portable Installer: Package into single-click executable via PyInstaller.
- Days 1–2 (Foundation): Webcam frame capture, MediaPipe integration, config manager base.
- Days 3–5 (Core Gestures): Cursor smoothing, click/double-click/drag detection, rest mode.
- Days 6–8 (Voice Engine): Audio stream sounddevice capture, wakeword detector, Hugging Face Whisper ASR.
- Days 9–10 (GUI & Trainer): FastAPI REST endpoints, React SPA settings forms, WebSocket stream renderer.
- Days 11–12 (Integration & Polish): Concurrent multi-threading sync, glassmorphism UI refinement.
- Days 13–14 (Testing & Release): Test suite creation, latency profiling, documentation packaging.
- Harihar R (
@HARIHAR1406) — System Ideator - Mohamed Salman P (
@Salman4256) — Core Gesture & Tracking Engine Lead - Logesh M (
@logeshM1) — Voice Command Engine Lead - Muthamil V (
@muthamil13) — FastAPI Backend & Launch Systems Lead - Godfrey T R (
@TheOrionGD) — React Settings & Trainer SPA Lead
DEXTRA is open-source software released under the terms of the MIT License.