Create an image recognition project

Here you will find the few steps to train a Teachable Machine image model and use it in your adacraft project.

In the Teachable Machine home page you will find more information about training as well as some project ideas.

Train a Teachable Machine model

Go to the Teachable Machine image project page and follow the instructions to create your image classes, add some images for each class (you can use the webcam) and train your model.

Export the model

When your model is ready, you need to export it from Teachable Machine. Click on the "Export Model" button.

Upload your model

In the next panel you will be able to upload the resulting model in a predefined Google drive location so you can use it from your adacraft project.

To do so, click on the button "Upload my model".

Get the key for your model

Now that your model is available online, to use it you need to get its key (which is "yHNp_zRXX" in this example).

Use the model in your adacraft project

You can now use the model from any adacraft project by setting the model key and using the other "Ada Vision" blocks.

The example on the left is taken from this very simple project.

Bonus: continuous detection

By default, the detection block takes only one shot and launches the prediction on it.

If you want to continuously apply the detection on the camera be sure to add a forever loop.

Frequently Asked Questions (FAQ)
How many classes do I need to define for my Teachable Machine model?

You choose, that really depends on your idea, there is no real upper limit (beside the time you will need to gather the images!).

But the model will select between several things, so be sure you have at least 2 classes.

For example if you want a model that recognizes your face, create two classes, one with images of you in front of the camera and another with images from the camera with similar backgrounds but without you. The two classes can be named "me" and "not me" for example.