Object Detection - Blocks, Python Functions, Projects _ PictoBlox Extension
Object Detection - Blocks, Python Functions, Projects _ PictoBlox Extension
Object Detection
Extension Description
AI to identify objects from images. It also tells the location and size of the objects identified.
Introduction
Object detection is used to locate and identify multiple objects in digital photographs. It is a computer
vision technique that helps to detect objects as well as classify them. The object class may appear once or
several times in the image. For example, in the following image, object detection assists us to locate the
objects and classify them accordingly to the known set of objects.
One of the applications of Object detection includes Self-driving vehicles which detect objects in real-time
and act accordingly.
The object detection extension in PictoBlox allows you to detect the following 90 objects:
1 person person
2 bicycle vehicle
3 car vehicle
4 motorcycle vehicle
5 airplane vehicle
6 bus vehicle
7 train vehicle
8 truck vehicle
9 boat vehicle
15 bench outdoor
ID OBJECT (PAPER) SUPER CATEGORY
16 bird animal
17 cat animal
18 dog animal
19 horse animal
20 sheep animal
21 cow animal
22 elephant animal
23 bear animal
24 zebra animal
25 giraffe animal
26 hat accessory
27 backpack accessory
28 umbrella accessory
29 shoe accessory
31 handbag accessory
32 tie accessory
33 suitcase accessory
34 frisbee sports
35 skis sports
36 snowboard sports
38 kite sports
41 skateboard sports
42 surfboard sports
44 bottle kitchen
45 plate kitchen
47 cup kitchen
48 fork kitchen
49 knife kitchen
50 spoon kitchen
51 bowl kitchen
52 banana food
53 apple food
54 sandwich food
55 orange food
56 broccoli food
57 carrot food
59 pizza food
60 donut food
61 cake food
62 chair furniture
63 couch furniture
65 bed furniture
ID OBJECT (PAPER) SUPER CATEGORY
66 mirror furniture
68 window furniture
69 desk furniture
70 toilet furniture
71 door furniture
72 tv electronic
73 laptop electronic
74 mouse electronic
75 remote electronic
76 keyboard electronic
78 microwave appliance
79 oven appliance
80 toaster appliance
81 sink appliance
82 refrigerator appliance
83 blender appliance
84 book indoor
85 clock indoor
86 vase indoor
87 scissors indoor
90 toothbrush indoor
ID OBJECT (PAPER) SUPER CATEGORY
Following is the process to add Object Detection capability to the PictoBlox Project.
4 The object detection models will be downloaded, which may take a few seconds to load.
5 Once downloaded you will get a message saying “Model loaded successfully”.
6 You can find the object detection blocks available in the project.
Accessing Object Detection in Python Coding
Following is the process to add Object Detection capability to the PictoBlox Project.
3 Next, click on the Add Modules/Libraries button and add the Face Detection extension.
4 To access the library functions, you have to add the object declaration.
od = ObjectDetection()
Read More
PictoBlox Blocks
turn () video on stage with () % transparency block controls the control the camera feed on the stage.
This block is used to set the threshold for the confidence (accuracy) of object detection, 0 being low
confidence and 1 being high confidence. With the threshold value, you can set the level of confidence
required for object detection.
Once you have analyzed the images, you can use the get # of objects block to get the number of objects
recognized in the image.
4
The () of object () block reports the following attributes of the object: class, x position, y position, width,
height, and confidence.
The is () detected? block checks whether the selected class has been detected or not. If the class is
detected, then the block returns true; else, false.
The block returns the number of objects identified with the specified object class.
3
Threshold Demonstration – Person Detection
The example demonstrates how to detect persons on the
stage with different confidence thresholds.
Python Functions
1
video()
The function is used to control the state of the camera.
Syntax: video(video_state = “on”, transparency = 1)
2
enablebox()
The function enables the automatic display of the box on object detection on the stage.
Syntax: enablebox()
3
disablebox()
The function disables the automatic display of the box on object detection on the stage.
Syntax: disablebox()
4
setthreshold()
This function is used to set the threshold for the confidence (accuracy) of object detection, 0 being low
confidence and 1 being high confidence.
Syntax: setthreshold(threshold = 0.5)
5
analysecamera()
This function is used to analyze the image received as input from the camera, for objects.
Syntax: analysecamera()
6
analysestage()
This function is used to analyze the image received as input from the stage, for objects.
Syntax: analysestage()
7
count()
This function returns the total number of objects detected in the camera feed or the stage.
Syntax: count()
8
x()
This function returns the x position of the object detected. You can specify the object for which the value
is needed. The position is mapped with the stage coordinates.
Syntax: x(object = 1)
9
y()
This function returns the y position of the object detected. You can specify the object for which the value
is needed. The position is mapped with the stage coordinates.
Syntax: y(object = 1)
10
width()
This function returns the width of the object detected. You can specify the object for which the value is
needed. The position is mapped with the stage coordinates.
Syntax: width(object = 1)
11
height()
This function returns the height of the object detected. You can specify the object for which the value is
needed. The position is mapped with the stage coordinates.
Syntax: height(object = 1)
12
classname()
This function is used to get the class name of the analyzed object.
Syntax: classname(object = 1)
13
confidence()
This function is used to get the confidence (accuracy) of object detection, 0 being low confidence and 1
being high confidence.
Syntax: confidence(object = 1)
14
isdetected()
The function returns whether the specified object is detected in the analysis or not.
Syntax: isdetected(object_name = “person”)
15
detectedcount()
The function returns whether the number of objects identified with the specified object class.
Syntax: detectedcount(object_name = “person”)
Community
Codeavour - AI Competition
Community Projects
Projects by STEMpedia
Example Projects
International Python Bootcamp
International Junior Blocks Bootcamp
International 3D and XR Studio Bootcamp
Products
Quarky - AI & Robotics Kit
Quarky Addon Kits
evive - STEM Kit
PictoBlox Software
Dabble App
School Programs
AI & Robotics Lab
Atal Tinkering Labs
STEM Innovation Lab
CBSE Aligned Coding & AI Lab
ICSE Aligned Robotics & AI Lab
Impact Programs
CSR & Government Impact Program
Learning Resources
Education Center
Courses & Teacher Resources
Product Documentation
Quarky Kits
evive Kits
PictoBlox Software
PictoBlox Extensions & Libraries
Dabble App
Arduino with PictoBlox
Get in Touch
Contact Us
Book a Demo
Request a Quote
Follow Us
Copyright 2024 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy