Downloads · 30 days
0
a-01a/hand-gesture-recognition
hand-gesture-recognition is a video classification model from a-01a. Use it for the video classification task on the model card, and read the license before you ship it in a product. It is set up for tensorflow. The card lists the license as mit.
A real-time hand gesture recognition system using MediaPipe for hand pose extraction and LSTM neural networks for temporal sequence classification.
Downloads · 30 days
0
Access
Public
Updated Nov 9, 2025
Repo size
4.1 MB
Likes
2
Public
Click a slice to open those files.
.h54.1 MB · 100%
From the Hugging Face model README
A real-time hand gesture recognition system using MediaPipe for hand pose extraction and LSTM neural networks for temporal sequence classification.
This project implements a complete pipeline for recognizing hand gestures from video sequences using:
The project uses the LeapGestRecog dataset from Kaggle:
gti-upm/leapgestrecogAutomatic Dataset Management
Hand Pose Extraction
Data Augmentation
Deep Learning Model
Real-time Recognition
This project uses uv for fast and reliable package management.
# Install uv (Windows PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Navigate to project directory
cd hand_gesture_recognition
# Install all dependencies
uv pip install -e .
kagglehub - Dataset downloadopencv-python - Image processingnumpy - Numerical operationspandas - Data manipulationmatplotlib, seaborn - Visualizationmediapipe - Hand pose estimationscikit-learn - ML utilitiestensorflow - Deep learning frameworktqdm - Progress barsAll dependencies are automatically installed via uv pip install -e .
The easiest way to test the model is using the inference.py script, which downloads the model from Hugging Face and runs webcam inference:
python inference.py --repo a-01a/hand-gesture-recognition
Features:
Press 'q' to quit the webcam window.
Alternatively, you can run the webcam demo in the notebook after training:
recognizer = RealTimeGestureRecognizer('hand_gesture_lstm_model.h5', gesture_mapping)
recognizer.run_webcam_demo()
Input: (30, 63) - 30 frames × 63 features
LSTM Layer 1: 128 units (return sequences)
↓ BatchNormalization + Dropout(0.3)
LSTM Layer 2: 128 units (return sequences)
↓ BatchNormalization + Dropout(0.3)
LSTM Layer 3: 64 units
↓ BatchNormalization + Dropout(0.3)
Dense Layer 1: 256 units (ReLU)
↓ BatchNormalization + Dropout(0.3)
Dense Layer 2: 128 units (ReLU)
↓ BatchNormalization + Dropout(0.3)
Output Layer: 10 units (Softmax)
The model is evaluated using:
The model recognizes 10 different hand gestures from the LeapGestRecog dataset. Each gesture has unique characteristics captured through the temporal sequence of hand landmarks.
hand_gesture_recognition/
├── hand_gesture_recognition.ipynb # Main training notebook
├── inference.py # Webcam inference with model download from HF
├── upload_to_huggingface.py # Upload model to Hugging Face
├── README.md # This file
├── TECHNICAL_REPORT.md # Detailed mathematical concepts
├── LICENSE.md # License
├── pyproject.toml # Project configuration (uv)
├── hand_gesture_lstm_model.h5 # Saved model (generated)
├── gesture_mapping.json # Gesture labels (generated)
└── datasets/ # Dataset (auto-downloaded & auto-deleted)
The notebook automatically deletes the downloaded dataset after training to save disk space. The trained model and gesture mappings are saved locally and can be uploaded to Hugging Face for easy sharing and deployment.
See TECHNICAL_REPORT.md for a comprehensive explanation of all mathematical concepts, algorithms, and methodologies used in this project.
If you use this model in your research or application, please cite:
@misc{hand_gesture_lstm_2025,
title={Hand Gesture Recognition using LSTM and MediaPipe},
author={Abdul Ahad},
year={2025},
howpublished={\url{https://huggingface.co/spaces/a-01a/hand-gesture-recognition}},
note={Real-time hand gesture recognition system using MediaPipe and LSTM networks}
}
MIT License - See LICENSE.md for details.