UnMute is a comprehensive gesture recognition system designed to detect and classify hand gestures in real-time. It incorporates two primary approaches for gesture recognition: Motion Sign Detection System and Static Sign Detection System. These approaches leverage MediaPipe for hand landmark detection and a neural network model for gesture classification, enabling applications in human-computer interaction, sign language recognition, and more.
- Overview
- Features
- Installation
- Usage
- Model Training
- Real-time Gesture Recognition
- Contributing
- License
UnMute provides two main approaches for gesture recognition:
- Motion Sign Detection System: Detects dynamic hand movements or gestures over time.
- Static Sign Detection System: Identifies static hand gestures in a single frame.
- Real-time hand gesture recognition using a webcam.
- Dynamic and static gesture detection.
- Model training and evaluation.
- Easy-to-use interface for data collection and gesture classification.
- Run the gesture recognition script to create a dataset:
- Run the real-time gesture recognition script using the trained model:
To install and set up the UnMute project, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/UnMute.git cd UnMute
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
The Motion Sign Detection System captures and analyzes hand movements over a period, allowing for the recognition of dynamic gestures.
-
Run the data collection script:
python motion_data_collection_webcam.py
-
Controls:
- Press
A
to start recording. - Press
S
to stop recording. - Press
D
to save the recording with a label.
- Press
The collected data will be saved in motion_hand_landmarks.csv
.
The Static Sign Detection System recognizes static hand gestures from single frames.
-
Run the data collection script:
python linear_data_collection_webcam.py
-
Controls:
- Press
A
to start recording. - Press
S
to stop recording. - Press
D
to save the recording with a label.
- Press
The collected data will be saved in static_hand_landmarks.csv
.
The model training process involves loading the collected hand landmark data, preprocessing it, training a neural network model, and converting the model to TensorFlow Lite format.
-
Load the landmarks data from
hand_landmarks.csv
. -
Preprocess the data:
- Extract labels and features.
- Encode labels into integers and convert them to categorical.
- Split the data into training and test sets.
-
Train the model:
- Open
Model training.ipynb
in Jupyter Notebook. - Run the notebook cells to load data, preprocess it, train the model, and save it in TensorFlow Lite format.
- Open
-
Convert the model to TensorFlow Lite format:
- Save the TensorFlow Lite model for deployment.
The real-time gesture recognition system captures video frames from a webcam, detects hand landmarks, normalizes them, and uses the trained model to classify gestures.
-
Run the real-time gesture recognition script:
python real_time_gesture_recognition.py
-
Components:
- Video capture and hand landmark detection using MediaPipe.
- Landmark normalization.
- Gesture classification using the trained model.
- Display the recognized gesture on the video feed.
Contributions are welcome! If you would like to contribute to UnMute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.