Hand Gestures Recognition using OpenCV, Keras, Convolutional Neural Networks
- python 3.6.7
- openCV (pip install opencv-python)
- matplotlib
- keras
- sklearn
-
cam_run.py : Contains the main method which would start the Video Capture, segment the hand region, pass on the thresholded image to the CNN model, and predict the hand gesture from LIVE camera feed.
-
train_gestures.ipynb : The Jupyter notebook which contains the data loading, creation and training of the 2D Convolutional Neural Network.
-
my_dataset : The Dataset consists of 6 types of gestures. Mainly,
- BLANK
- OK
- THUMBSUP
- THUMBSDOWN
- PUNCH
- HIGH-FIVE
Details can also be found here:
https://www.kaggle.com/sarjit07/hand-gestures-recognition-with-opencv-and-cnn
- Download repo
- Install required dependencies (Libraries)
- Go to repo directory and run following command on terminal
$ python cam.py
- Train the model in kaggle
- Download the .h5 file after training is done
- Include the path of the .h5 file in the testing script
- Download necessary libraries
- Run the model locally by typing the command $python file_name.py
We have also included the tf.js file for the same, if we can convert our testing script in javascrit(which is in python now) we wil be able to run the same in the browser.
For short demo of our model refer "gesture model demo (1).mp4". or gesture model demo.webm