Given a polygon
entry in params.geometries
, Scale will annotate your image or video with polygons and return the vertices of the polygons.
Request Parameters
Parameter | Type | Default | Description |
---|---|---|---|
objects_to_annotate | array | [] | A list of |
min_vertices | integer | 1 | The minimum number of vertices in a valid line annotation for your request. |
max_vertices | integer | null | The maximum number of vertices in a valid line annotation for your request. Must be at least |
{
"geometries": {
"polygon": {
"objects_to_annotate": [
"traffic_sign",
{
"choice": "vehicle",
"subchoices": [
"Car",
{
"choice": "truck_suv",
"display": "truck or SUV"
}
]
},
"pedestrian"
],
"min_vertices": 4,
"max_vertices": 15
},
...
},
...
}
Response Fields
Key | Type | Description |
---|---|---|
uuid | string | A computer-generated unique identifier for this annotation. In video annotation tasks, this can be used to track the same object across frames. |
type | string | String to indicate geometry type: |
label | string | The label of this annotation, chosen from the |
attributes | object | See the Annotation Attributes section for more details about the |
vertices | array | An array of vertex objects describing the vertices of the polygon, listed in the order they were annotated. In other words, the point order will be either clockwise or counter-clockwise for each annotation. |
Definition: Vertex
Vertex
Key | Type | Description |
---|---|---|
x | number | The distance, in pixels, between the vertex and the left border of the image. |
y | number | The distance, in pixels, between the vertex and the top border of the image. |
{
"response": {
"annotations": [
{
"type": "polygon",
"label": "car",
"vertices": [
{
"x": 123,
"y": 10
},
{
"x": 140,
"y": 49
},
{
"x": 67,
"y": 34
}
],
"uuid": "65ec1f52-5902-4b39-bea9-ab6b4d58ef42"
},
{ ... },
{ ... }
]
},
"task_id": "5774cc78b01249ab09f089dd",
"task": {
// task inlined for convenience
...
}
}