Skip to main content

GesturePlayKit 1.1.0 🖐️👄🕺

Make webcam games, interactive art, virtual props, motion controls, and experimental AR using simple Python functions.

GesturePlayKit wraps Google's MediaPipe Tasks: 21 hand landmarks, 478 face landmarks, 52 optional face-expression blendshapes, and 33 optional body-pose landmarks. You write your own rules, UI, achievements, art, and gameplay. Hand, mouth, eye, and body detections are approximations, not guaranteed physical contact or medical measurements.

Release: Source code for v1.1.0. A GitHub push does not automatically upload to PyPI. Check PyPI separately. This project was developed with substantial AI assistance; see AI_ATTRIBUTION.md.

Getting started

Python 3.10+ is supported when compatible MediaPipe binaries exist for your platform. Install from this repository:

python -m pip install .
python -m gestureplaykit download-models --poses

By default models go to ./models/, relative to the directory from which you start your program. All detection operates locally after the models are downloaded. The --poses flag adds the optional body model; without it you only download hand and face models.

Try examples/07_mouth_expressions.py or this minimal script:

from gestureplaykit import Camera, Vision, show_text

with Camera() as camera, Vision() as vision:
    while True:
        frame = camera.read()
        if frame is None:
            break
        vision.update(frame)
        if vision.hand and vision.hand.pinching:
            show_text(frame, "PINCH!", at=(20, 60))
        if vision.face and vision.face.mouth_open:
            show_text(frame, "MOUTH OPEN", at=(20, 100))
        if vision.face and vision.face.smiling:
            show_text(frame, "SMILING!", at=(20, 140))
        if not camera.show(frame):
            break

To use body tracking:

from gestureplaykit import Camera, Vision, draw_pose
with Camera() as camera, Vision(hands=False, faces=False, poses=True) as vision:
    while (frame := camera.read()) is not None:
        vision.update(frame)
        if vision.pose:
            draw_pose(frame, vision.pose)
            if vision.pose.arms_raised:
                print("Hands up!")
        if not camera.show(frame):
            break

Features

  • Hand gestures: pinch hold/start/end/double, fingertip contact, open palm, fist, peace sign, pointing, finger count, palm position, estimated handedness, multiple-hand IDs, and approximate world coordinates.
  • Face: mouth open/close events and position, eye positions, mouth width/height, blink events, smile, wink, brow/jaw and 52 other optional expression scores, 478 landmarks, and optional transformation matrix.
  • Body: 33 pose landmarks, shoulders/hips centers, raised arms, elbow/knee angles, point visibility, and skeleton drawing.
  • Image/overlay: local or HTTP(S) PNG/JPG, alpha blending, opacity, resizing, cropping to frame, text, points, lines and rectangles.
  • Offline once models and any remote images have been downloaded; no camera data is uploaded by this library.
  • Model downloader (python -m gestureplaykit download-models) and tested Python-first API.

Complete documentation

Important limitations

Camera and model accuracy depend on lighting, occlusion, frame rate, and angles. hand.id is best-effort and may change when hands leave or cross; detected handedness may appear reversed in a mirrored view. Pixel distances change with perspective. Face.smiling, blink detection, and Pose.arms_raised are heuristics and not robust biometric or safety assessments. Face tracking currently selects the first detected face. Models are downloaded separately; they are not included in the wheel.

Credits and licenses

GesturePlayKit uses MediaPipe, OpenCV and NumPy. MediaPipe models have their own terms. See LICENSE (MIT) for the GesturePlayKit source and AI_ATTRIBUTION.md for authorship details. Do not treat publishing or using this library as a way to conceal AI use in a competition.

Metadata

Release files for gestureplaykit 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gestureplaykit 1.1.0
File Size Uploaded Provenance Actions
gestureplaykit-1.1.0.tar.gz 52.3 kB Without provenance Details for gestureplaykit-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gestureplaykit 1.1.0
File Interpreter ABI Platform Actions
gestureplaykit-1.1.0-py3-none-any.whl Python 3 none any Details for gestureplaykit-1.1.0-py3-none-any.whl

Total release size: 73.7 kB

Release files / gestureplaykit-1.1.0.tar.gz

Download URL gestureplaykit-1.1.0.tar.gz
Size 52.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7c3466277f5581857b428a0241fad23cb935c6bc5f5e106ae7fae76ac8007d2e
BLAKE2b-256 checksum
How to use checksums
be825ad986f9771bec0a1870067a61131d5f85b916fc88b7c681f6e91e9a891c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / gestureplaykit-1.1.0-py3-none-any.whl

Download URL gestureplaykit-1.1.0-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dfb2fd361c24ff47d89b78c23218ba855d45deac1760410a892fc36f59b0d2f
BLAKE2b-256 checksum
How to use checksums
9b6101c2db7b3fc86df20a3c32a11a4f0b31d8e5212c4ad7af1ce2349aa01b65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for gestureplaykit 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page