aws-sdk-rekognition 1.58.0 → 1.62.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -119,7 +119,9 @@ module Aws::Rekognition
119
119
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
120
  # are very aggressive. Construct and pass an instance of
121
121
  # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
- # enable retries and extended timeouts.
122
+ # enable retries and extended timeouts. Instance profile credential
123
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
124
+ # to true.
123
125
  #
124
126
  # @option options [required, String] :region
125
127
  # The AWS region to connect to. The configured `:region` is
@@ -285,6 +287,15 @@ module Aws::Rekognition
285
287
  # ** Please note ** When response stubbing is enabled, no HTTP
286
288
  # requests are made, and retries are disabled.
287
289
  #
290
+ # @option options [Boolean] :use_dualstack_endpoint
291
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
292
+ # will be used if available.
293
+ #
294
+ # @option options [Boolean] :use_fips_endpoint
295
+ # When set to `true`, fips compatible endpoints will be used if available.
296
+ # When a `fips` region is used, the region is normalized and this config
297
+ # is set to `true`.
298
+ #
288
299
  # @option options [Boolean] :validate_params (true)
289
300
  # When `true`, request parameters are validated before
290
301
  # sending the request.
@@ -364,7 +375,7 @@ module Aws::Rekognition
364
375
  # In response, the operation returns an array of face matches ordered by
365
376
  # similarity score in descending order. For each face match, the
366
377
  # response provides a bounding box of the face, facial landmarks, pose
367
- # details (pitch, role, and yaw), quality (brightness and sharpness),
378
+ # details (pitch, roll, and yaw), quality (brightness and sharpness),
368
379
  # and confidence value (indicating the level of confidence that the
369
380
  # bounding box contains a face). The response also provides a similarity
370
381
  # score, which indicates how closely the faces match.
@@ -652,9 +663,84 @@ module Aws::Rekognition
652
663
  req.send_request(options)
653
664
  end
654
665
 
666
+ # Creates a new Amazon Rekognition Custom Labels dataset. You can create
667
+ # a dataset by using an Amazon Sagemaker format manifest file or by
668
+ # copying an existing Amazon Rekognition Custom Labels dataset.
669
+ #
670
+ # To create a training dataset for a project, specify `train` for the
671
+ # value of `DatasetType`. To create the test dataset for a project,
672
+ # specify `test` for the value of `DatasetType`.
673
+ #
674
+ # The response from `CreateDataset` is the Amazon Resource Name (ARN)
675
+ # for the dataset. Creating a dataset takes a while to complete. Use
676
+ # DescribeDataset to check the current status. The dataset created
677
+ # successfully if the value of `Status` is `CREATE_COMPLETE`.
678
+ #
679
+ # To check if any non-terminal errors occurred, call ListDatasetEntries
680
+ # and check for the presence of `errors` lists in the JSON Lines.
681
+ #
682
+ # Dataset creation fails if a terminal error occurs (`Status` =
683
+ # `CREATE_FAILED`). Currently, you can't access the terminal error
684
+ # information.
685
+ #
686
+ # For more information, see Creating dataset in the *Amazon Rekognition
687
+ # Custom Labels Developer Guide*.
688
+ #
689
+ # This operation requires permissions to perform the
690
+ # `rekognition:CreateDataset` action. If you want to copy an existing
691
+ # dataset, you also require permission to perform the
692
+ # `rekognition:ListDatasetEntries` action.
693
+ #
694
+ # @option params [Types::DatasetSource] :dataset_source
695
+ # The source files for the dataset. You can specify the ARN of an
696
+ # existing dataset or specify the Amazon S3 bucket location of an Amazon
697
+ # Sagemaker format manifest file. If you don't specify `datasetSource`,
698
+ # an empty dataset is created. To add labeled images to the dataset, You
699
+ # can use the console or call UpdateDatasetEntries.
700
+ #
701
+ # @option params [required, String] :dataset_type
702
+ # The type of the dataset. Specify `train` to create a training dataset.
703
+ # Specify `test` to create a test dataset.
704
+ #
705
+ # @option params [required, String] :project_arn
706
+ # The ARN of the Amazon Rekognition Custom Labels project to which you
707
+ # want to asssign the dataset.
708
+ #
709
+ # @return [Types::CreateDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
710
+ #
711
+ # * {Types::CreateDatasetResponse#dataset_arn #dataset_arn} => String
712
+ #
713
+ # @example Request syntax with placeholder values
714
+ #
715
+ # resp = client.create_dataset({
716
+ # dataset_source: {
717
+ # ground_truth_manifest: {
718
+ # s3_object: {
719
+ # bucket: "S3Bucket",
720
+ # name: "S3ObjectName",
721
+ # version: "S3ObjectVersion",
722
+ # },
723
+ # },
724
+ # dataset_arn: "DatasetArn",
725
+ # },
726
+ # dataset_type: "TRAIN", # required, accepts TRAIN, TEST
727
+ # project_arn: "ProjectArn", # required
728
+ # })
729
+ #
730
+ # @example Response structure
731
+ #
732
+ # resp.dataset_arn #=> String
733
+ #
734
+ # @overload create_dataset(params = {})
735
+ # @param [Hash] params ({})
736
+ def create_dataset(params = {}, options = {})
737
+ req = build_request(:create_dataset, params)
738
+ req.send_request(options)
739
+ end
740
+
655
741
  # Creates a new Amazon Rekognition Custom Labels project. A project is a
