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.1.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.1-py3-none-any.whl (6.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mp_gesture_lib-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a19231ef67dcbb0a937946fedf2347360c14ba167a5e4566b4bfb504591b926a
MD5 f05e7f1618620fe3a4a8d3ed31120e6d
BLAKE2b-256 46548841fc678034c649ef845aa0edcd7ac079c3c2cf4b1efea356135d14bab5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mp_gesture_lib-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32a84d56f40139e7d3f8edc6bd6d3414e7deb82e30bca3efd64efb61df59672e
MD5 02ceded465a39a3bf5ce1474e28b4eb6
BLAKE2b-256 3f20931ca915ad7a4996715a85283a1273672e642305273d31cb474db995ffca

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