Skip to content
EkinBarisCPublic

About

Hands-free Windows desktop control from your webcam — hand poses, facial gestures, and a head-driven mouse pointer. Runs locally and privately; accessibility-oriented.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Helm logo

Helm

Hands-free Windows desktop control from your webcam.
License: MIT Python 3.11+ Platform: Windows

Helm watches your webcam and turns body movement into desktop control. Static hand poses and deliberate facial gestures fire desktop actions (lock, switch app, media, launch apps, hotkeys, mouse clicks/scroll), and a head-driven Pointer moves the mouse cursor. It's an accessibility-oriented, hands-optional controller that runs quietly in the system tray.

Everything runs locally — the video never leaves your machine. There is no account, no telemetry, and no network dependency at runtime.

Features

  • Hand gestures — recognises static hand poses (open palm, fist, point, peace, and more) via MediaPipe HandLandmarker and maps each to a configurable action.
  • Face gestures — brow raise, mouth open/pucker, mouth left/right, wink, cheek puff, with per-user Calibration so detection matches your range of motion.
  • Head Pointer — move the cursor by turning your head; centre your head to stop. Velocity-based and frame-rate independent, with One-Euro smoothing.
  • Target gravity (opt-in) — gently biases the cursor toward nearby buttons/links so it settles onto small targets instead of skating past. Never snaps or steals focus.
  • Three independent Controls — Hand, Face, and Pointer toggle separately and share one efficient engine loop; the camera is released whenever nothing needs it.
  • Fully configurable — a settings UI (no restart) plus a plain-YAML config file. A master pause hotkey (Ctrl+Alt+G) is the hard stop that releases the camera.
  • Single-file build — ships as a standalone Helm.exe; no Python needed to run it.

Requirements

  • Windows 10 or 11
  • A webcam
  • Python 3.11+ (only to run from source or build the exe — not needed for the packaged app)

Install (packaged app)

No Python needed — grab the packaged exe:

  1. Download Helm.exe from the latest release.
  2. Put it anywhere (e.g. %LOCALAPPDATA%\Helm\) and double-click to run.

First run: the app runs in the background — look for the Helm icon in the system tray (green = active, grey = paused). Windows SmartScreen may warn on an unsigned exe ("More info" → "Run anyway"). The first launch takes a few seconds to unpack. Grant camera access when prompted. Config lives in %APPDATA%\Helm\config.yaml; open Settings… from the tray to change anything.

Start on login: open Settings… from the tray and tick Start on login — the packaged exe adds itself to the Windows Startup folder and launches automatically after you sign in.

Releases are built automatically from a v* tag by .github/workflows/release.yml.

Run from source

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe scripts\fetch_model.py        # HandLandmarker model
.\.venv\Scripts\python.exe scripts\fetch_face_model.py   # FaceLandmarker model
.\.venv\Scripts\python.exe -m helm.app.tray

