logofirst
logofirst GitHub

Object Detection with Bounding Boxes

If you want to perform object detection, you need to create a labeled dataset. Use this template to add rectangular bounding boxes to images, and label the contents of the bounding boxes.

Interactive Template Preview

Labeling Configuration

<View>
  <Image name="image" value="$image"/>
  <RectangleLabels name="label" toName="image">
    <Label value="Airplane" background="green"/>
    <Label value="Car" background="blue"/>
  </RectangleLabels>
</View>

About the labeling configuration

All labeling configurations must be wrapped in View tags.

Use the Image object tag to specify the image to label:

<Image name="image" value="$image"/>

Use the RectangleLabels control tag to add labels and rectangular bounding boxes to your image at the same time. Use the Label tag to control the color of the boxes:

<RectangleLabels name="label" toName="image">
  <Label value="Airplane" background="green"/>
  <Label value="Car" background="blue"/>
</RectangleLabels>

Enhance this template

Add descriptions to detected objects

If you want to add further context to object detection tasks with bounding boxes, you can add some per-region conditional labeling parameters to your labeling configuration.

For example, to prompt annotators to add descriptions to detected objects, you can add the following to your labeling configuration:

<View visibleWhen="region-selected">
  <Header value="Describe object" />
  <TextArea name="answer" toName="image" editable="true"
            perRegion="true" required="true" />
  <Choices name="choices" toName="image"
           perRegion="true">
    <Choice value="Correct"/>
    <Choice value="Broken"/>
  </Choices>
</View>

The visibleWhen parameter of the View tag hides the description prompt from annotators until a bounding box is selected.

After the annotator selects a bounding box, the Header appears and provides instructions to annotators.

The TextArea control tag displays an editable text box that applies to the selected bounding box, specified with the perRegion="true" parameter. You can also add a placeholder parameter to provide suggested text to annotators.

In addition, you can prompt annotators to provide additional feedback about the content of the bounding box, such as the status of the item in the box, using the Choices tag with the perRegion parameter.