Polygon

Overview

Watch this video tutorial to learn everything about the Polygon tool in Labelbox.

Configuring Polygon Tool

Interactive Configuration

Programmatic Configuration

"tools": [
{
"name": "Airplane",
"color": "#E4C441",
"tool": "polygon",
"classifications": []
}
]

Nested Classifications

Any existing classification tools can be nested within the tool to capture metadata about the label. Below is an example nesting single choice question (radio) within the polygon tool.

Interactive Configuration

Programmatic Configuration

"tools": [
{
"name": "Airplane",
"color": "#E4C441",
"tool": "polygon",
"classifications": [
{
"name": "what_kind_of_airplane?",
"instructions": "What kind of airplane?",
"type": "radio",
"options": [
{
"value": "commercial",
"label": "commercial"
},
{
"value": "military",
"label": "military"
}
],
"required": false
}
]
}
]

Label Format

The polygon can be imported as an existing label, an model prediction or exported in the default JSON format shown below. The coordinates are in the clockwise direction and the last coordinate isn’t the same as the first.

    "Airplane": [{
"what_kind_of_airplane?": "commercial",
"geometry": [{
"x": 86,
"y": 112
}, {
"x": 259,
"y": 110
}, {
"x": 307,
"y": 257
}, {
"x": 84,
"y": 219
}, {
"x": 84,
"y": 133
}]
}]
Custom AttributesCustom attributes are added within the main class payload. For example, notice the presence of “what_kind_of_airplane?” within “Airplane”.


How did we do?