This is a Convolutional Neural Network (CNN) model trained to classify images of hand gestures representing Rock, Paper, and Scissors. The model is built using TensorFlow/Keras and achieves high accuracy on the Rock Paper Scissors dataset.
The model achieves excellent performance on the Rock Paper Scissors classification task:
tensorflow>=2.10.0
tensorflow-datasets>=4.8.0
numpy>=1.21.0
matplotlib>=3.5.0
1 import tensorflow as tf
2 import tensorflow_datasets as tfds
3 import numpy as np
4
5 # Load the dataset
6 ( ds_train , ds_test ) , ds_info = tfds . load (
7 'rock_paper_scissors' ,
8 split = [ 'train' , 'test' ] ,
9 shuffle_files = True ,
10 as_supervised = True ,
11 with_info = True ,
12 )
13
14 # Preprocessing function
15 def preprocess_image ( image , label ) :
16 image = tf . cast ( image , tf . float32 ) / 255.0
17 return image , label
18
19 # Apply preprocessing
20 ds_test = ds_test . map ( preprocess_image ) . batch ( 32 )
21
22 # Load your trained model
23 # model = tf.keras.models.load_model('path_to_your_model')
24
25 # Make predictions
26 # predictions = model.predict(ds_test)
This model was developed as part of a machine learning project for educational purposes.
For questions or issues regarding this model, please refer to the project repository.
1 @misc{rock_paper_scissors_classifier,
2 title={Rock Paper Scissors Classifier},
3 author={Your Name},
4 year={2024},
5 howpublished={\url{https://github.com/yourusername/rock-paper-scissors-classifier}}
6 }