- Output:
- Browse images from your system and try out the image recognition model!
- 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 loss versus the number of epochs:
-
Pre-requisites:
- The software requirements are listed in the requirements.txt file.
-
Installation
< mkdir -p ~/.streamlit/
echo "\
[server]\n\
headless = true\n\
port = $PORT\n\
enableCORS = false\n\
\n\
" > ~/.streamlit/config.toml >
-
Execution:
- https://rps-streamlit-app.herokuapp.com/
- The program can be quit by hitting ‘Q’.
< web: sh setup.sh && streamlit run app.py >
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.
MIT © Data Science Community SRM
This project is licensed under the MIT License - see the License.md file for details
Made with ❤️ by DS Community SRM