Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

crowd-keypoint

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

The following attributes are supported by this element.

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

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.

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

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.

The source URI of the image to be annotated.

This element has the following parent and child elements. + Parent elements: crowd-form + Child elements: full-instructions, short-instructions

The following regions are required by this element.

General instructions about how to annotate the image.

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

The following output is supported by this element.

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.

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.

For more information, see the following. + Amazon SageMaker Ground Truth + HTML Elements Reference