Table of Contents

Polyline

Alex Cota Updated by Alex Cota

Polyline annotations are continuous lines made of one or more line segments and the entire line is treated as one object. Polylines are typically used to annotate open shapes, since they don’t have to be closed like polygons do.

Configuring the Polyline tool

Setup steps
  1. Create a project.
  2. Select "Editor" as your label editor.
  3. Click "Add Object" and name your object.
  4. Select "Polyline" as your labeling tool.
  5. [OPTIONAL] Configure nested classifications.
  6. Click "Confirm".
  7. Click "Complete setup".

Nested classifications

Any existing classification tools can be nested within the tool to capture metadata about the label. The example below demonstrates how to nest a single-choice radio question within a polyline object.

Creating instances

From the labeling interface, you can use the same class for more than one annotation. For example, if there are three tree branches in an image and you would like to assign the "tree branch" class to all three, you can create multiple instances of the "tree branch" class.

Follow these steps to create multiple instances of the same object:

  1. Select a class and draw the object.
  2. Select the same class again.
  3. Draw the next instance of the object.

Label format

Polyline labels can be imported as an existing label or a model prediction. They can also be exported in JSON format. The coordinates in the geometric key are in the clockwise direction.

"Label": { 
"objects": [
{
"featureId": "ck9bmejeu00c20ya10woo1ml5",
"schemaId": "ck9blmq1lnlxx088964dfy107",
"title": "sample-polyline",
"value": "sample-polyline",
"color": "#FFFF00",
"line": [
{
"x": 328.535,
"y": 308.215
},
{
"x": 613.242,
"y": 735.277
},
{
"x": 958.026,
"y": 907.668
},
{
"x": 1352.437,
"y": 905.056
}
],
"instanceURI": "https://api.labelbox.com/masks/feature/ck9bmejeu00c20ya10woo1ml5?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjazhwNTVueDYzdG45MDgxMWM3Z3p6dXYyIiwib3JnYW5pemF0aW9uSWQiOiJjamhmbjV5NnMwcGs1MDcwMjRuejFvY3lzIiwiaWF0IjoxNTg3NTc3MTI3LCJleHAiOjE1OTAxNjkxMjd9.U5wynJzDMe3ReL71CTzTZO7aojp1GI2TzaIpNK89XaI"
}
],
"classifications": []
}

Was this page helpful?

Polygon

Point

Contact