Intermediate

Image Labeling

Learn to create bounding boxes, polygons, segmentation masks, and keypoints for computer vision tasks using Label Studio's powerful image annotation tools.

Object Detection with Bounding Boxes

Bounding boxes are the most common annotation type for object detection models like YOLO, Faster R-CNN, and SSD. Draw rectangles around objects to define their location.

XML - Bounding Box Template
<View>
  <Image name="image" value="$image" />
  <RectangleLabels name="label" toName="image">
    <Label value="Car" background="#FF0000" />
    <Label value="Person" background="#00FF00" />
    <Label value="Bicycle" background="#0000FF" />
    <Label value="Traffic Light" background="#FFFF00" />
  </RectangleLabels>
</View>
Keyboard shortcuts: Use number keys (1, 2, 3...) to quickly switch between labels. Press Ctrl+Z to undo, and Space to submit the annotation and move to the next task.

Polygon Annotation

Polygons provide precise outlines for irregularly shaped objects. Click to place vertices around the object boundary:

XML - Polygon Template
<View>
  <Image name="image" value="$image" />
  <PolygonLabels name="label" toName="image"
                 strokeWidth="3" pointSize="small"
                 opacity="0.5">
    <Label value="Building" background="#FF6B6B" />
    <Label value="Road" background="#4ECDC4" />
    <Label value="Vegetation" background="#45B7D1" />
  </PolygonLabels>
</View>

Semantic Segmentation with Brush Tool

For pixel-level segmentation tasks, use the brush and eraser tools to paint masks directly on the image:

XML - Segmentation Template
<View>
  <Image name="image" value="$image"
         zoom="true" zoomControl="true" />
  <BrushLabels name="label" toName="image">
    <Label value="Sky" background="#87CEEB" />
    <Label value="Ground" background="#8B4513" />
    <Label value="Object" background="#FF6347" />
  </BrushLabels>
</View>

Keypoint Detection

Keypoints are used for pose estimation, facial landmarks, and other point-based annotations:

XML - Keypoint Template
<View>
  <Image name="image" value="$image" />
  <KeyPointLabels name="kp" toName="image"
                  strokeWidth="2">
    <Label value="Nose" background="#FF0000" />
    <Label value="Left Eye" background="#00FF00" />
    <Label value="Right Eye" background="#0000FF" />
    <Label value="Left Shoulder" background="#FF00FF" />
    <Label value="Right Shoulder" background="#FFFF00" />
  </KeyPointLabels>
</View>

Image Classification

For whole-image classification (not localization), combine the Image tag with Choices:

XML - Multi-Label Classification
<View>
  <Image name="image" value="$image" />

  <!-- Single-label classification -->
  <Choices name="scene" toName="image"
           choice="single">
    <Choice value="Indoor" />
    <Choice value="Outdoor" />
  </Choices>

  <!-- Multi-label classification -->
  <Choices name="tags" toName="image"
           choice="multiple">
    <Choice value="People" />
    <Choice value="Animals" />
    <Choice value="Vehicles" />
    <Choice value="Nature" />
  </Choices>
</View>

Combined Templates

You can combine multiple annotation types in a single template. For example, detect objects AND classify the whole image:

XML - Combined Detection + Classification
<View>
  <Image name="image" value="$image" />

  <Header value="Draw bounding boxes around objects" />
  <RectangleLabels name="objects" toName="image">
    <Label value="Car" />
    <Label value="Person" />
  </RectangleLabels>

  <Header value="Classify the scene" />
  <Choices name="scene" toName="image">
    <Choice value="Urban" />
    <Choice value="Rural" />
    <Choice value="Highway" />
  </Choices>
</View>
Performance tip: For large images, enable the zoom and zoomControl attributes on the Image tag. This allows annotators to zoom in for precise labeling without sacrificing speed.

What's Next?

In the next lesson, we will explore text labeling — named entity recognition, text classification, sentiment analysis, and relation extraction.