[TUTORIAL] Create an Object-Recognition AI that Detects Many Objects
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.
- Sign in, and click “TRY DEEP BLOCK” button on the top right corner.
- Click create on the top right right corner of the page.
- 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.
- Click the created project.
- Add a new Category by clicking the plus button in the Categories pane.
- Click the category and click the Rename button. Change the name to queen.
- Add more categories in the following order: queen, king, pawn, knight, rook, bishop.
- You can change the color of the bounding box for each category by clicking the color picker.
- Drag image files for AI model training to the Manual pane.
- Choose the right category and click Draw mode button to draw a bounding box.
- Draw a bounding box around the chess piece by dragging.
- Do the following for all chess pieces in all the images.
- You can change the category of a box by clicking the down arrow in the Boxes pane. Boxes pane is in the left bottom.
- There is also an easier way to change the category of a box is to click the box. First click the Select Mode Button.
- And then click the box you want to change the category of.
- 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.
- When you are done drawing the correct type of bounding box for each chess piece, you’ll see images with colorful boxes like below.
- Click 2.Run on top left.
- Then, set the epochs to 50 and click the train button on top right.
- You’ll see a graph like below during the training process. Training score will increase and loss will decrease.
- When the training is done, click the predict tab on top left.
- Now, drag and drop the images you want to predict.
- Set the Threshold Score to 45 and click the Predict button on the top right.
- You’ll see that the different types of chess pieces are detected.
- You can check the color of different categories in the bottom left.
- You can clone this project from the project store. Contact us for any questions!