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.
Install
pip install mp-gesture-lib
Requires Python >= 3.8 Bundled model included — no external files needed. (check
mediapipesupport 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
License
MIT © Debabrata Saha
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mp_gesture_lib-1.0.0.tar.gz.
File metadata
- Download URL: mp_gesture_lib-1.0.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3390bceab10ee7a8be63651a875e8db18bf54a2aedb7898e929fd5b54655a336
|
|
| MD5 |
18a1c1259633c6b89697cf61e31647db
|
|
| BLAKE2b-256 |
cccd5b0ff00ab550b92a61ec0be501fd19ca1f9fc6218ef232f87bf735f60052
|
File details
Details for the file mp_gesture_lib-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mp_gesture_lib-1.0.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d085f0114673d47ab338ef886bb34f01fffe04e279e0e459637bb86e50addc09
|
|
| MD5 |
3d27f71af6aebd68db641c35f1306aa8
|
|
| BLAKE2b-256 |
3e4f4550eb3d2af5c63470a48f3efab6486ba159a9874612db1b02a8e0299b66
|