Teachable Machine

Machine learning is not as far away from our life as you think. With the Teachable Machine extension of mBlock 5, you can create a training model, instead of programming, to enable your computer to learn.

Add "Teachable Machine"

(1) Click the Sprites tab and click + extension at the bottom of the Blocks area.

(2) In the Extension center dialog box that appears, click + Add at the bottom of Teachable Machine.

(3) On the editing page, TM blocks are displayed.

Use "TM" Blocks

Let's try to use the TM blocks. Create a training model to enable Panda to learn three basic human being emotions: happy, sad, and excited.

(1) Choose TM in the Blocks area and click Training model. The Model Training page is displayed. Name the three categories to happy, sad, and excited. Click Learn for each category to add samples. After the learning is complete, click Use the model.

(2) After you create a model, new blocks are provided in the TM category.

(3) Enable Panda to recognize your emotions based on the created model.

Drag the Events block when green flag clicked and Control block if ( ) then ( ) to the Scripts area. To make Panda do something when it recognizes that you are excited, drag the TM block recognition result is()? to the Scripts area and choose excited.

(4) Enable Panda to dance and say "You're excited!" when it recognizes that you are excited.

Drag the Looks blocks say ( ) and next costume to the Scripts area, and put them in the Control block repeat ( ).

(5) The script can be executed. Click the green flag under the stage. The learning window is displayed. When recognition result is excited, Panda dances and says "You're excited!"

For more information about how to train a machine learning model, see How to Teach and Learn Modern AI: Training Machine Learning Models Through mBlock 5.

results matching ""

    No results matching ""