GUIDE How to Build AI Benchmarks that Evolve with your Model

VectorLabels

The VectorLabels tag is used to create labeled vectors. Use to apply labels to vectors in semantic segmentation tasks.

Use with the following data types: image.

Parameters

Param Type Default Description
name string Name of tag
toName string Name of image to label
[choice] single | multiple single Configure whether you can select one or multiple labels
[maxUsages] number Maximum number of times a label can be used per task
[showInline] boolean true Show labels in the same visual line
[opacity] number 0.2 Opacity of vector
[fillColor] string Vector fill color in hexadecimal
[strokeColor] string Stroke color in hexadecimal
[strokeWidth] number 1 Width of stroke
[pointSize] small | medium | large medium Size of vector handle points
[pointStyle] rectangle | circle rectangle Style of points
[snap] pixel | none none Snap vector to image pixels

Result parameters

Kind: global typedef
Returns: VectorRegionResult - The serialized vector region data in Label Studio format
Properties

Name Type Description
original_width number width of the original image (px)
original_height number height of the original image (px)
image_rotation number rotation degree of the image (deg)
value Object
value.vertices Array.<Object> array of point objects with coordinates, bezier curve information, and point relationships
value.closed boolean whether the vector is closed (polygon) or open (polyline)
value.vectorlabels Array.<string> array of label names assigned to this vector

Example JSON

{
  "original_width": 1920,
  "original_height": 1280,
  "image_rotation": 0,
  "value": {
    "vertices": [
      { "id": "point-1", "x": 25.0, "y": 30.0, "prevPointId": null, "isBezier": false },
      { "id": "point-2", "x": 75.0, "y": 70.0, "prevPointId": "point-1", "isBezier": true,
        "controlPoint1": {"x": 50.0, "y": 40.0}, "controlPoint2": {"x": 60.0, "y": 60.0} }
    ],
    "closed": false,
    "vectorlabels": ["Road"]
  }
}

Example

Basic labeling configuration for vector semantic segmentation of images

<View>
    <Image name="image" value="$image" />
    <VectorLabels name="labels" toName="image">
        <label value="Road" /> <label value="Boundary" />
    </VectorLabels>
</View>
Designed for teams of all sizes Compare Versions