Real-time hand gesture and motion recognition using MediaPipe and TensorFlow Lite.
|
|
- 8 Hand Gestures: 👍 👎 ☝️ ✌️ ✊ ✋ 🤟 👌
- 4 Motion Types: Still • Clockwise • Anticlockwise • Move
- Dual Hand Detection: Recognize 2 hands simultaneously
- High Performance: TF Lite models, ~30ms inference per frame
- Real-time Video Processing: 1280×720 @ 30 FPS
pip install -r requirements_win.txtpip install -r requirements_wsl.txtpython collect_data.py- Press
Sto start/stop recording - Press
Qto quit - Choose mode: Gestures or Motion sequences
python app.py- Point camera at your hand
- Press
Qto exit
├── app.py # Real-time gesture classifier
├── collect_data.py # Training data collection tool
├── src/
│ ├── config.py # Configuration & labels
│ ├── classifier.py # TF Lite model wrapper
│ ├── processor.py # Landmark normalization
│ └── visualizer.py # Visualization utilities
├── models/ # Pre-trained TF Lite models
├── data/ # Training datasets
└── notebooks/ # Training scripts
| Module | Purpose |
|---|---|
MediaPipe |
Hand landmark detection |
TF Lite |
Fast gesture/motion inference |
OpenCV |
Video capture & rendering |
NumPy |
Landmark processing |
- Gesture Model: Classifies static hand poses
- Motion Model: Analyzes 16-frame sequences for movement direction
Edit src/config.py to customize:
- Max hands:
MAX_HANDS = 2 - Input resolution:
IMAGE_SHAPE = (1280, 720) - Model paths and labels
- Requires webcam input
- Optimal lighting recommended
- Models run on CPU (GPU optional)
Made with 💻 and ☕ by @udham2511
Inspired by @Kazuhito00 and their innovative hand gesture recognition projects.
This project is open-source and available under the MIT License.

