 Hello everyone, welcome to the Pictoblox machine learning environment tutorial series. In this tutorial we are going to learn about object detection. Object detection is one of the machine learning model types which can be trained in Pictoblox. Object detection can be used to locate and recognize objects in a given image. For example, an object detection model trained to recognize alarm clocks will locate alarm clocks in an image using bounding boxes. In this example we are going to use object detection to detect bottles and eyeglasses in a given image. However, you can pick any two objects of your choice. The two classes we will be working with are bottle and glasses. Let's get started. Open Pictoblox and select the block coding environment. Go to the machine learning environment by selecting the open ml environment option under the file tab. As we are training our models in python, it is important that we have the required dependencies. In order to download these dependencies, simply click on the gear icon on the top right of your screen and select the download dependencies option. This will download and update the dependencies required to train the model. Click on the create new project option to initialize your project. Type an appropriate name of the project and select object detection as the model type. Click on the create project button and you will see the object detection window. You will find yourself under the import tab with three options to import images. By using the webcam, by selecting the images from the computer's hard drive and by downloading the images from a repository. For this example, we will be using a webcam to capture images. You need to capture more than 25 images for object detection to work. You will be able to see all your captured images here. If you do not like an image, hover over the image and click on the delete button to delete the image. Labeling the data is crucial in object detection. Go to the vbox tab and you will see the create bounding box window. Click on the create box button and label the object. As you label more objects, class info will be updated accordingly. To label an image belonging to a class already created, click the edit button and simply click on the corresponding class. Clicking on the next button will automatically save your bounding box and label. However, make sure to press the save box button after you label the last image. Once the images are labeled, go to the image tab to review the images. Once the images are reviewed, go to the train tab. This is where we will train the model. Click on the train new model button. Make sure all the classes are selected and click on the generate data set button. Once the data set is generated, click on next. In object detection, we can work with three hyperparameters. Bad size, number of iterations and number of layers. Hover over the hyperparameters to view the description. For this example, we will be training the model for 5000 iterations with a bad size of 4. We will set the number of layers to 4. Click on create and then click on start training. Object detection is a time taking task, so please be patient while training. After the model is trained, you can view the graphs by clicking on the corresponding buttons. Go to the evaluate tab to view a comprehensive overview of your model performance. You can also view false positives and false negatives for your classes. False positives are observations from a different class that the model detects to be in the current class. False negatives are observations from the current class that the model detects to be in a different class. Now let's move to the test tab. You can test your model here either by uploading the images or by using the webcam. Use the webcam and test your model. You can alter the IOU and confidence threshold by adjusting the sliders on top to see the performance of the trained model. Click on the pick two blocks option in the export model column and pick two blocks will load your model into the block coding environment. Observe how we have blocks for the model we just trained on the blocks palette. You can click on the open recognition window block and test the model's working. Add the when flag clicked block and the forever block into the scripting area and snap them together. Add a turn video on stage with transparency block above the forever block. Select on and zero as transparency. This will make the camera feed show up on the stage. Add a set detection threshold to block and set the threshold to 0.5. Follow it up with a bounding box block and set the drop down to show inside the forever block. Add a analyze image from block and set the drop down to camera. Now go to the variables palette and create a variable named iteration. Add a set iteration to block and set the value to 1. We'll use the repeat block to recognize all the objects present in the frame. Drag a gate number of objects block inside the repeat block's iteration space. Under the repeat block add a say block. Drag a class of object block and set it to the iteration variable. Follow it up with a wait block of one second. Finally, change the iteration variable by one. Run your script by clicking on the green flag to see the project in action. There you have it, an object detection project made in VectorBlocks.