Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Volume Gesture

MediaPipe hand-landmark gesture controls for computer volume.

What it does

  • Open the pinch between thumb and index finger: higher volume percentage
  • Close the pinch between thumb and index finger: lower volume percentage
  • The current volume is displayed as a number on screen.
  • Only MediaPipe-detected hands are accepted, so faces are ignored.
  • The default accepted hand is right.

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python download_model.py

On macOS, allow Terminal or your Python app to access:

  • Camera
  • Accessibility

Those permissions are needed so the app can see your hand and change volume.

Run

Start in dry-run mode first. It prints the action instead of controlling your computer.

python gesture_control.py --dry-run

Then run the real controls:

python gesture_control.py

Press q in the camera window to quit.

If you want to use the left hand:

python gesture_control.py --dry-run --hand left

Notes

Gesture thresholds are intentionally conservative to reduce accidental triggers. If commands feel too slow or too sensitive, tune these values in gesture_control.py:

  • Closed pinch ratio: 0.25
  • Open pinch ratio: 1.55
  • Minimum volume update: 2

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages