How to build a Teachable Machine with TensorFlow.js
I played around with Teachable Machine to create a game. I fed the model four categories of images, each category is about a specific gesture I did. After training the model, it could recognize or classify new examples in real-time.
Up
Down
Right
Left
The trained model:
Then I imported this model into a p5 sketch. To control the moving direction of the target in my game, I assigned each category to a corresponding direction control. This allowed me to implement a responsive and engaging gameplay experience.
Finally, it looks like this.