656
- # logical grouping of resources (images, Labels, models) and operations
657
- # (training, evaluation and detection).
742
+ # group of resources (datasets, model versions) that you use to create
743
+ # and manage Amazon Rekognition Custom Labels models.
658
744
  #
659
745
  # This operation requires permissions to perform the
660
746
  # `rekognition:CreateProject` action.
@@ -684,16 +770,40 @@ module Aws::Rekognition
684
770
  end
685
771
 
686
772
  # Creates a new version of a model and begins training. Models are
687
- # managed as part of an Amazon Rekognition Custom Labels project. You
688
- # can specify one training dataset and one testing dataset. The response
689
- # from `CreateProjectVersion` is an Amazon Resource Name (ARN) for the
690
- # version of the model.
773
+ # managed as part of an Amazon Rekognition Custom Labels project. The
774
+ # response from `CreateProjectVersion` is an Amazon Resource Name (ARN)
775
+ # for the version of the model.
776
+ #
777
+ # Training uses the training and test datasets associated with the
778
+ # project. For more information, see Creating training and test dataset
779
+ # in the *Amazon Rekognition Custom Labels Developer Guide*.
780
+ #
781
+ # <note markdown="1"> You can train a modelin a project that doesn't have associated
782
+ # datasets by specifying manifest files in the `TrainingData` and
783
+ # `TestingData` fields.
784
+ #
785
+ # If you open the console after training a model with manifest files,
786
+ # Amazon Rekognition Custom Labels creates the datasets for you using
787
+ # the most recent manifest files. You can no longer train a model
788
+ # version for the project by specifying manifest files.
789
+ #
790
+ # Instead of training with a project without associated datasets, we
791
+ # recommend that you use the manifest files to create training and test
792
+ # datasets for the project.
793
+ #
794
+ # </note>
691
795
  #
692
796
  # Training takes a while to complete. You can get the current status by
693
- # calling DescribeProjectVersions.
797
+ # calling DescribeProjectVersions. Training completed successfully if
798
+ # the value of the `Status` field is `TRAINING_COMPLETED`.
799
+ #
800
+ # If training fails, see Debugging a failed model training in the
801
+ # *Amazon Rekognition Custom Labels* developer guide.
694
802
  #
695
803
  # Once training has successfully completed, call DescribeProjectVersions
696
- # to get the training results and evaluate the model.
804
+ # to get the training results and evaluate the model. For more
805
+ # information, see Improving a trained Amazon Rekognition Custom Labels
806
+ # model in the *Amazon Rekognition Custom Labels* developers guide.
697
807
  #
698
808
  # After evaluating the model, you start the model by calling
699
809
  # StartProjectVersion.
@@ -713,26 +823,30 @@ module Aws::Rekognition
713
823
  # bucket can be in any AWS account as long as the caller has
714
824
  # `s3:PutObject` permissions on the S3 bucket.
715
825
  #
716
- # @option params [required, Types::TrainingData] :training_data
717
- # The dataset to use for training.
826
+ # @option params [Types::TrainingData] :training_data
827
+ # Specifies an external manifest that the services uses to train the
828
+ # model. If you specify `TrainingData` you must also specify
829
+ # `TestingData`. The project must not have any associated datasets.
718
830
  #
719
- # @option params [required, Types::TestingData] :testing_data
720
- # The dataset to use for testing.
831
+ # @option params [Types::TestingData] :testing_data
832
+ # Specifies an external manifest that the service uses to test the
833
+ # model. If you specify `TestingData` you must also specify
834
+ # `TrainingData`. The project must not have any associated datasets.
721
835
  #