The MediaPipe model files (models/*.task) are downloaded by the fetch_* scripts and are not committed to the repository.

A tray icon appears (green = active, grey = paused). Right-click for the Controls submenu (toggle each Control), Settings…, Pause/Resume, Reload config, Quit. Default master-pause hotkey: Ctrl+Alt+G (releases the camera — the hard stop).

Tuning guide

Everything below is adjustable in Settings… (no restart) or by editing %APPDATA%\Helm\config.yaml. The defaults are tuned from real-use testing; treat them as a starting point and adjust to your own range of motion — facial-gesture detection in particular varies by face, so Calibration (below) matters more than any global number.

Pointer (head → cursor) — under controls.pointer:

Setting Default What it does Try
sensitivity 1.0 Cursor speed multiplier. 0.5 (precise) – 2.5 (fast)
deadzone 0.12 Head offset ignored around neutral, so a still head holds the cursor still. Raise if the cursor drifts; lower for finer aim. 0.08 – 0.20
min_cutoff 1.0 One-Euro base smoothing (the Smoothing slider). Lower = smoother/calmer when still, but laggier. 0.5 – 2.0
beta 0.02 One-Euro speed response (the Responsiveness slider). Higher = snappier on fast head turns, less lag — the main lever if the cursor feels like it's "on ice" or overshoots its target. 0.0 – 1.0
invert_x false Flip the horizontal axis if the mapping feels backwards. —

Neutral is captured when the Pointer turns on; Recenter (default face.brow_raise, or bind it to anything) re-snapshots it if the cursor starts creeping after you shift in your seat.

Target gravity ("sticky stop") — under controls.pointer.gravity, off by default:

Setting Default What it does Try
enabled false Turn gravity on. It gently biases the cursor toward nearby on-screen buttons/links/fields so it settles onto small targets instead of skating past. It never snaps, teleports, or focuses anything. true to opt in
capture_px 45 How close (pixels from a target's edge) the cursor must be — while moving slowly — for gravity to engage. Larger = grabs from farther out. 25 – 90
pull_px_s 180 How hard (px/s) it's pulled toward a captured target's centre. Larger = stickier. 100 – 300

Gravity only engages when you're aiming (moving slowly near a target); a fast move passes straight over, and moving away from a captured target releases it immediately — you never have to fight it to leave. Targets come from Windows UI Automation on the foreground window; if that momentarily stalls, gravity simply falls back to the plain cursor. Requires the Pointer to be on.

The cursor is a velocity control (head offset from neutral sets cursor speed; centre the head to stop), so its responsiveness depends on the engine's update rate — the loop runs at 30fps while the Pointer is active. Cursor speed is frame-rate independent: movement is integrated over real elapsed time, so the feel stays consistent even if the frame rate dips under load. If aiming feels imprecise, raise beta first (snappier tracking), then lower sensitivity (slower travel); if the cursor jitters when you hold still, lower min_cutoff or raise deadzone.

Dwell & cooldown — under settings, shared by hand and face gestures:

Setting Default What it does
dwell_s 0.7 How long a gesture must be held before it fires. Raise to avoid accidental fires (useful for face gestures, which can flicker); lower for snappier shortcuts.
cooldown_s 1.5 Quiet period after a fire before anything can fire again.

The same dwell/cooldown work well for both modalities; if face gestures fire by accident, raise dwell_s (e.g. 0.9) before lowering thresholds.

Face gesture Calibration — in Settings, pick a gesture, Record rest (relaxed) then Record peak (performing) to set a per-user threshold within your range. This is the most effective lever for reliable face detection, especially for reduced or asymmetric movement. cheek_puff ships undetectable by default and needs calibration to use.

Building the exe

Produce a distributable single-file dist\Helm.exe (no Python needed on the target machine):

.\.venv\Scripts\python.exe scripts\build_exe.py

The script fetches the MediaPipe models if missing, then runs PyInstaller with helm.spec (--noconsole, single file, assets/helm.ico embedded). Models, icons, and config.example.yaml are bundled inside the exe and resolved at runtime via helm.resources.resource_path; MediaPipe's own graph assets are collected by the spec. Expect a large exe (MediaPipe + OpenCV + Qt) and a few seconds of unpacking on each launch — one-file builds extract to a temp dir first.

Development

Architecture, conventions, and the domain vocabulary live in AGENTS.md, ARCHITECTURE.md, DESIGN.md, and the docs/adr/ decision records. The pure core (src/helm/core/) is side-effect-free and unit-tested; adapters wrap the OS and camera; the app layer hosts the engine loop and tray.

Run the checks:

.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m ruff check .
.\.venv\Scripts\python.exe -m mypy

The spike/ scripts are standalone webcam tools used to record classifier test fixtures and smoke-test detection (e.g. spike\spike.py for hand poses, spike\face_spike.py for face gestures, spike\pointer_spike.py for the head Pointer). They are development aids, not part of the shipped app.

Contributing

Issues and pull requests are welcome. Please run the checks above before opening a PR, and keep the pure core free of OS/camera imports (see AGENTS.md for why). If you're changing behaviour, add or update a test.

License

MIT © EkinBarisC

About

Hands-free Windows desktop control from your webcam — hand poses, facial gestures, and a head-driven mouse pointer. Runs locally and privately; accessibility-oriented.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages