In this project user can input pin code of any district by showing his hand
For input we use webcam to take live video input of user. User can input number by showing his/her fingers for all 6 digits one by one (one digit at a time) with the help of machine learning program will automatically count how many finger user is showing. After 6-digit number is generated it will show the result.
NOTE:-there are two boxes if you need to enter number >5 than use both boxes one hand in each else if you need to enter number <5 you can use any of the boxes
Youtube video of results
It is the central file that takes input and shows the output. By this code, input from the webcam is taken and extracts the region of hand and prepares image suitable for prediction and then calls a suitable function to make a prediction and show the result.
It will contain all function which is used by index.py, use to organize the code
When this code will runs, 3 windows are open, One will show normal video of input, 2nd window will show B&W video, and 3rd window will show 7 trackbars, you can play with the first 6 trackbars to get a good B&W video of yours in which your hand is properly distinctable. When it has done then close it.
NOTE:- If you want to reset all values then click on the reset trackbar.
This part of the code will contain everything which needs to train our model.
It is used to take images of the respective class and save it to the proper place. when you press any key between 0 to 6 it will take an image of the region of interest and save it to the corresponding folder. let us assume key 3 is press then it will take the image and save it to a folder whose image corresponds to number 3. keypress:- 0 - for zero 1 - for one 2 - for two 3 - for three 4 - for four 5 - for five 6 - for random images
this folder contain pin code data sheet, hsv values text file and exit message.
this folder contain architecture of current model and weight of parameters
this folder will contain all images use to train model.
- OpenCV-python
- Numpy
- Pandas
- Tensorflow
- Clone this repository
git clone https://github.com/iTs-rd/hand-gesture.git2. Install the required packages
cd hand-gesture
pip install -r requirements.txtIf above code do not work replace pip by pip3.
It will install everything you need. If you have already installed some of the required packages it will skip that.
First of all, You have to check your hand is properly detected or not.
python Set_HSV_values.pyIt will open 3 windows, One will show normal video of input, 2nd window will show B&W video, and 3rd window will show 7 trackbars, you can play with the first 6 trackbars to get a good B&W video of yours in which your hand is properly distinctable. When it has done then close it. Note:- If you want to reset all values then click on reset trackbar.
If all done the program is ready to run
To run the program simply enter this line
python index.pyRun these code line by line
git clone https://github.com/iTs-rd/hand-gesture.git
cd hand-gesture
pip install -r requirements.txt
python Set_HSV_values.py
python index.pyLinkedin- https://www.linkedin.com/in/rudresh-gupta-b87a84190