722
836
  # @option params [Hash<String,String>] :tags
723
837
  # A set of tags (key-value pairs) that you want to attach to the model.
724
838
  #
725
839
  # @option params [String] :kms_key_id
726
- # The identifier for your AWS Key Management Service (AWS KMS) customer
727
- # master key (CMK). You can supply the Amazon Resource Name (ARN) of
728
- # your CMK, the ID of your CMK, an alias for your CMK, or an alias ARN.
729
- # The key is used to encrypt training and test images copied into the
730
- # service for model training. Your source images are unaffected. The key
731
- # is also used to encrypt training results and manifest files written to
732
- # the output Amazon S3 bucket (`OutputConfig`).
840
+ # The identifier for your AWS Key Management Service key (AWS KMS key).
841
+ # You can supply the Amazon Resource Name (ARN) of your KMS key, the ID
842
+ # of your KMS key, an alias for your KMS key, or an alias ARN. The key
843
+ # is used to encrypt training and test images copied into the service
844
+ # for model training. Your source images are unaffected. The key is also
845
+ # used to encrypt training results and manifest files written to the
846
+ # output Amazon S3 bucket (`OutputConfig`).
733
847
  #
734
- # If you choose to use your own CMK, you need the following permissions
735
- # on the CMK.
848
+ # If you choose to use your own KMS key, you need the following
849
+ # permissions on the KMS key.
736
850
  #
737
851
  # * kms:CreateGrant
738
852
  #
@@ -758,7 +872,7 @@ module Aws::Rekognition
758
872
  # s3_bucket: "S3Bucket",
759
873
  # s3_key_prefix: "S3KeyPrefix",
760
874
  # },
761
- # training_data: { # required
875
+ # training_data: {
762
876
  # assets: [
763
877
  # {
764
878
  # ground_truth_manifest: {
@@ -771,7 +885,7 @@ module Aws::Rekognition
771
885
  # },
772
886
  # ],
773
887
  # },
774
- # testing_data: { # required
888
+ # testing_data: {
775
889
  # assets: [
776
890
  # {
777
891
  # ground_truth_manifest: {
@@ -940,6 +1054,38 @@ module Aws::Rekognition
940
1054
  req.send_request(options)
941
1055
  end
942
1056
 
1057
+ # Deletes an existing Amazon Rekognition Custom Labels dataset. Deleting
1058
+ # a dataset might take while. Use DescribeDataset to check the current
1059
+ # status. The dataset is still deleting if the value of `Status` is
1060
+ # `DELETE_IN_PROGRESS`. If you try to access the dataset after it is
1061
+ # deleted, you get a `ResourceNotFoundException` exception.
1062
+ #
1063
+ # You can't delete a dataset while it is creating (`Status` =
1064
+ # `CREATE_IN_PROGRESS`) or if the dataset is updating (`Status` =
1065
+ # `UPDATE_IN_PROGRESS`).
1066
+ #
1067
+ # This operation requires permissions to perform the
1068
+ # `rekognition:DeleteDataset` action.
1069
+ #
1070
+ # @option params [required, String] :dataset_arn
1071
+ # The ARN of the Amazon Rekognition Custom Labels dataset that you want
1072
+ # to delete.
1073
+ #
1074
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1075
+ #
1076
+ # @example Request syntax with placeholder values
1077
+ #
1078
+ # resp = client.delete_dataset({
1079
+ # dataset_arn: "DatasetArn", # required
1080
+ # })
1081
+ #
1082
+ # @overload delete_dataset(params = {})
1083
+ # @param [Hash] params ({})
1084
+ def delete_dataset(params = {}, options = {})
1085
+ req = build_request(:delete_dataset, params)
1086
+ req.send_request(options)
1087
+ end
1088
+
943
1089
  # Deletes faces from a collection. You specify a collection ID and an
944
1090
  # array of face IDs to remove from the collection.
945
1091
  #
@@ -998,6 +1144,10 @@ module Aws::Rekognition
998
1144
  # project you must first delete all models associated with the project.
999
1145
  # To delete a model, see DeleteProjectVersion.
1000
1146
  #
1147
+ # `DeleteProject` is an asynchronous operation. To check if the project
1148
+ # is deleted, call DescribeProjects. The project is deleted when the
1149
+ # project no longer appears in the response.
1150
+ #
1001
1151
  # This operation requires permissions to perform the
