Professional Documents
Culture Documents
AIBot With Scratch 09
AIBot With Scratch 09
Learning Goal
Problems are solved based on standards A.I(program) decides on its own how to
set by human solve the problem.
www.jinirobot.com 3
1. A.I – Various A.I Technologies
Artificial Intelligence
Machine Learning Neural Network
Technology that implements
human intellectual abilities, Technology that improves A.I
Technology to process
such as cognition and learning, performance by allowing
information using an
through computers computers to learn on their own
artificial neural network
similar to human neurons
www.jinirobot.com 4
1. A.I – Machine Learning
Machine Learning
This is
elephant giraffe
That is
www.jinirobot.com 5
1. A.I – Example of Supervised Learning
Find 100 pictures of dogs and cats on the Internet and After taking a picture of the cat,
[Problem] input them. And then tell the program whether each is a enter it into the program
Classify between dog or a cat. (Learning data)
Actually
Classify a computer
Between program
dogs and
cats.
This is a ‘cat’.
This is a
cat.
The process of telling the program that this is a ‘dog’ and this is a ‘cat’
is called the ‘learning process’.
www.jinirobot.com 6
2. [Experiential Program] Preview
[1] Let's look at the process of classifying red block and blue block. (No coding.)
[2] When the IBot camera recognizes a block, ABot classifies the block by color based on
an artificial intelligence learning model.
www.jinirobot.com 7
3. Think about Algorithem
1 | Connect the image model of the teachable machine and broadcast a ‘image recognition’ message.
www.jinirobot.com 8
4. Create an Image Model with a Teachable Machine
✓ Search for “teachable machine” on Google ✓ Select ‘Open an existing project from a file’
✓ Or enter the address directly in address bar Download the project file from ‘www.jinirobot.com’
( https://teachablemachine.withgoogle.com/ )
www.jinirobot.com 9
4. Create an Image Model with a Teachable Machine
www.jinirobot.com 10
4. Create an Image Model with a Teachable Machine
✓ Upload the A.I model. Then copy and save your shareable link address.
※ The copied link will be used in Scratch, so be sure to copy it to a notepad, etc.
www.jinirobot.com 11
5. Teachable Machine in Scratch
✓ Classifies images taken with a webcam using the image project model trained on Google's Teachable Machine.
✓ Classifies sounds taken from a microphone using the audio project model trained on Google's Teachable Machine.
1 Add Extention
www.jinirobot.com 12
6. Use Learning template
Click ‘English
1 3
in upper menu bar
4
2 Click & download
[download file]
www.jinirobot.com 13
7. Ready to Code
③ 1 Sprite
- Adjust position and size
②
2 Variables [recognition]
- A variable to save the image classification results(image labels)
using the trained model.
www.jinirobot.com 14
7. Ready to Code
4 Broadcast and Receive message
3 ok
When the message is received, the connected blocks below will run.
Broadcast message selected from the list and wait until the blocks finish running.
www.jinirobot.com 15
8. Process of A.I Object Classification
1 The process of classifying objects
1. The program prepares the 2. Recognize the block placed ] 3. Classify blue blocks to the right
camera for use in the center of the floor. and red blocks to the left.
www.jinirobot.com 16
8. Process of A.I Object Classification
2 When it’s difficult to hold an object : Change the target position for holding the object.
1st-axis ?? degree
2nd-axis ?? degree
1st-axis 90 °
3rd-axis ?? degree
2nd-axis 12 °
3rd-axis 54 °
※ When it’s difficult to hold an object, change the target position
to the angle values you obtained in <Mission 1 of lesson 8>.
www.jinirobot.com 17
9. Coding: Object Classification
Step.1 First, Connect the training model link and broadcast ‘image recognition’.
①
②
③
② Link to object classification training model copied from the teachable machine.
www.jinirobot.com 18
9. Coding: Object Classification
Step.2 When the ‘image recognition’ message is received and an object is recognized,
the ‘object classification’ message is broadcast.
①
① Receiving the 'Image Recognition’ message,
②
② Get ready to recognize and classify objects
③
③ Broadcast ‘object classification’ message
www.jinirobot.com 19
9. Coding: Object Classification
Step.3 When you receive the 'object classification' message, check the image label
again and state the classification result.
①
① Receiving the ‘object classification’ message,
www.jinirobot.com 20
9. Coding: Object Classification
Step.4 Say the classification result of the block and lift up the block to classify it.
www.jinirobot.com 21
9. Coding: Object Classification
Step.5 Sort the block by color and place it on the left or right.
www.jinirobot.com 22
10. Full Code
www.jinirobot.com 23
10. Full Code
www.jinirobot.com 24
10. Full Code
www.jinirobot.com 25