[TUTORIAL] Create an Object-Recognition AI that Detects Many Objects

chess piece detection

This is a tutorial article explaining how to create an object detector that can detect multiple types of objects using Deep Block.

We will create a chess piece detector that can detect different types of chess pieces.

  1. Sign in, and click “TRY DEEP BLOCK” button on the top right corner.
  2. Click create on the top right right corner of the page.
  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.
  4. Click the created project.
  5. Add a new Category by clicking the plus button in the Categories pane.
  6. Click the category and click the Rename button. Change the name to queen.
  7. Add more categories in the following order: queen, king, pawn, knight, rook, bishop.
  8. You can change the color of the bounding box for each category by clicking the color picker.
  9. Drag image files for AI model training to the Manual pane.
  10. Choose the right category and click Draw mode button to draw a bounding box.
  11. Draw a bounding box around the chess piece by dragging.
  12. Do the following for all chess pieces in all the images.
  13. You can change the category of a box by clicking the down arrow in the Boxes pane. Boxes pane is in the left bottom.
  14. There is also an easier way to change the category of a box is to click the box. First click the Select Mode Button.
  15. And then click the box you want to change the category of.
  16. Press the number key of the category you want to change the box to. For example, if you want to change the category to “rook”, since “rook” is category 5, press 5 on keyboard. You’ll see that the category has changed.
  17. When you are done drawing the correct type of bounding box for each chess piece, you’ll see images with colorful boxes like below.
  18. Click 2.Run on top left.
  19. Then, set the epochs to 50 and click the train button on top right.
  20. You’ll see a graph like below during the training process. Training score will increase and loss will decrease.
  21. When the training is done, click the predict tab on top left.
  22. Now, drag and drop the images you want to predict.
  23. Set the Threshold Score to 45 and click the Predict button on the top right.
  24. You’ll see that the different types of chess pieces are detected.
  25. You can check the color of different categories in the bottom left.
  26. You can clone this project from the project store. Contact us for any questions!

Leave a Comment