ML with Teachable Machine

Teachable-Machine
Extension Description
Learn how to use ML with the Teachable Machine Extension in PictoBlox. Discover how to train custom image models online, load them via a shareable link, and use them for image classification in your block coding projects.

Introduction

The ML with Teachable Machine Extension allows users to bring custom-trained Machine Learning models into their PictoBlox projects. By leveraging Google’s Teachable Machine platform, users can easily gather image samples, define custom classes, and train an image classification model.

Once trained, the model can be imported directly into PictoBlox using a shareable cloud link to recognize objects, gestures, or scenes using the computer’s webcam.

Accessing the Teachable Machine Extension in PictoBlox

The following is the process to train a custom model and add it to your PictoBlox Project:

Step 1: Open PictoBlox and select the Block Coding environment.

Select Block Coding in Pictoblox

Step 2: Click on Add Extension from the Blocks Palette.

Step 3: Search for Teachable Machine and select the extension.

Teachable machine extension selection

Step 4: In the Teachable Machine block palette, click the Create a Model button. This will redirect you to the Teachable Machine website.

Click on create model in teachable machine extension

Step 5: Select Image Project and then choose Standard image model.

Select Image Project then choose Standard image model

Step 6: Create your classes (e.g., “Class 1”, “Class 2”). Click on Webcam or Upload to add image samples for each class.

Step 7: Once you have added enough data for both classes, click on the Train Model button.

Step 8: Click Export Model in the Preview panel.

Create class then upload samples and then click on train model

Step 9: Then choose Update my cloud model. Once the upload is complete, copy the sharable link from the pop-up window.

Update my cloud model

 

Step 10: Return to PictoBlox and click the Load a Model button. Paste the copied link into the prompt and click Load.

paste and load teachable model in pictoblox

Your model will successfully load into PictoBlox.

image model extension teachable model loaded success

Teachable Machine Setup Buttons

Teachable machine model option

Create a Model: Clicking this button opens the Teachable Machine website in your browser, allowing you to start training a new image classification model.

Load a Model: Prompts you to paste the shareable link from Teachable Machine to import your trained model into the project.

Refresh Model: Reloads the currently linked model. Use this if you have made updates to your model on the Teachable Machine website and updated the cloud link.

Read More

PictoBlox Blocks

Open a separate, dedicated window on your screen to display the live camera feed and the real-time classification results of your model.
A reporter block that contains a dropdown menu of the specific classes you defined in your Teachable Machine model (e.g., “Left”, “Right”).
A reporter block that returns the URL or specific metadata information regarding your loaded model.
A Boolean block that checks the live camera feed. It returns true if the camera currently detects the specified class, and false otherwise.
A reporter block that analyzes the camera feed and returns the exact name of the class that the model currently recognizes.
A reporter block that returns the confidence score of a specified class based on the current camera feed. This is useful for triggering actions only when the model is highly certain of what it sees.
A stack block that turns the live webcam feed on or off directly on the PictoBlox stage. You can also adjust the transparency level (e.g., 0 for fully visible, 100 for completely transparent).
All articles loaded
No more articles to load
Table of Contents