How to build a Teachable Machine with TensorFlow.js

Teachable Machine

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

Up

Down

Down

Right

Right

Left

Left

The trained model:

https://youtu.be/Ibvos-bIgcE

Send Me Home

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.

https://youtu.be/Tr8aVRokNYU

https://editor.p5js.org/keyifu99/full/Arc1N700k