Import

When you import Polyline annotations via the Model-assisted labeling or Import ground truth workflow, your JSON file must contain the following information for each Polyline.

Parameter

Asset type

Required

Description

uuid

Image
Tiled imagery

Yes

A user-generated UUID for each annotation. If you import an annotation to a Data Row and there is already an imported annotation with the same uuid on that Data Row, the latest import will override the previous one. The uuid must be 128 bits (32 characters). The following formats are supported:

  • A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11

  • {a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11}

  • a0eebc999c0b4ef8bb6d6bb9bd380a11

  • a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11

  • {a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}

schemaId

Image
Tiled imagery

Yes

The ID of the schema that contains all of the information needed for rendering your annotation.

dataRow.id

Image
Tiled imagery

Yes

The ID of the Data Row where you want to attach the imported annotations.

line.x

Image
Tiled imagery

Yes

x-coordinate for a single point on the Polyline annotation.

line.y

Image
Tiled imagery

Yes

y-coordinate for a single point on the Polyline annotation.

{
    "uuid": "62e1d949-1c75-47f6-9ea2-e938da17d37c",
    "schemaId": "ck68grts29n7z08903nvgaim5",
    "dataRow": { 
        "id": "cjxav5aa07r1g0dsq70t9eveg" 
    }, 
    "line": [ 
        { 
            "x": 58, 
            "y": 148 
        }, 
        { 
            "x": 135, 
            "y": 79 
        }, 
        { 
            "x": 53, 
            "y": 191 
        } 
    ]
}
{
    "uuid": "62e1d949-1c75-47f6-9ea2-e938da17d37c",
    "schemaId": "ck68grts29n7z08903nvgaim5",
    "dataRow": { 
        "id": "cjxav5aa07r1g0dsq70t9eveg" 
    }, 
    "line": [ 
        { 
            "x": 58, 
            "y": 148 
        }, 
        { 
            "x": 135, 
            "y": 79 
        }, 
        { 
            "x": 53, 
            "y": 191 
        } 
    ]
}

Export

When you export your Polyline annotations from Labelbox, the export file will contain the following information for each Polyline.

Parameter

Asset type

Description

schemaId

Image
Video
Tiled imagery

The ID of the schema containing all of the information needed for rendering your annotation.

featureId

Image
Video
Tiled imagery

ID of the annotation.

title

Image
Video
Tiled imagery

Name of the annotation in the ontology.

color

Image
Video
Tiled imagery

Color of the annotation in the ontology.

line.x

Image
Video

x coordinate for a single point on the Polyline annotation.

line.y

Image
Video

y coordinate for a single point on the Polyline annotation.

instanceURI

Image

Annotation information hosted on Labelbox servers.

type

Tiled imagery

Annotation type. Value should be polyline.

geometry.coordinates

Tiled imagery

Longitude and latitude, in that order.

{
    "featureId": "ckmuuwb1p00073g68vg3t615r",
    "schemaId": "ckmuuvs5r5njc0y623c4s1dob",
    "title": "Tree branch",
    "value": "tree_branch",
    "color": "#008941",
    "line": [
        {
            "x": 198.027,
            "y": 1979.196
        },
        {
            "x": 321.472,
            "y": 1801.743
        },
        {
            "x": 465.491,
            "y": 1655.152
        }
    ],
    "instanceURI": "https://api.labelbox.com/masks/feature/ckmuuwb1p00073g68vg3t615r?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjazUycnZ4MWtxYXpiMDc3MDBtcTI3eDRsIiwib3JnYW5pemF0aW9uSWQiOiJjazUycnZ4MG1wdzRnMDc2NndncXZqdGw5IiwiaWF0IjoxNjE3MDM4NDAwLCJleHAiOjE2MTk2MzA0MDB9.5YaORL6mWpPqgAb6IbWChm4MQo14obOU8LFWbfCEHR0"
}
{
            "featureId": "ckt37btlp00063h6b8srqrsr8",
            "schemaId": "ckt09rb8q7zsu0yc24y3w85m5",
            "title": "Center lane",
            "value": "center_lane",
            "color": "#2f05f1",
            "keyframe": true,
            "line": [
                {
                    "x": 661.215,
                    "y": 2146.298
                },
                {
                    "x": 961.767,
                    "y": 1907.624
                },
                {
                    "x": 1262.32,
                    "y": 1668.95
                }
            ],
            "classifications": []
        }
{
    "featureId": "ckossvrll00033h68tczgb8p9",
    "schemaId": "ckosstz24fhci0yag63j377hz",
    "title": "line",
    "value": "line",
    "color": "#FF34FF",
    "type": "polyline",
    "geometry": {
        "coordinates": [
            [
                151.20330452874953,
                -33.866105019363175
            ],
            [
                151.20364785147953,
                -33.866737933344254
            ]
        ]
    }
}

Did this page help you?