I have used again the magic of Google to train a visual machine learning model and turn everything into a classic game for my kids: Rock Paper Scissors.
Open your webcam and grab some picture for every class:
- 👊 0 = Rock
- 🤚 1 = Paper
- ✌️ 2 = Scissors
- None = a default class
In less than 1 min you will have your model ready for testing.
Do some testing
Grab the snippet code generated and let's create the game.
Mix all things together. Add some sounds with Minions (winning/losing part).
If everythings Ok... then upload all code on github and host the game on firebase hosting. When playing, I recommand using a "white background" or (re)train with better images, export the model and then replace line 145: const URL = "https://teachablemachine.withgoogle.com/models/l02IbpV7q/"; from index.html with your model url.
Enjoy it.