1002
1152
  # `rekognition:DeleteProject` action.
1003
1153
  #
@@ -1122,10 +1272,50 @@ module Aws::Rekognition
1122
1272
  req.send_request(options)
1123
1273
  end
1124
1274
 
1125
- # Lists and describes the models in an Amazon Rekognition Custom Labels
1126
- # project. You can specify up to 10 model versions in
1275
+ # Describes an Amazon Rekognition Custom Labels dataset. You can get
1276
+ # information such as the current status of a dataset and statistics
1277
+ # about the images and labels in a dataset.
1278
+ #
1279
+ # This operation requires permissions to perform the
1280
+ # `rekognition:DescribeDataset` action.
1281
+ #
1282
+ # @option params [required, String] :dataset_arn
1283
+ # The Amazon Resource Name (ARN) of the dataset that you want to
1284
+ # describe.
1285
+ #
1286
+ # @return [Types::DescribeDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1287
+ #
1288
+ # * {Types::DescribeDatasetResponse#dataset_description #dataset_description} => Types::DatasetDescription
1289
+ #
1290
+ # @example Request syntax with placeholder values
1291
+ #
1292
+ # resp = client.describe_dataset({
1293
+ # dataset_arn: "DatasetArn", # required
1294
+ # })
1295
+ #
1296
+ # @example Response structure
1297
+ #
1298
+ # resp.dataset_description.creation_timestamp #=> Time
1299
+ # resp.dataset_description.last_updated_timestamp #=> Time
1300
+ # resp.dataset_description.status #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_COMPLETE", "UPDATE_FAILED", "DELETE_IN_PROGRESS"
1301
+ # resp.dataset_description.status_message #=> String
1302
+ # resp.dataset_description.status_message_code #=> String, one of "SUCCESS", "SERVICE_ERROR", "CLIENT_ERROR"
1303
+ # resp.dataset_description.dataset_stats.labeled_entries #=> Integer
1304
+ # resp.dataset_description.dataset_stats.total_entries #=> Integer
1305
+ # resp.dataset_description.dataset_stats.total_labels #=> Integer
1306
+ # resp.dataset_description.dataset_stats.error_entries #=> Integer
1307
+ #
1308
+ # @overload describe_dataset(params = {})
1309
+ # @param [Hash] params ({})
1310
+ def describe_dataset(params = {}, options = {})
1311
+ req = build_request(:describe_dataset, params)
1312
+ req.send_request(options)
1313
+ end
1314
+
1315
+ # Lists and describes the versions of a model in an Amazon Rekognition
1316
+ # Custom Labels project. You can specify up to 10 model versions in
1127
1317
  # `ProjectVersionArns`. If you don't specify a value, descriptions for
1128
- # all models are returned.
1318
+ # all model versions in the project are returned.
1129
1319
  #
1130
1320
  # This operation requires permissions to perform the
1131
1321
  # `rekognition:DescribeProjectVersions` action.
@@ -1232,8 +1422,7 @@ module Aws::Rekognition
1232
1422
  req.send_request(options)
1233
1423
  end
1234
1424
 
1235
- # Lists and gets information about your Amazon Rekognition Custom Labels
1236
- # projects.
1425
+ # Gets information about your Amazon Rekognition Custom Labels projects.
1237
1426
  #
1238
1427
  # This operation requires permissions to perform the
1239
1428
  # `rekognition:DescribeProjects` action.
@@ -1250,6 +1439,11 @@ module Aws::Rekognition
1250
1439
  # than 100, a ValidationException error occurs. The default value is
1251
1440
  # 100.
1252
1441
  #
1442
+ # @option params [Array<String>] :project_names
1443
+ # A list of the projects that you want Amazon Rekognition Custom Labels
1444
+ # to describe. If you don't specify a value, the response includes
1445
+ # descriptions for all the projects in your AWS account.
1446
+ #
1253
1447
  # @return [Types::DescribeProjectsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1254
1448
  #
1255
1449
  # * {Types::DescribeProjectsResponse#project_descriptions #project_descriptions} => Array&lt;Types::ProjectDescription&gt;
@@ -1262,6 +1456,7 @@ module Aws::Rekognition
1262
1456
  # resp = client.describe_projects({
1263
1457
  # next_token: "ExtendedPaginationToken",
1264
1458
  # max_results: 1,
1459
+ # project_names: ["ProjectName"],
1265
1460
  # })
1266
1461
  #
1267
1462
  # @example Response structure
