Hand Gesture Engine
A modular, extensible hand gesture recognition engine built in Python using MediaPipe landmarks. Designed for real-time applications, clean architecture, and easy integration into games, apps, and AI projects. Perfect for:
- Computer Vision projects
- Gesture-controlled apps
- Games & UI interaction
- esearch & prototyping
Features
- Modular gesture detection system
- Real-time hand landmark processing
- Centralized gesture recognizer (brain logic)
- Configurable thresholds (pinch, thumb, etc.)
- Built-in logging (debug & production ready)
- CPU / GPU backend auto-selection
- Clean project structure
- YAML configuration support
- Confidence scoring
- Stable public API
- Ready for extension with custom gestures
Supported Gestrues
| Gesture | Name Returned |
|---|---|
| ✊ Fist | FIST |
| ✋ Open Hand | OPEN HAND |
| 👍 Thumbs Up | THUMBS UP |
| 👎 Thumbs Down | THUMBS DOWN |
| ✌ Peace | PEACE |
| ☝ Pointing | POINTING |
| 👌 OK | OK |
| 🤏 Pinch | PINCH |
| 🖖 Three Fingers | THREE |
Installation
pip install mediapipe opencv-python
Then:
pip install hand-gesture-engine==0.1.1
Quick Start
Sample Code:
import cv2
from hand_gesture import GestureEngine, GestureConfig
config = GestureConfig.from_yaml("gesture_config.yaml")
engine = GestureEngine(config=config)
cap = cv2.VideoCapture(0)
while cap.isOpened():
ret, frame = cap.read()
if not ret:
break
frame, gesture = engine.process(frame)
if gesture:
print("Detected:", gesture)
cv2.imshow("Gesture Engine", frame)
if cv2.waitKey(1) == 27:
break
Configuration
IMPORTANT:
Add/Create gesture_config.yaml in the same working directory:
backend: AUTO
stability:
hold_time: 0.35
min_confidence: 0.6
thresholds:
pinch: 0.04
thumb_extended: 0.25
finger_tolerance: 0.05
GerstureEngine
engine = GestureEngine(
backend="AUTO", # AUTO | CPU | GPU
config=config
)
BackendsAUTO - selects best available backend
CPU - forced CPU execution
GPU - uses GPU if supported
Logging
Enable logging via config:
GestureConfig(enable_logging=True)
Logs include:
- Backend selection
- Detection failures
- Gesture recognition results
Future Ideas
Roadmap
- Gesture smoothing
- Multi-hand support
- Custom gesture training
- Mobile optimization
- ONNX / TensorRT backend
Credit
https://choosealicense.com/
This site helps you choose an open source license for your repository/project.
You can get to know about the licenses and which license to choose.
Very useful!
Author
Karan Vishwakarma
Built with Python and Mediapipe(Google)
License
MIT License
Free to use, modify, and distribute.
Final Note
If this project helps you:
- Star it on GitHub
- Share it on PyPI
- Build cool gesture-powered apps
Metadata
Release files for hand-gesture-engine 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hand_gesture_engine-0.1.1.tar.gz | 5.8 MB | Without provenance | Details for hand_gesture_engine-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hand_gesture_engine-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for hand_gesture_engine-0.1.1-py3-none-any.whl |
Total release size: 5.8 MB
Release files / hand_gesture_engine-0.1.1.tar.gz
| Download URL | hand_gesture_engine-0.1.1.tar.gz |
|---|---|
| Size | 5.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30d8f7fcb89caf4382a87fa0e8a64b76b0a614d363ba2bf2a395722dd8bbd371
|
|
BLAKE2b-256 checksum How to use checksums |
c1f9ff857435f434acc5a7b59050f6fb28b939757ea8d7c2c97d2160b7d61b9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / hand_gesture_engine-0.1.1-py3-none-any.whl
| Download URL | hand_gesture_engine-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7baf8af27bfe435ee416b4ef99371f21b6aa056cc0aa7832bb847c7687fb02dd
|
|
BLAKE2b-256 checksum How to use checksums |
20c31e8a9ea84a48ad403e55f437cbc765075913c27e7b54c02da27b0aab8843
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for hand-gesture-engine 0.1.1
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.