[TUTORIAL] Apple Detecting AI Tutorial

This is a tutorial article explaining how to use the object detection application in Deep Block.

  1. Sign in, and click “TRY DEEP BLOCK” button on the top right corner.
     try deep block button
  2. Click create on the top right right corner of the page.
    image of console
  3. You will see the below window. Click the Object Detection application under Computer vision tab. Choose not for real-time reference. Set the project name as you want. There shouldn’t be any space in the name.
    new project dialog
  4. Click the created project.
    project created in console page
  5. Now we will create the category “apple”. You can think of categories as different types of objects you want to detect with the AI model. You will see the Categories pane on the top left side. Click the create category button, which is the plus shaped button.
    categories pane
  6. You can edit the category name by clicking the rename button. Rename it to apple.
    categories pane rename category
  7. You can also set the color of the bounding box by clicking the color palette. click color palette of apple category
  8. We will set it to red.
    click red in color picker
  9. Now we will prepare images with apples in it and draw a bounding box around each apple so we could use that as the AI model training data.
  10. Drag and drop the images you want to train the AI model on to the Manual pane under the Categories pane.
    drag apple images to manual pane
  11. Click the first image in the Manual pane and then click the Draw Mode button. Now you can draw the bounding box around the apple.
    click draw mode button
  12. Draw the bounding box around the apple like below.
    draw bounding box around the apple in the image
  13. If you want to edit the box you already drew, click the Select Mode button and then you can adjust the boundaries.
    click select mode button
  14. Repeat this for all of the images. Draw multiple boxes in the image if there are multiple apples in one image.
  15. When you are done preparing the training data, you can now train the AI model. Click 2. Run on the top left. Then click the train button on top right.
    click run button
  16. You will see a graph that changes as the model gets trained. If you see the training score go up and loss going down, it means your AI model is being trained properly. It may take a while. You can leave the browser, since the work will continue to run in our cloud.
    training score increasing in graph during training
  17. When the training is finished, you can infer using the AI model. In other words, you can input new images to the AI model to predict where the apples are in the images.
  18. Click Predict tab on the top left.
    click predict tab
  19. Drag and drop image you want to predict in the Predict pane in the left.
    drag apple images to predict pane
  20. Set the Threshold score to 30% and click the Predict button on the top right.
    click predict button on top right
  21. Wait until the prediction is finished and then click the image file in the Predict pane. You will see that the apple is detected!
    apple image with prediction box
  22. Congratulations! Now you know how to create an object detection AI model in Deep Block. We also provide API services. Please contact us if you have any questions or if you are interested in API services.

Leave a Comment