list_dataset_entries
async
¶
list_dataset_entries(
dataset_arn: DatasetArn,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = None,
contains_labels: Optional[DatasetLabels] = None,
labeled: Optional[IsLabeled] = None,
source_ref_contains: Optional[QueryString] = None,
has_errors: Optional[HasErrors] = None,
next_token: Optional[ExtendedPaginationToken] = None,
max_results: Optional[ListDatasetEntriesPageSize] = None,
) -> ListDatasetEntriesResponse
This operation applies only to Amazon Rekognition Custom Labels.
Lists the entries (images) within a dataset. An entry is a JSON Line that contains the information for a single image, including the image location, assigned labels, and object location bounding boxes. For more information, see Creating a manifest file.
JSON Lines in the response include information about non-terminal errors found in the dataset. Non terminal errors are reported in errors lists within each JSON Line. The same information is reported in the training and testing validation result manifests that Amazon Rekognition Custom Labels creates during model training.
You can filter the response in variety of ways, such as choosing which labels to return and returning JSON Lines created after a specific date.
This operation requires permissions to perform the rekognition:ListDatasetEntries action.
Parameters:
-
dataset_arn(DatasetArn) –The Amazon Resource Name (ARN) for the dataset that you want to use.
-
contains_labels(Optional[DatasetLabels], default:None) –Specifies a label filter for the response. The response includes an entry only if one or more of the labels in
ContainsLabelsexist in the entry. -
labeled(Optional[IsLabeled], default:None) –Specify
trueto get only the JSON Lines where the image is labeled. Specifyfalseto get only the JSON Lines where the image isn't labeled. If you don't specifyLabeled,ListDatasetEntriesreturns JSON Lines for labeled and unlabeled images. -
source_ref_contains(Optional[QueryString], default:None) –If specified,
ListDatasetEntriesonly returns JSON Lines where the value ofSourceRefContainsis part of thesource-reffield. Thesource-reffield contains the Amazon S3 location of the image. You can useSouceRefContainsfor tasks such as getting the JSON Line for a single image, or gettting JSON Lines for all images within a specific folder. -
has_errors(Optional[HasErrors], default:None) –Specifies an error filter for the response. Specify
Trueto only include entries that have errors. -
next_token(Optional[ExtendedPaginationToken], default:None) –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.
-
max_results(Optional[ListDatasetEntriesPageSize], default:None) –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.
Raises:
-
AccessDeniedException–You are not authorized to perform the action.
-
InternalServerError–Amazon Rekognition experienced a service issue. Try your call again.
-
InvalidPaginationTokenException–Pagination token in the request is not valid.
-
InvalidParameterException–Input parameter violated a constraint. Validate your parameter before calling the API operation again.
-
ProvisionedThroughputExceededException–The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.
-
ResourceInUseException–The specified resource is already being used.
-
ResourceNotFoundException–The resource specified in the request cannot be found.
-
ResourceNotReadyException–The requested resource isn't ready. For example, this exception occurs when you call
DetectCustomLabelswith a model version that isn't deployed. -
ThrottlingException–Amazon Rekognition is temporarily unable to process the request. Try your call again.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To list the entries in an Amazon Rekognition Custom Labels dataset Lists the JSON line entries in an Amazon Rekognition Custom Labels dataset.
>>> await client.list_dataset_entries(dataset_arn='arn:aws:rekognition:us-east-1:111122223333:project/my-proj-2/dataset/train/1690564858106', contains_labels=['camellia'], labeled=True, source_ref_contains='camellia4.jpg', has_errors=True, next_token='', max_results=100)
Source code in docs_src/capo_rekognition/_services/async_rekognition.py
3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 | |