Table of Contents

How to use the AI Object Finder in PictoBlox

Example Description
Learn how to build an AI-powered Object Detection and Counting System using PictoBlox and the Object Detection extension. In this beginner-friendly Grade 7 STEM AI project, you'll use your webcam to detect objects in real time, count the total number of detected objects, and identify each object by its class name. Using simple drag-and-drop block coding, the program displays the object count on the screen and announces the name of every detected object. This hands-on tutorial is perfect for learning AI object detection, computer vision, and machine learning concepts with PictoBlox.

Introduction

Have you ever wondered how smart cameras, self-driving cars, and security systems can recognize and count objects automatically? These intelligent systems use Artificial Intelligence (AI) and Computer Vision to identify objects in images and videos.

In this exciting AI project, you will use PictoBlox‘s Object Detection feature to detect and count objects visible through your webcam. The AI model analyzes the camera feed, determines how many objects are present, and identifies each object’s class (such as person, bottle, chair, laptop, etc.).This project introduces you to the fascinating fields of Artificial Intelligence, Computer Vision, Object Detection,  and Automation. 

Prerequisites

  1. Computer/Laptop
  2. Webcam (Built-in or External)
  3. PictoBlox Installed

Setting Up the AI Extension 

  1. Open PictoBlox.
  2. Create a new project.
  3. Click on the Add Extension button.
  4. Select the Object Detection  Extension.
    Object Detection Extension
  5. Ensure your webcam is connected and working properly.
  6. Save your project before starting.

Now your AI Object Detection environment is ready. 

Block-by-Block Guide

Initialize the Program and Start the Camera

When the Green Flag is clicked, the program starts running.

  1. Add the When Green Flag Clicked block.
  2. Add the Go To x: -180 y: -100 block to position the sprite on the stage.
  3. Add the Turn On Video On Stage with 0% Transparency block.
    turn on video on stage with 0 transparency

This activates the webcam and displays the live camera feed clearly on the stage for object detection.

Analyze the Camera Feed and Count Objects

The AI model scans the camera image and detects all visible objects.

  1. Add the Analyse Image From Camera block.
  2. Create a variable named Objects.
  3. Add the Set Objects to 0 block to initialize the counter.
  4. Add a Say block with the Get # of Objects reporter block and join it with the text “Object Detected”
    get objects from using object finder in ai object finder

Process Each Detected Object

The program now identifies every detected object one by one.

  1. Add a Repeat Until block.
  2. Set the condition as:

Objects = Get # of Objects

  1. Inside the loop, add the Change Objects by 1 block.

This loop continues until all detected objects have been processed.
complete code for ai object finder

Display the Name of Each Object

Inside the Repeat Until loop:

  1. Add a Say block.
  2. Join the text:

“Object” + Objects + “is” + Class of Object (Objects)

The AI system announces the class(name) of every detected object, allowing users to see both the number of objects detected and what each object is.

complete code for ai object finder with last stage

Output

ai object finder output
Conclusion

Congratulations! You have successfully built an AI Object Finder using PictoBlox and Artificial Intelligence.

In this project, you:

  1. Activated and displayed a live webcam feed
  2. Used AI-based object detection to analyze images
  3. Counted the total number of detected objects
  4. Identified each object individually
  5. Displayed object names using variables and loops
  6. Learned the basics of Computer Vision and AI-powered recognition

These concepts are widely used in smart surveillance systems, autonomous vehicles, inventory management, smart retail stores, robotics, and industrial automation. By completing this project, you have taken an important step into the world of Artificial Intelligence and Computer Vision, where machines can see, understand, and interact with the world around them.