Go to https://teachablemachine.withgoogle.com/train and select “Image Project”
Select the “Standard Image Model”
Give your classes a name by clicking on the pen icon. This could be e.g. “Left Hand” and “Right Hand”. (You can add more than two classes if wanted.)
Add samples to each class by clicking the buttons Webcam or Upload.
When you’re uploading images, Teachable Machine will extract the center square and resize it to 224x224 pixels before processing it.
Click the “Train Model” button. This will calculate a model from the training data you provided. When it is done, you can see a preview of the classifier in action on the right.
Click the “Export Model” button and then the “Upload my model” button (with the default settings).
After uploading, copy the sharable link that appeared.
Open this sketch and save it under your account by clicking File > Duplicate. (If this option is not available, log into the p5.js web editor at the top-right.)
Change the URL at the top of the sketch to the one you copied.
Save and Play!