This project implements a Convolutional Neural Network (CNN) for hand gesture recognition using TensorFlow and OpenCV. The CNN is trained on a dataset containing hand gesture images labeled with corresponding letters. The trained model is then utilized for real-time hand gesture recognition through a webcam.
- Clone the repository:
git clone https://github.com/Sousannah/hand-gestures-recognition-using-cnn
- Install the required dependencies:
pip install -r requirements.txt
To train the CNN model, run the cnn_train_model01.py
script. This script loads hand gesture images from a specified directory, preprocesses the data, splits it into training, validation, and test sets, builds and trains the CNN model, and saves the trained model.
python cnn_train_model01.py
There are two scripts available for real-time hand gesture detection:
real_time_detection.py
: This script performs real-time hand gesture recognition using the trained CNN model and displays the recognized gestures along with confidence scores on the screen.
python real_time_detection.py
real_time_detection_with_sound.py
: Similar to the previous script, but this one also utilizes text-to-speech functionality to announce the recognized gestures audibly.
python real_time_detection_with_sound.py
-The dataset used in this project is sourced from Kaggle. You can download it from here. -I have only used 'A', 'B', 'C', 'F', 'K', 'Y' Classes for training