Amazon SageMaker
Developer Guide

crowd-keypoint

Generates a tool to select and annotate key points on an image.

Attributes

The following attributes are supported by this element.

header

The text to display above the image. This is typically a question or simple instruction for the worker.

initial-value

An array, in JSON format, of keypoints to be applied to the image on start. For example:

initial-value="[ { 'label': 'Left Eye', 'x': 1022, 'y': 429 }, { 'label': 'Beak', 'x': 941, 'y': 403 } ]

Note

Please note that label values used in this attribute must have a matching value in the labels attribute or the point will not be rendered.

labels

An array, in JSON format, of strings to be used as keypoint annotation labels.

name

A string used to identify the answer submitted by the worker. This value will match a key in the JSON object that specifies the answer.

src

The source URI of the image to be annotated.

Element Hierarchy

This element has the following parent and child elements.

Regions

The following regions are required by this element.

full-instructions

General instructions about how to annotate the image.

short-instructions

Important task-specific instructions that are displayed in a prominent place.

Output

The following output is supported by this element.

inputImageProperties

A JSON object that specifies the dimensions of the image that is being annotated by the worker. This object contains the following properties.

  • height – The height, in pixels, of the image.

  • width – The width, in pixels, of the image.

keypoints

An array of JSON objects containing the coordinates and label of a keypoint. Each object contains the following properties.

  • label – The assigned label for the keypoint.

  • x – The X coordinate, in pixels, of the keypoint on the image.

  • y – The Y coordinate, in pixels, of the keypoint on the image.

Note

X and Y coordinates are based on 0,0 being the top left corner of the image.

Example : Sample Element Outputs

The following is a sample output from using this element.

[ { "crowdKeypoint": { "inputImageProperties": { "height": 1314, "width": 962 }, "keypoints": [ { "label": "dog", "x": 155, "y": 275 }, { "label": "cat", "x": 341, "y": 447 }, { "label": "cat", "x": 491, "y": 513 }, { "label": "dog", "x": 714, "y": 578 }, { "label": "cat", "x": 712, "y": 763 }, { "label": "cat", "x": 397, "y": 814 } ] } } ]

You may have many labels available, but only the ones that are used appear in the output.

See Also

For more information, see the following.