In this repository i tried to replicate a cool project by a japanese scientist who made a machine which had 100 % accuracy in defeating humans in the game of stone-paper and scissors
- Users starred: 20
- Users forked: 8
- Users watching: 20
- Updated at: 2020-05-17 01:09:49
In this repository i tried to replicate a cool project by a japanese scientist who made a machine which had 100 % accuracy in defeating humans in the game of stone-paper and scissors using convolutional neural networks and computer vision i have used opencv for computer vision and keras for CNNS link to video tutorial https://www.youtube.com/watch?v=ecSDKWkktOw
- Python 3.x
- Tensorflow 1.5
- OpenCV 3.4(for loading,resizing images)
- h5py(for saving trained model)
- A good grasp over convolutional neural networks. For online resources refer to standford cs231n, deeplearning.ai on coursera or cs231n by standford university
- A good CPU (preferably with a GPU).
- Patience.... A lot of it.
Installing the requirements
- Start your terminal of cmd depending on your os.
- If you have a NVidia GPU then make sure you have the prerequisites for Tensorflow GPU installation (Refer to official site). Then use this commmand
pip install -r requirements_gpu.txt
- In case you do not have a GPU then use this command
pip install -r requirements_cpu.txt
Steps for making your own trainig data
Place the camera and don't move it, As soon as the camera starts, perform only one gesture at a time, the numberred images of this gesture will be stored in the root directory(you can modify the code append the path to which ever directory you want) Gather data for all the classes in the similar way
Training your own classifier
I used my own laptop for training puproses but you can use aws, google collab, azure ........
1)Modify the path of the stone,paper and scissor folder in hand_gesture_creating_model.py
After the model is trained you are ready to run it.
Running the trained model
1)Modify the path to the model file in predicting.py
Congratulations you just made your very own MAN defeating machine.
Give the repository a star if you really liked it.
if you have any doubts, you can comment them under my youtube video or you can post your doubts on my facebook page REACTOR SCIENCE