@@ -1270,6 +1465,13 @@ module Aws::Rekognition
1270
1465
  # resp.project_descriptions[0].project_arn #=> String
1271
1466
  # resp.project_descriptions[0].creation_timestamp #=> Time
1272
1467
  # resp.project_descriptions[0].status #=> String, one of "CREATING", "CREATED", "DELETING"
1468
+ # resp.project_descriptions[0].datasets #=> Array
1469
+ # resp.project_descriptions[0].datasets[0].creation_timestamp #=> Time
1470
+ # resp.project_descriptions[0].datasets[0].dataset_type #=> String, one of "TRAIN", "TEST"
1471
+ # resp.project_descriptions[0].datasets[0].dataset_arn #=> String
1472
+ # resp.project_descriptions[0].datasets[0].status #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_COMPLETE", "UPDATE_FAILED", "DELETE_IN_PROGRESS"
1473
+ # resp.project_descriptions[0].datasets[0].status_message #=> String
1474
+ # resp.project_descriptions[0].datasets[0].status_message_code #=> String, one of "SUCCESS", "SERVICE_ERROR", "CLIENT_ERROR"
1273
1475
  # resp.next_token #=> String
1274
1476
  #
1275
1477
  # @overload describe_projects(params = {})
@@ -2022,9 +2224,8 @@ module Aws::Rekognition
2022
2224
  # information about a single word or line of text that was detected in
2023
2225
  # the image.
2024
2226
  #
2025
- # A word is one or more ISO basic latin script characters that are not
2026
- # separated by spaces. `DetectText` can detect up to 100 words in an
2027
- # image.
2227
+ # A word is one or more script characters that are not separated by
2228
+ # spaces. `DetectText` can detect up to 100 words in an image.
2028
2229
  #
2029
2230
  # A line is a string of equally spaced words. A line isn't necessarily
2030
2231
  # a complete sentence. For example, a driver's license number is
@@ -2118,6 +2319,50 @@ module Aws::Rekognition
2118
2319
  req.send_request(options)
2119
2320
  end
2120
2321
 
2322
+ # Distributes the entries (images) in a training dataset across the
2323
+ # training dataset and the test dataset for a project.
2324
+ # `DistributeDatasetEntries` moves 20% of the training dataset images to
2325
+ # the test dataset. An entry is a JSON Line that describes an image.
2326
+ #
2327
+ # You supply the Amazon Resource Names (ARN) of a project's training
2328
+ # dataset and test dataset. The training dataset must contain the images
2329
+ # that you want to split. The test dataset must be empty. The datasets
2330
+ # must belong to the same project. To create training and test datasets
2331
+ # for a project, call CreateDataset.
2332
+ #
2333
+ # Distributing a dataset takes a while to complete. To check the status
2334
+ # call `DescribeDataset`. The operation is complete when the `Status`
2335
+ # field for the training dataset and the test dataset is
2336
+ # `UPDATE_COMPLETE`. If the dataset split fails, the value of `Status`
2337
+ # is `UPDATE_FAILED`.
2338
+ #
2339
+ # This operation requires permissions to perform the
2340
+ # `rekognition:DistributeDatasetEntries` action.
2341
+ #
2342
+ # @option params [required, Array<Types::DistributeDataset>] :datasets
2343
+ # The ARNS for the training dataset and test dataset that you want to
2344
+ # use. The datasets must belong to the same project. The test dataset
2345
+ # must be empty.
2346
+ #
2347
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2348
+ #
2349
+ # @example Request syntax with placeholder values
2350
+ #
2351
+ # resp = client.distribute_dataset_entries({
2352
+ # datasets: [ # required
2353
+ # {
2354
+ # arn: "DatasetArn", # required
2355
+ # },
2356
+ # ],
2357
+ # })
2358
+ #
2359
+ # @overload distribute_dataset_entries(params = {})
2360
+ # @param [Hash] params ({})
2361
+ def distribute_dataset_entries(params = {}, options = {})
2362
+ req = build_request(:distribute_dataset_entries, params)
2363
+ req.send_request(options)
2364
+ end
2365
+
2121
2366
  # Gets the name and additional information about a celebrity based on
2122
2367
  # their Amazon Rekognition ID. The additional information is returned as
2123
2368
  # an array of URLs. If there is no additional information about the
@@ -2151,7 +2396,7 @@ module Aws::Rekognition
2151
2396
  # resp.urls #=> Array
2152
2397
  # resp.urls[0] #=> String
