Scratch Lab
Face Sensing BlocksHelp
File
Edit
Give Feedback
  • Code
  • Costumes
  • Sounds
Motion
Looks
Sound
Events
Control
Sensing
Operators
Variables
My Blocks
next backdrop25changecoloreffect by0setcoloreffect toclear graphic effectsbackdropnumberstop all sounds10changepitcheffect by100setpitcheffect toclear sound effects-10change volume by100set volume to%whenclickedwhenspacekey pressed10whenloudness>1waitseconds10repeatforeverifthenifthenelsewait untilrepeat untilanswerspacekeypressed?mouse down?mouse xmouse yloudnesstimerreset timercurrentyeardays since 2000username  +  -  *  /110pick randomto 50> 50< 50=andornot  mod round absof10movesteps15turndegrees15turndegreesrandom positiongo to00go to x:y:1random positionglidesecs to100glidesecs to x:y:90point in directionmouse-pointerpoint towards10change x by0set x to10change y by0set y toif on edge, bounceset rotation styleleft-rightx positiony positiondirectionHello!2sayforsecondsHello!sayHmm...2thinkforsecondsHmm...thinkcostume2switch costume tonext costumebackdrop1switch backdrop to10change size by100set size to%showhidego tofrontlayer1goforwardlayerscostumenumbersizeMeowplay sounduntil doneMeowstart soundvolumewhen this sprite clickedwhen backdrop switches tobackdrop1when I receivemessage1message1broadcastmessage1broadcastand waitstopallwhen I start as a clonemyselfcreate clone ofdelete this clonemouse-pointertouching? touching color?  coloris touching?mouse-pointerdistance toWhat's your name?askand waitset drag modedraggableStagebackdrop #ofapple bananajoin1appleletterofapplelength ofappleacontains?my variable0setmy variableto1changemy variablebyshow variablemy variablehide variablemy variableMotionLooksSoundEventsControlSensingOperatorsVariablesMake a VariableMake a ListMy BlocksMake a Block
Switch to small stage
Switch to large stage
Enter full screen mode
Sprite1
duplicate
export
delete
Stage
Backdrops
1
Face Sensing
Make animated costumes and games that interact with your face.
Updated Feb 2, 2021
Learn More

Exploring a Creative, Safe Introduction to Machine Learning

Read about our process for designing the Face Sensing blocks as a responsible use of machine learning technology for children.

Go to blog post
Things to Try

Make a sprite follow your nose

Does it see you?

What else does it see as a face?

Starter Projects

Hat and Glasses

Create your own wacky costumes and face filters

Flapping Bird

Make the bird fly by moving your head

Sound Board

Move your mouth to each sprite to play a sound

Questions
Is Face Sensing private?
When you are using the Face Sensing blocks, only your computer can sense your face. None of your data is stored or sent to Scratch or any other site.
Why doesn’t it always sense my face?
The technology behind the Face Sensing blocks is not perfect. It is best at seeing faces that are brightly lit and close to the camera. It will often recognize faces even if they are partly hidden by a mask, glasses, hat, headscarf, or other covering. It does not do well at seeing faces that are far away, in the dark, or hidden.
Does it work with photos or drawings of faces?
The Face Sensing blocks can detect faces in photos, and even in drawings. You can try making a smiley face drawing and holding it up to the camera to see if it works.
Is it learning?
The Face Sensing blocks detect faces using a technology called “machine learning,” but it is not learning while you use it. It has already been trained to see faces using a large number of photos of faces.
Does Face Sensing work on all computers?
While Scratch Lab is experimental, our goal is to make Face Sensing work on all devices and web browsers supported by Scratch. Currently, it may not work on some iOS or Android devices. It may run slowly on some Chromebooks or older computers.
What can I do if Face Sensing seems slow or laggy?
Face Sensing may run slowly on some computers. You can try closing other applications and other browser tabs. If you are using your webcam in another app while Face Sensing is running—for example, a video call—try turning off your camera in that app.
What if my camera is not working?
When you load the Face Sensing blocks, you should see video from your computer camera on the Scratch stage. If it doesn’t appear, you may need to give Scratch permission to use your camera. Click “allow” when Scratch prompts for permission to use the camera, or check your web browser’s settings.
What is Scratch Lab?
This is an experimental version of the Scratch editor, where the Scratch Team is testing out new blocks on Scratch. We’re sharing this work in progress so we can get feedback to help us improve it. Learn more about Scratch Lab.
When will these blocks be on Scratch?
We’re still exploring, gathering feedback, and revising this extension before we decide if it might go into the main Scratch site. Some Scratch Lab blocks may never make it to Scratch.
Can I save my Scratch Lab projects?
Yes, you can download projects you create with Scratch Lab to your computer, and load them back into the same Scratch Lab editor.
Can I upload Scratch Lab projects to my regular Scratch account?
No. You cannot upload Scratch Lab projects to your regular Scratch account, or share them on the Scratch community.
Scratch Lab is a place for the Scratch Team to explore, share, and gather feedback on new features for Scratch.
Start creating with Scratch