For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bounding Box

Overview of the Bounding Box labeling tool in Ango Hub

The bounding box labeling tool allows you to draw a box around an object or point of interest in an image. It also allows you to perform OCR on the area marked by the box.

The Bounding Box tool is supported across the Image, Video, DICOM, and Medical labeling editors.

How to add a Bounding Box tool to your project

From the project’s Settings tab, enter the Label Set section.

Click on Add Category. From the list that appears, click on Bounding Box.

A new row will appear named Bounding Box. Click on it to expand it.

Schema ID: A unique ID which identifies this class in your project.

Title: The name of your class.

Required: Whether or not annotators have to add at least one instance of this class in order to submit their annotation task.

Targeted OCR: By enabling this, you will be able to perform OCR and get the OCR results in the exports for the areas highlighted by the bounding boxes belonging to this class.

If you would like to ask labelers further questions, for example, if you want to show a further radio after drawing the bounding box, click on Add Classification and add a further question. More on nested questions here.

How to Draw a Bounding Box

Click on the image where you’d like the bounding box to start. Click again where you’d like the bounding box to end.

After creating the box, you can change its size by selecting it by clicking it, then dragging on its points. You can drag the entire bounding box by selecting it then dragging it with the mouse cursor.

Move and Resize Bounding Boxes with the Keyboard

Select a bounding box, then use the following shortcuts. On macOS, use Option in place of Alt.

Action
Shortcut

Move the box one image pixel in any direction

Alt + Arrow key

Expand the box horizontally

Ctrl + Alt + Right arrow

Shrink the box horizontally

Ctrl + Alt + Left arrow

Expand the box vertically

Ctrl + Alt + Up arrow

Shrink the box vertically

Ctrl + Alt + Down arrow

Resizing adjusts both opposite edges by one image pixel. For example, expanding horizontally moves the left edge left and the right edge right. Edges stop at the image boundary.

Hold Shift with any of these shortcuts to make larger adjustments. The size of the larger adjustment depends on the current zoom level.

You can select multiple boxes to move or resize them together. Locked boxes are not changed. These shortcuts are not available for NRRD or NIfTI series, in read-only tasks, or while drawing an annotation.

How to Add a Halo around Bounding Boxes

To add a visual "halo" around bounding boxes, in the labeling editor, click on the quick settings icon, then on "Enable Halo Box". Enter the Halo Box Margin in pixels.

This halo box is purely visual and has no impact on the final export.

Perform OCR on the contents of the bounding box

Hub allows you to perform OCR on the contents of bounding boxes, both single and in bulk.

To do so, when adding your bounding box class to your project, enable the Targeted OCR toggle as mentioned in this section.

On a Single Bounding Box

Once you are in the labeling editor, draw a bounding box over the text you'd like to perform OCR on. Then, right-click on the box and expand the context menu. This is what you should see:

Click on thebutton to perform OCR on the area highlighted by the box. The OCR results will appear in the context menu, together with how confident our OCR module is about the OCR results:

On Multiple Bounding Boxes

In the labeling editor, press Shift and click on the bounding boxes you'd like to perform OCR on. Once you have selected all boxes, right click on any one of them and click on Run OCR.

To see the OCR results, right-click on a box and expand the context menu that appears. Alternatively, expand the rows in the Objects section in the lower-left corner of the UI.

3D Bounding Box Tool in Medical Labeling Editor

Last updated