Skip to main content

Plug-and-play hand gesture recognition module built on MediaPipe and OpenCV

Project description

MP-Gesture-Lib

A plug-and-play hand gesture recognition module built on MediaPipe and OpenCV.
Detect gesture names + confidence from a webcam frame in one function call.

📖 Full Documentation →


Install

pip install mp-gesture-lib

Requires Python >= 3.8 Bundled model included — no external files needed. (check mediapipe support for your python version)


Quick Start

import cv2
from mp_gesture_lib import GestureDetector

detector = GestureDetector()  # zero-config

cap = cv2.VideoCapture(0)
while cap.isOpened():
    ok, frame = cap.read()
    result = detector.detect(frame)

    print(result.gesture)     # "plus", "3", "minus", "unknown" …
    print(result.confidence)  # 0.0 – 1.0

    cv2.imshow("Gestures", result.annotated_frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

Supported Gestures

Gesture Returns
Numbers 1 – 10 "1""10"
Arithmetic ops "plus" "minus" "multiply" "divide"
Calculator "equal" "clear" "0"
Nothing / unrecognised "unknown"

Custom Model

# Your model checked first — bundled used as fallback
detector = GestureDetector(model_path="my_gestures.task")

Acknowledgements

  • MediaPipe — hand tracking & gesture recognition
  • OpenCV — image & video processing

License

MIT © Debabrata Saha
See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mp_gesture_lib-1.0.2.tar.gz (6.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mp_gesture_lib-1.0.2-py3-none-any.whl (6.4 MB view details)

Uploaded Python 3

File details

Details for the file mp_gesture_lib-1.0.2.tar.gz.

File metadata

  • Download URL: mp_gesture_lib-1.0.2.tar.gz
  • Upload date:
  • Size: 6.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for mp_gesture_lib-1.0.2.tar.gz
Algorithm Hash digest
SHA256 228b0c12ec41991433030a69325b72d32675bd7971932c4676b8c613ad1bf14e
MD5 9008368967cf9716032ad92b06b0f21c
BLAKE2b-256 987f61174bf834a3da23a34fa222dc7b2ff0de9b77fcc10d4205d9ad3abed9c5

See more details on using hashes here.

File details

Details for the file mp_gesture_lib-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: mp_gesture_lib-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for mp_gesture_lib-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 363b7b97e7a8bb17cbd2f526ae43f17d8fd3f5db9b1b436b17eb1a9f52b1c88e
MD5 bd31537e9126fb9346338e5b28a107be
BLAKE2b-256 eddaf46555925d2d78f9225ba1e06e3dcf58018365e87dfc55663ca71f5bd461

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page