A step-by-step description of the code is available in Codelab on Google I/O 19. And if you want to run this example yourself, visit https://9bow.github.io/TensorflowJS-Codelab-Transfer-Learning-Image-Classifier.
This example classifies images.
-
First, connect to the site to use this example and then grant WebCam privileges. (WebCam privileges are required for learning.)
-
Take a pose or something that corresponds to each class of four (A to D) and press the
Train X
button. -
If you have studied at least once, you can see
Prediction
andProbability
at the bottom. -
If the
Prediction
is not correct or theProbability
is low, add more training data. (Step 2)
- I try to categorize the hand shape of the Rock Paper Scissors.
- A is scissors, B is a rock, C is Paper, and D is nothing.
- I train each class about fifteen or so times, and the learning result is as follows.
More Codelabs can be found at https://codelabs.developers.google.com/io2019/.
For more information on Tensorflow.js, please visit https://www.tensorflow.org/js.