Hand Gesture Game with Object recognition techniques
BIG Thanks to PyTorch: Zero to GANs - the motivation for this blog post.
Imagine a game which can interact with the user without touch input or heft consoles. Kinect made it possible. But here we are gonna see the same objective getting full filled using a webcam.
Okay, I’m kind of hyping it overly :P
Glimpse of the output:
What I did
Before I build a model, I need a dataset using which my model can learn to recognize my hand gestures.
On searching the web, I found this publicly available dataset which solves my objective. It has the hand signs of almost all of the english alphabets.
Dataset link: Click Here
I utilized 3 classes to build my model, why not all? simply to speed up my training time.
- Using Pytorch I took a pretrained ResNet34 model and removed its last layer and added a softmax to find the probability of an image to the respective 3 classes.
I have two notebooks and one structured py script
Notebook 1: Click Here
Will have the step by step code snippets from processing the dataset to training the model
Notebook 2: Click Here
Utilizing the trained weights of the model and integration of the solution with opencv and game concept script.
Structured PY script: Click Here
Trained model’s weights: Click Here
The END!