 Hello everyone, welcome back to our channel. I hope you all are safe and sound. You might have seen a couple of attendant system around, but the one that we are going to make today is one of its kind. In this video we are going to show you how to make a face recognition based attendant system in Pictoblox AI using Microbit. We will use one of the buttons on Microbit, that is button B, to feed a new image into our system. To scan a face, we will use the other button, that is button A. Once the system matches the face detected with the sample image, it will display the name of that person on Microbit's LED matrix and add the timestamp into the excel sheet. Pre-requisites are a laptop or a computer with latest version of Pictoblox downloaded, camera, a good internet connection, Microbit and a USB cable. You can download the all new Pictoblox from the link given in the description box below. Open Pictoblox. Now to work with the latest AI and ML extensions, you need to keep two things in mind. First, you must sign in or login into Pictoblox from here. You need to connect your computer to the internet. Now, click on the add extension button. Choose the face detection extension and wait for a little while till the models get loaded. Now to work with Microbit, connect your Microbit using the USB cable to the laptop. Click on the board button and select Microbit. To make the connection, make sure you have a scratch link installed. If not, download it from the link given in the description box below. Once the scratch link is running, click on the available Microbit connection. Now to lock the timestamp of attendance, we need to add the data logger extension. This extension lets you generate a CSV file according to your requirement and store data in it. Let's first set up the stage. Click on the choose a backdrop button and select the backdrop of your choice. Here we will be using the blue sky backdrop for the same. Now on pressing the green flag, the default backdrop that is the blue sky backdrop should come. Thus place when flag clicked block from the events palette and place switch backdrop to block below it. Make sure that blue sky is selected from the backdrop. Also we first need the camera to be turned off. Thus from the face detection palette use a turn on video on stage with 0% transparency block and choose off from the drop down menu. Now we will make Toby give instructions to the user. Thus place a say block from the looks palette. To mark the attendance, we need user to press the button A on the microbit. Thus write please press button A to mark the attendance in the space given. Now to instruct the user to press button B to feed the face to duplicate the say block and write please press button B to mark the attendance in the space given. Now we will create a new file to store the attendance data. From the data logger palette choose a create block. We will give it a name attendance 2020. We will first write the script to store the sample images of whose attendance we need to track. Let's first recognize the image from the camera feed and store them in the computer's memory. As soon as we press button B on the microbit the data should be stored on the computer's memory. Thus from the microbit palette drag and drop when B button pressed block. To analyze the image from the camera we need the camera to be on. Thus from the face detection palette place a turn on video on stage with zero person transparency block. Next we will make Toby say feeding the face thus place a say block from the looks palette. Similarly we will display feeding on the LED matrix too. Thus from the microbit palette place display text block and write feeding in it. Next we will store the images of the user into the memory. Thus from the face detection palette place add class one as stage block. Select one from the first drop down and stage from the second to identify the user as his or her name write the username into the space given. Once the face is added into the memory we'll make Toby say face added into the database using the say block from the looks palette. Next we need to turn off the camera and come back to the default backdrop. Thus from the face detection palette place a turn on video on stage with zero person transparency block and choose off from the drop down menu. Finally to come back to the default backdrop place switch backdrop to block from the looks palette and choose blue sky from the drop down. With this the script to enter the face into the memory is completed. Now let's first enter our face into the memory. Click on the green flag and press the button B on the microbit to store the face. Now let's move on to the script to mark the attendance. To execute the program whenever the button A is pressed on the microbit from the microbit palette drag and drop when a button pressed hat block. As we want to verify the image from the camera feed we will make sure that the camera is on. Thus add the turn on video on stage with zero person transparency block from the face detection palette. Add a delay of three seconds using the weight block from the controls palette. We need to match the faces on the stage thus drag and drop the two face matching on stage block. Now to store the data we will add blocks from the data logger extension. To store the timestamp place a set the data one two block and choose the current timestamp from the drop down. The get current timestamp block contains all the data and time related information. Now in the second data we will store the class of the recognized face which contains the name of the person whose face is recognized. Now that the data has been loaded but to permanently save the data onto the file we need to use the save block. Now if the faces are matched we need to print the name of the user on the led matrix. Thus from the microbit palette place display text block and drop the get class of face detected block in the space given. Also we would like to be to inform user that the attendance is marked and greet. Thus place a block from the looks palette and write attendance marked in the space given. Now to greet the user we want to be to say welcome along with the user's name. Thus duplicate this block from the operator's palette place a join block. Write welcome with the space in the first join block. Drag and drop another join block into the second input. Place get class of face detected in the first input of the second join block and write exclamation in the second input of the second join block. Finally let's switch the backdrop to the default. Thus from the looks palette place switch backdrop to block and choose blue sky from the drop-down. With this the script is complete. Let's try to mark the attendance as we have already stored the face into the memory. You can make this project with your friends and add as many faces as you want into the system. Don't forget to share your microbit creations with us in our picture blocks community on Facebook. Also if you like this video give it a thumbs up and subscribe to Stempedia and follow us on Facebook, Instagram and Twitter. Bye bye, stay safe!