Skip to content

Hand Gesture Recognition and Modification was based on transfer learning Inception v3 model using Keras with Tensorflow backend trained on 4 classes - rock, paper, scissors, and nothing hand signs. The final trained model resulted in an accuracy of 97.05%. The model was deployed using Streamlit on Heroku Paas.

License

Notifications You must be signed in to change notification settings

Data-Science-Community-SRM/Hand-Gesture-Recognition-Rock-Paper-Scissor

Repository files navigation

RPSNet: Hand Gesture Recognition and Modification

Image classification of Rock🌍,Paper📜 and Scissors✂ hand symbols

Preview

  • Output:

screen recording of output

  • Browse images from your system and try out the image recognition model!

Web app output #1

Web app output #2

Web app output #3

Web app output #4

Functionalities

  • This model (Model_4_classes.h5) has been trained to detect 4 classes of objects: Paper 📜, Rock 🌍 , Scissors ✂ and Nothing(Case of No hand sign) using transfer learning on the InceptionV3 model till layer ‘mixed7’, followed by a Dense layer with 256 nodes (RelU), and a softmax layer with 4 output nodes using Keras with Tensorflow backend.
  • It was trained using the RMSprop optimizer with a batch size of 32 for 100 epochs. Input size of the images were (150, 150, 3). The images were rescaled and augmented before training. (TrainInception_4classes.ipynb)
  • The h5 weights file of the Inception v3 model has been integrated as a Streamlit app. The Streamlit app has been deployed on Heroku PaaS
  • The final trained model resulted in an accuracy of 97.05% on the test set with 237 images.
  • The model can be visualized using the file Visualize_4_classes.py and Uses OpenCV library and the webcam to do the same. Each frame is flipped, resized to 150x150 and then normalized before feeding into the network to make a prediction.

Plot of training and validation accuracy versus the number of epochs:

Plot of training and validation accuracy versus the number of epochs.

Plot of training and validation loss versus the number of epochs:

Plot of training and validation loss versus the number of epochs.


Instructions to run

  • Pre-requisites:

  • Installation

< mkdir -p ~/.streamlit/

echo "\
[server]\n\
headless = true\n\
port = $PORT\n\
enableCORS = false\n\
\n\
" > ~/.streamlit/config.toml >
< web: sh setup.sh && streamlit run app.py >

Contribute 👨‍👨‍👧‍👦

Thanks for taking the time to contribute!

The following is a set of guidelines for contributing to Hand Gesture Recognition and Modification. Please check out the Contribute.md . These are just guidelines, not rules, so use your best judgement and feel free to propose changes to this document in a pull request. If you have any questions, open an issue.

License

MIT © Data Science Community SRM

This project is licensed under the MIT License - see the License.md file for details

License

Made with ❤️ by DS Community SRM

About

Hand Gesture Recognition and Modification was based on transfer learning Inception v3 model using Keras with Tensorflow backend trained on 4 classes - rock, paper, scissors, and nothing hand signs. The final trained model resulted in an accuracy of 97.05%. The model was deployed using Streamlit on Heroku Paas.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published