1 of 21

Upper Elementary

Computer Science

Machine Learning: Face Sensing

2 of 21

Students will be able to use Face Sensing blocks to explore machine learning in Scratch Lab.

Objective

3 of 21

Data: A collection of information gathered by observations, questions, or measurements

Vocabulary

4 of 21

Artificial Intelligence (AI): the imitation or mimicking of human intelligence by machines, especially computers

Vocabulary

5 of 21

Machine Learning: a part of AI that focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy

Vocabulary

6 of 21

Artificial Intelligence or AI is the ability of a computer program or a machine to learn. AI mimics human cognition (reasoning, memory, thinking or problem-solving skills.)

What is Artificial Intelligence?

7 of 21

  • You can create projects that respond to different parts of your face.
  • These blocks can sense human faces, pet faces, hand-drawn faces, and even stuffed animal faces.

Let’s explore Face Sensing blocks!

8 of 21

  • Face Sensing blocks use your webcam to see your face.
  • They learned about faces from lots of pictures.
  • They can find your eyes, nose, ears, and mouth.

How do Face Sensing blocks work?

Let's dive deeper into how machines "learn" to recognize faces!

9 of 21

  • Machine learning is a type of AI. It helps computers recognize patterns, like faces, by learning from lots of examples.
  • Face-sensing technologies are used in many popular apps and social media platforms.

How do they use Machine Learning?

10 of 21

You will add accessories to your face and use the Face Sensing blocks to program the accessories to follow your face when you move.

Here is what we’ll make today!

11 of 21

It works best seeing faces that are brightly lit and close to the camera.

Move Scratch Cat off of your face.

Open the Scratch Lab Face Sensing site.

12 of 21

Choose a sprite that you can ‘wear’ on your face or head.

Add a sprite from the fashion tab.

13 of 21

Many sprites have several costumes to choose from.

Select the costume for the sprite.

14 of 21

The block is sensing the size of your face. What happens if you move closer and click it again?

Resize the sprite to your face size.

15 of 21

The block is sensing the location of your face. What happens if you move to the side?

Choose the location of your sprite looks best.

Move the sprite to the best location.

16 of 21

Now what happens if you move to the side?

What happens if you move back?

Add a “forever” loop to the program.

17 of 21

What happens if you move your head outside of the camera’s view and back again?

Make your program run when a face is detected.

18 of 21

What happens if you tilt your head to the left?

What happens if you tilt your head to the right?

Change the direction of the sprite.

19 of 21

What happens when your ear touches the cat sprite?

Program the cat sprite to meow.

20 of 21

  1. Choose a sprite that you can ‘wear’ on your face or head.

  • Resize the sprite to your face size.

  • Move the sprite to the best location.

  • Change the direction of the sprite.

  • Add a “forever loop” to the program.

  • Make your program run when a face is detected.

Add and program a new fashion sprite.

21 of 21

  • Test your program with a drawn face.
  • Continue exploring the Face Sensing blocks and use them to build a game.

If you have more time…