Making Annotations With The Bounding Box Tool

Using The Bounding Box Annotation Tool For Object Detection

Using a bounding box creation tool can be overwhelming the first few times you do it. When you make annotations with the bounding box creation tool you’ll want to familiarize yourself with the tool and pay attention to certain considerations. Let’s go over considerations for using the bounding box creation tool, so that you can better understand how to make the best bounding boxes.

Why Annotate Images?

In order for computer vision systems and applications to be able to recognize objects, they must be trained on a large amount of image data. Sample images of the objects that the designers are interested in classifying are collected and compiled into a dataset, which is then fed into the machine learning system. The system then takes these images and analyzes them for relevant patterns, which it will use to recognize objects when presented with new images, images it hasn’t seen before.

When preparing the data used to train an image classifier, the target objects in images can be annotated. Image annotation is the process of adding metadata to an object, and this metadata assists the image classification system in discriminating objects from other objects in the surrounding image. Image annotation is done because it can greatly enhance the accuracy of classification algorithms, especially when compared to unsupervised classification algorithms. 

There are a variety of different image annotation techniques. Semantic segmentation is one annotation technique that applies a class to every pixel in a semantically defined region. This leads to pixel-level classification accuracy. However, while semantic segmentation may be one of the most accurate forms of image annotation, it’s often possible to get excellent results by using another, a less time-consuming form of annotation. The bounding box is the most common form of image annotation, and it is relatively quick and easy to create in comparison to other types of image annotation.

Understanding The User Interface And Bounding Box Creation Tool

The elements of the user interface have labels on them that will help you understand what they do. You can also often hover your cursor over a button on the interface to see what the button does. You can use one of the image annotation tools by clicking on the associated button, which will activate the tool. There are also often keyboard shortcuts that you can use to activate a feature, instead of having to navigate to the toolbar with your cursor every time you wish to use a tool. 

When you click in a position to start a bounding box, the box can be resized by dragging it around the screen. You’ll want to drag the box outwards until the object that you are trying to annotate has been encased within the box. If you have made a mistake and want to delete a box, you can do that as well. The quickest way to familiarize yourself with the bounding box is to experiment with it, as often the best way to learn is simply to do.

However, while you are getting familiar with the image annotation tool, there are a few things you’ll want to keep in mind.

Considerations For Drawing Good Bounding Boxes

You need to pay attention to the parameters of the bounding box that you are creating. There are at least four parameters you need to pay attention to. The “X” and “Y” values of the bounding box define wherein the image your bounding box has started and how far the bounding box has moved. You can calculate the size of your bounding box by taking the difference between the starting X and Y values and the ending X and Y values.

Meanwhile, the “width” and “height” of the bounding box simply reflect how far from the point of origin your bounding box has gone. The width and height are what you calculate by finding the difference between X and Y values, and these values shouldn’t greatly exceed the edges of the object you are encasing within the box. 

When you draw bounding boxes, a good heuristic to follow is having the top, bottom, right, and left boundaries of the object you are annotating touch the sides of your bounding box. This helps make the object fits perfectly inside the bounding box. Bounding boxes can be both too loose and too tight, so you want to make sure that the box is between the two extremes and just right.

A box is considered too loose when there is too much distance between the object and the edges of the bounding box, which leads to unnecessary parts of the image background showing through within the box. Boxes are considered too tight when parts of the object are outside of the boundaries of the box. 

Don’t worry if bounding boxes overlap with one another, that’s totally fine. As long as the boxes are properly drawn and annotated the classifier shouldn’t be impacted by overlapping bounding boxes. However, if many objects in the same image need to be annotated the proliferation of bounding boxes can become confusing to the annotator. If this happens, be sure that the edges of the bounding box are surrounding the correct objects, and that you haven’t become confused about which boxes belong to which objects. If hiding non-active bounding boxes is possible, this is encouraged as it will clear up the image and make the process of annotating multiple objects in an image much easier.

After the bounding boxes are drawn, you will need to attach a label to the bounding box. The label of the box needs to match the class of the item. Some objects may be very similar to other objects but be part of different classes. If you are confused about what class an object belongs to, you can reach out and ask a supervisor for their input about which class the object should be put in.

Summing Up

To sum up, when creating annotations with the bounding box tool, pay close attention to the parameters of the bounding box that you are creating. You also need to ensure that the bounding boxes you create are neither too loose or too tight. In addition, make sure that the bounding boxes are given the proper annotations, with the correct class label applied to them.