4 ms·
I recently wanted to learn how to use tf.js, so had a couple of mini-projects. The first is a minimal working example showing how to train a model in python and
by ml_basics 6y ago
I recently wanted to learn how to use tf.js, so had a couple of mini-projects. The first is a minimal working example showing how to train a model in python and then load it in javascript.
https://github.com/paruby/mnist https://github.com/paruby/mnist
The second is the classic game of snake, controlled by pointing your head in the direction you want to steer the snake.
https://github.com/paruby/snake-face/ https://github.com/paruby/snake-face/
This uses the MediaPipe Facemesh model with the device camera to work out which direction your head is pointing in.
- songzme 6y agoI have a hard time sorting through the ml logic vs the game logic, it would really help my learning (and others too) if the game logic was decoupled from the ml logic into 2 separate files.