2153
2398
  # resp.name #=> String
2154
- # resp.known_gender.type #=> String, one of "Male", "Female"
2399
+ # resp.known_gender.type #=> String, one of "Male", "Female", "Nonbinary", "Unlisted"
2155
2400
  #
2156
2401
  # @overload get_celebrity_info(params = {})
2157
2402
  # @param [Hash] params ({})
@@ -2313,7 +2558,7 @@ module Aws::Rekognition
2313
2558
  # resp.celebrities[0].celebrity.face.quality.brightness #=> Float
2314
2559
  # resp.celebrities[0].celebrity.face.quality.sharpness #=> Float
2315
2560
  # resp.celebrities[0].celebrity.face.confidence #=> Float
2316
- # resp.celebrities[0].celebrity.known_gender.type #=> String, one of "Male", "Female"
2561
+ # resp.celebrities[0].celebrity.known_gender.type #=> String, one of "Male", "Female", "Nonbinary", "Unlisted"
2317
2562
  #
2318
2563
  # @overload get_celebrity_recognition(params = {})
2319
2564
  # @param [Hash] params ({})
@@ -3657,6 +3902,155 @@ module Aws::Rekognition
3657
3902
  req.send_request(options)
3658
3903
  end
3659
3904
 
3905
+ # Lists the entries (images) within a dataset. An entry is a JSON Line
3906
+ # that contains the information for a single image, including the image
3907
+ # location, assigned labels, and object location bounding boxes. For
3908
+ # more information, see [Creating a manifest file][1].
3909
+ #
3910
+ # JSON Lines in the response include information about non-terminal
3911
+ # errors found in the dataset. Non terminal errors are reported in
3912
+ # `errors` lists within each JSON Line. The same information is reported
3913
+ # in the training and testing validation result manifests that Amazon
3914
+ # Rekognition Custom Labels creates during model training.
3915
+ #
3916
+ # You can filter the response in variety of ways, such as choosing which
3917
+ # labels to return and returning JSON Lines created after a specific
3918
+ # date.
3919
+ #
3920
+ # This operation requires permissions to perform the
3921
+ # `rekognition:ListDatasetEntries` action.
3922
+ #
3923
+ #
3924
+ #
3925
+ # [1]: https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-manifest-files.html
3926
+ #
3927
+ # @option params [required, String] :dataset_arn
3928
+ # The Amazon Resource Name (ARN) for the dataset that you want to use.
3929
+ #
3930
+ # @option params [Array<String>] :contains_labels
3931
+ # Specifies a label filter for the response. The response includes an
3932
+ # entry only if one or more of the labels in `ContainsLabels` exist in
3933
+ # the entry.
3934
+ #
3935
+ # @option params [Boolean] :labeled
3936
+ # Specify `true` to get only the JSON Lines where the image is labeled.
3937
+ # Specify `false` to get only the JSON Lines where the image isn't
3938
+ # labeled. If you don't specify `Labeled`, `ListDatasetEntries` returns
3939
+ # JSON Lines for labeled and unlabeled images.
3940
+ #
3941
+ # @option params [String] :source_ref_contains
3942
+ # If specified, `ListDatasetEntries` only returns JSON Lines where the
3943
+ # value of `SourceRefContains` is part of the `source-ref` field. The
3944
+ # `source-ref` field contains the Amazon S3 location of the image. You
3945
+ # can use `SouceRefContains` for tasks such as getting the JSON Line for
3946
+ # a single image, or gettting JSON Lines for all images within a
3947
+ # specific folder.
3948
+ #
3949
+ # @option params [Boolean] :has_errors
3950
+ # Specifies an error filter for the response. Specify `True` to only
3951
+ # include entries that have errors.
3952
+ #
3953
+ # @option params [String] :next_token
3954
+ # If the previous response was incomplete (because there is more results
3955
+ # to retrieve), Amazon Rekognition Custom Labels returns a pagination
3956
+ # token in the response. You can use this pagination token to retrieve
3957
+ # the next set of results.
3958
+ #
3959
+ # @option params [Integer] :max_results
3960
+ # The maximum number of results to return per paginated call. The
3961
+ # largest value you can specify is 100. If you specify a value greater
3962
+ # than 100, a ValidationException error occurs. The default value is
3963
+ # 100.
3964
+ #
3965
+ # @return [Types::ListDatasetEntriesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3966
+ #
3967
+ # * {Types::ListDatasetEntriesResponse#dataset_entries #dataset_entries} => Array&lt;String&gt;
3968
+ # * {Types::ListDatasetEntriesResponse#next_token #next_token} => String
3969
+ #
3970
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3971
+ #
3972
+ # @example Request syntax with placeholder values
3973
+ #
3974
+ # resp = client.list_dataset_entries({
3975
+ # dataset_arn: "DatasetArn", # required
3976
+ # contains_labels: ["DatasetLabel"],
3977
+ # labeled: false,
3978
+ # source_ref_contains: "QueryString",
3979
+ # has_errors: false,
3980
+ # next_token: "ExtendedPaginationToken",
3981
+ # max_results: 1,
3982
+ # })
3983
+ #
3984
+ # @example Response structure
3985
+ #
3986
+ # resp.dataset_entries #=> Array
3987
+ # resp.dataset_entries[0] #=> String
3988
+ # resp.next_token #=> String
3989
+ #
3990
+ # @overload list_dataset_entries(params = {})
3991
+ # @param [Hash] params ({})
3992
+ def list_dataset_entries(params = {}, options = {})
3993
+ req = build_request(:list_dataset_entries, params)
3994
+ req.send_request(options)
3995
+ end
3996
+
3997
+ # Lists the labels in a dataset. Amazon Rekognition Custom Labels uses
3998
+ # labels to describe images. For more information, see [Labeling
3999
+ # images][1].
4000
+ #
4001
+ # Lists the labels in a dataset. Amazon Rekognition Custom Labels uses
4002
+ # labels to describe images. For more information, see Labeling images
4003
+ # in the *Amazon Rekognition Custom Labels Developer Guide*.
4004
+ #
4005
+ #
4006
+ #
4007
+ # [1]: https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-labeling-images.html
4008
+ #
4009
+ # @option params [required, String] :dataset_arn
4010
+ # The Amazon Resource Name (ARN) of the dataset that you want to use.
4011
+ #
4012
+ # @option params [String] :next_token
4013
+ # If the previous response was incomplete (because there is more results
4014
+ # to retrieve), Amazon Rekognition Custom Labels returns a pagination
4015
+ # token in the response. You can use this pagination token to retrieve
4016
+ # the next set of results.
4017
+ #
4018
+ # @option params [Integer] :max_results
4019
+ # The maximum number of results to return per paginated call. The
4020
+ # largest value you can specify is 100. If you specify a value greater
4021
+ # than 100, a ValidationException error occurs. The default value is
4022
+ # 100.
4023
+ #
4024
+ # @return [Types::ListDatasetLabelsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4025
+ #
4026
+ # * {Types::ListDatasetLabelsResponse#dataset_label_descriptions #dataset_label_descriptions} => Array&lt;Types::DatasetLabelDescription&gt;
4027
+ # * {Types::ListDatasetLabelsResponse#next_token #next_token} => String
4028
+ #
4029
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
4030
+ #
4031
+ # @example Request syntax with placeholder values
4032
+ #
4033
+ # resp = client.list_dataset_labels({
4034
+ # dataset_arn: "DatasetArn", # required
4035
+ # next_token: "ExtendedPaginationToken",
4036
+ # max_results: 1,
4037
+ # })
4038
+ #
4039
+ # @example Response structure
4040
+ #
4041
+ # resp.dataset_label_descriptions #=> Array
4042
+ # resp.dataset_label_descriptions[0].label_name #=> String
4043
+ # resp.dataset_label_descriptions[0].label_stats.entry_count #=> Integer
4044
+ # resp.dataset_label_descriptions[0].label_stats.bounding_box_count #=> Integer
4045
+ # resp.next_token #=> String
4046
+ #
4047
+ # @overload list_dataset_labels(params = {})
4048
+ # @param [Hash] params ({})
4049
+ def list_dataset_labels(params = {}, options = {})
4050
+ req = build_request(:list_dataset_labels, params)
4051
+ req.send_request(options)
4052
+ end
4053
+
3660
4054
  # Returns metadata for faces in the specified collection. This metadata
