Course Content
Face detection
Learn to create motion-controlled games in Scratch using the Face Sensing Extension for engaging, hands-free interaction.
0/2
Machine Learning
Use Teachable Machine to train simple models and integrate them into creative projects, making AI concepts accessible to students.
0/2
AI In The Classroom
    About Lesson

    Using Teachable Machine Models in Scratch

    Apps used:

    1. Scratch mod with AI extensions  – https://playground.raise.mit.edu/create/

    2. Teachable Machine – https://teachablemachine.withgoogle.com/

    Introduction

    Once you’ve trained a machine learning model using Teachable Machine, it’s time to bring it to life in practical applications. This article explains how to integrate your model into Scratch, turning it into a computer vision controller for games and multimedia projects.

    Setting Up Scratch for AI Integration

    Step 1: Access the Modified Scratch Version

    • Visit Playground Raise, a modified Scratch platform with AI extensions.
    • Add the Teachable Machine extension to enable ML model integration.

    Step 2: Import Your Model

    • Use the Teachable Machine block to paste the model’s URL, generated during the training process.
    • Confirm that the model is active by checking the green light indicator.

    Building an Interactive Application

    Example: Sprite Movement

    1. Connect the Model Prediction Block:
      • Use the forever loop to display the model’s predictions (e.g., “Left,” “Right,” “Nothing”) through the say block.
    2. Add Motion:
      • Create conditions for movement:
        • If the prediction is “Left,” move the Sprite left.
        • If the prediction is “Right,” move it right.
        • If “Nothing,” reset its position.

    Extending Your Project

    • Create Games: Use gestures to control falling object games, car driving simulations, or other creative applications.
    • Enhance Conditions: Add more gestures or refine the logic for smoother interactions.

    Benefits of Using Teachable Machine with Scratch

    1. Interactive Learning: Combines coding, machine learning, and creative thinking.
    2. Ease of Use: Simplifies complex AI concepts for students of all levels.
    3. Limitless Possibilities: Encourages experimentation with multimedia projects.

    Conclusion

    By integrating Teachable Machine models into Scratch, students and educators can explore endless possibilities for creating interactive, AI-powered projects. This hands-on approach bridges the gap between AI theory and practical application, sparking creativity and innovation.