list_dataset_labels

Rekognition.Client.list_dataset_labels(**kwargs)

Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see Labeling images.

Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see Labeling images in the Amazon Rekognition Custom Labels Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.list_dataset_labels(
    DatasetArn='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • DatasetArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the dataset that you want to use.

  • NextToken (string) -- If the previous response was incomplete (because there is more results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
  • MaxResults (integer) -- The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
Return type

dict

Returns

Response Syntax

{
    'DatasetLabelDescriptions': [
        {
            'LabelName': 'string',
            'LabelStats': {
                'EntryCount': 123,
                'BoundingBoxCount': 123
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DatasetLabelDescriptions (list) --

      A list of the labels in the dataset.

      • (dict) --

        Describes a dataset label. For more information, see ListDatasetLabels.

        • LabelName (string) --

          The name of the label.

        • LabelStats (dict) --

          Statistics about the label.

          • EntryCount (integer) --

            The total number of images that use the label.

          • BoundingBoxCount (integer) --

            The total number of images that have the label assigned to a bounding box.

    • NextToken (string) --

      If the previous response was incomplete (because there is more results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.

Exceptions

  • Rekognition.Client.exceptions.InternalServerError
  • Rekognition.Client.exceptions.ThrottlingException
  • Rekognition.Client.exceptions.ProvisionedThroughputExceededException
  • Rekognition.Client.exceptions.InvalidParameterException
  • Rekognition.Client.exceptions.AccessDeniedException
  • Rekognition.Client.exceptions.ResourceInUseException
  • Rekognition.Client.exceptions.InvalidPaginationTokenException
  • Rekognition.Client.exceptions.ResourceNotFoundException
  • Rekognition.Client.exceptions.ResourceNotReadyException