3661
4055
  # includes information such as the bounding box coordinates, the
3662
4056
  # confidence (that the bounding box contains a face), and face ID. For
@@ -3930,7 +4324,7 @@ module Aws::Rekognition
3930
4324
  # Rekognition Developer Guide.
3931
4325
  #
3932
4326
  # `RecognizeCelebrities` returns the 64 largest faces in the image. It
3933
- # lists recognized celebrities in the `CelebrityFaces` array and
4327
+ # lists the recognized celebrities in the `CelebrityFaces` array and any
3934
4328
  # unrecognized faces in the `UnrecognizedFaces` array.
3935
4329
  # `RecognizeCelebrities` doesn't return celebrities whose faces aren't
3936
4330
  # among the largest 64 faces in the image.
@@ -4016,7 +4410,7 @@ module Aws::Rekognition
4016
4410
  # resp.celebrity_faces[0].face.smile.value #=> Boolean
4017
4411
  # resp.celebrity_faces[0].face.smile.confidence #=> Float
4018
4412
  # resp.celebrity_faces[0].match_confidence #=> Float
4019
- # resp.celebrity_faces[0].known_gender.type #=> String, one of "Male", "Female"
4413
+ # resp.celebrity_faces[0].known_gender.type #=> String, one of "Male", "Female", "Nonbinary", "Unlisted"
4020
4414
  # resp.unrecognized_faces #=> Array
