The following code is a rock paper scissors game that can be played with your webcam. The object detection is done by the resent50 model(parts of the weights are frozen) combined with a fully connected layer.
First Install the weights for the neural network from this link and put in the current repository directory.
Then Run
python play.py
-numpy
-tensorflow
-opencv
-imutils
-shutil
To train with your own data put the data in the training and validation folder and then type.
python train.py
To generate data using the webcam run get_data_from_webcam.py and follow the instructions on the screen.
python get_data_from_webcam.py
To move the data from the webcam folder run move.py. It put's 90% of the data into the training folder and 10% into the validation folder.
python move.py