4021
4415
  # resp.unrecognized_faces[0].bounding_box.width #=> Float
4022
4416
  # resp.unrecognized_faces[0].bounding_box.height #=> Float
@@ -5242,6 +5636,61 @@ module Aws::Rekognition
5242
5636
  req.send_request(options)
5243
5637
  end
5244
5638
 
5639
+ # Adds or updates one or more entries (images) in a dataset. An entry is
5640
+ # a JSON Line which contains the information for a single image,
5641
+ # including the image location, assigned labels, and object location
5642
+ # bounding boxes. For more information, see Image-Level labels in
5643
+ # manifest files and Object localization in manifest files in the
5644
+ # *Amazon Rekognition Custom Labels Developer Guide*.
5645
+ #
5646
+ # If the `source-ref` field in the JSON line references an existing
5647
+ # image, the existing image in the dataset is updated. If `source-ref`
5648
+ # field doesn't reference an existing image, the image is added as a
5649
+ # new image to the dataset.
5650
+ #
5651
+ # You specify the changes that you want to make in the `Changes` input
5652
+ # parameter. There isn't a limit to the number JSON Lines that you can
5653
+ # change, but the size of `Changes` must be less than 5MB.
5654
+ #
5655
+ # `UpdateDatasetEntries` returns immediatly, but the dataset update
5656
+ # might take a while to complete. Use DescribeDataset to check the
5657
+ # current status. The dataset updated successfully if the value of
5658
+ # `Status` is `UPDATE_COMPLETE`.
5659
+ #
5660
+ # To check if any non-terminal errors occured, call ListDatasetEntries
5661
+ # and check for the presence of `errors` lists in the JSON Lines.
5662
+ #
5663
+ # Dataset update fails if a terminal error occurs (`Status` =
5664
+ # `UPDATE_FAILED`). Currently, you can't access the terminal error
5665
+ # information from the Amazon Rekognition Custom Labels SDK.
5666
+ #
5667
+ # This operation requires permissions to perform the
5668
+ # `rekognition:UpdateDatasetEntries` action.
5669
+ #
5670
+ # @option params [required, String] :dataset_arn
5671
+ # The Amazon Resource Name (ARN) of the dataset that you want to update.
5672
+ #
5673
+ # @option params [required, Types::DatasetChanges] :changes
5674
+ # The changes that you want to make to the dataset.
5675
+ #
5676
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5677
+ #
5678
+ # @example Request syntax with placeholder values
5679
+ #
5680
+ # resp = client.update_dataset_entries({
5681
+ # dataset_arn: "DatasetArn", # required
5682
+ # changes: { # required
5683
+ # ground_truth: "data", # required
5684
+ # },
5685
+ # })
5686
+ #
5687
+ # @overload update_dataset_entries(params = {})
5688
+ # @param [Hash] params ({})
5689
+ def update_dataset_entries(params = {}, options = {})
5690
+ req = build_request(:update_dataset_entries, params)
5691
+ req.send_request(options)
5692
+ end
5693
+
5245
5694
  # @!endgroup
5246
5695
 
5247
5696
  # @param params ({})
@@ -5255,7 +5704,7 @@ module Aws::Rekognition
5255
5704
  params: params,
5256
5705
  config: config)
5257
5706
  context[:gem_name] = 'aws-sdk-rekognition'
5258
- context[:gem_version] = '1.58.0'
5707
+ context[:gem_version] = '1.62.0'
5259
5708
  Seahorse::Client::Request.new(handlers, context)
5260
5709
  end
5261
5710