aws-sdk-rekognition 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +1,14 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module Rekognition
10
- module Errors
8
+ module Aws::Rekognition
9
+ module Errors
11
10
 
12
- extend Aws::Errors::DynamicErrors
11
+ extend Aws::Errors::DynamicErrors
13
12
 
14
- # Raised when calling #load or #data on a resource class that can not be
15
- # loaded. This can happen when:
16
- #
17
- # * A resource class has identifiers, but no data attributes.
18
- # * Resource data is only available when making an API call that
19
- # enumerates all resources of that type.
20
- class ResourceNotLoadable < RuntimeError; end
21
- end
22
13
  end
23
14
  end
@@ -1,25 +1,23 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module Rekognition
10
- class Resource
8
+ module Aws::Rekognition
9
+ class Resource
11
10
 
12
- # @param options ({})
13
- # @option options [Client] :client
14
- def initialize(options = {})
15
- @client = options[:client] || Client.new(options)
16
- end
17
-
18
- # @return [Client]
19
- def client
20
- @client
21
- end
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
22
16
 
17
+ # @return [Client]
18
+ def client
19
+ @client
23
20
  end
21
+
24
22
  end
25
23
  end
@@ -1,1106 +1,1258 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module Rekognition
10
- module Types
8
+ module Aws::Rekognition
9
+ module Types
11
10
 
12
- # Indicates whether or not the face has a beard, and the confidence
13
- # level in the determination.
14
- # @!attribute [rw] value
15
- # Boolean value that indicates whether the face has beard or not.
16
- # @return [Boolean]
17
- #
18
- # @!attribute [rw] confidence
19
- # Level of confidence in the determination.
20
- # @return [Float]
21
- class Beard < Struct.new(
22
- :value,
23
- :confidence)
24
- include Aws::Structure
25
- end
26
-
27
- # Identifies the bounding box around the object or face. The `left`
28
- # (x-coordinate) and `top` (y-coordinate) are coordinates representing
29
- # the top and left sides of the bounding box. Note that the upper-left
30
- # corner of the image is the origin (0,0).
31
- #
32
- # The `top` and `left` values returned are ratios of the overall image
33
- # size. For example, if the input image is 700x200 pixels, and the
34
- # top-left coordinate of the bounding box is 350x50 pixels, the API
35
- # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
36
- # (50/200).
37
- #
38
- # The `width` and `height` values represent the dimensions of the
39
- # bounding box as a ratio of the overall image dimension. For example,
40
- # if the input image is 700x200 pixels, and the bounding box width is 70
41
- # pixels, the width returned is 0.1.
42
- #
43
- # <note markdown="1"> The bounding box coordinates can have negative values. For example, if
44
- # Amazon Rekognition is able to detect a face that is at the image edge
45
- # and is only partially visible, the service can return coordinates that
46
- # are outside the image bounds and, depending on the image edge, you
47
- # might get negative values or values greater than 1 for the `left` or
48
- # `top` values.
49
- #
50
- # </note>
51
- # @!attribute [rw] width
52
- # Width of the bounding box as a ratio of the overall image width.
53
- # @return [Float]
54
- #
55
- # @!attribute [rw] height
56
- # Height of the bounding box as a ratio of the overall image height.
57
- # @return [Float]
58
- #
59
- # @!attribute [rw] left
60
- # Left coordinate of the bounding box as a ratio of overall image
61
- # width.
62
- # @return [Float]
63
- #
64
- # @!attribute [rw] top
65
- # Top coordinate of the bounding box as a ratio of overall image
66
- # height.
67
- # @return [Float]
68
- class BoundingBox < Struct.new(
69
- :width,
70
- :height,
71
- :left,
72
- :top)
73
- include Aws::Structure
74
- end
11
+ # Indicates whether or not the face has a beard, and the confidence
12
+ # level in the determination.
13
+ #
14
+ # @!attribute [rw] value
15
+ # Boolean value that indicates whether the face has beard or not.
16
+ # @return [Boolean]
17
+ #
18
+ # @!attribute [rw] confidence
19
+ # Level of confidence in the determination.
20
+ # @return [Float]
21
+ #
22
+ class Beard < Struct.new(
23
+ :value,
24
+ :confidence)
25
+ include Aws::Structure
26
+ end
75
27
 
76
- # Provide the bounding box, confidence that the bounding box actually
77
- # contains a face, and the similarity between the face in the bounding
78
- # box and the face in the source image.
79
- # @!attribute [rw] similarity
80
- # Level of confidence that the faces match.
81
- # @return [Float]
82
- #
83
- # @!attribute [rw] face
84
- # Provides face metadata (bounding box and confidence that the
85
- # bounding box actually contains a face).
86
- # @return [Types::ComparedFace]
87
- class CompareFacesMatch < Struct.new(
88
- :similarity,
89
- :face)
90
- include Aws::Structure
91
- end
28
+ # Identifies the bounding box around the object or face. The `left`
29
+ # (x-coordinate) and `top` (y-coordinate) are coordinates representing
30
+ # the top and left sides of the bounding box. Note that the upper-left
31
+ # corner of the image is the origin (0,0).
32
+ #
33
+ # The `top` and `left` values returned are ratios of the overall image
34
+ # size. For example, if the input image is 700x200 pixels, and the
35
+ # top-left coordinate of the bounding box is 350x50 pixels, the API
36
+ # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
37
+ # (50/200).
38
+ #
39
+ # The `width` and `height` values represent the dimensions of the
40
+ # bounding box as a ratio of the overall image dimension. For example,
41
+ # if the input image is 700x200 pixels, and the bounding box width is 70
42
+ # pixels, the width returned is 0.1.
43
+ #
44
+ # <note markdown="1"> The bounding box coordinates can have negative values. For example, if
45
+ # Amazon Rekognition is able to detect a face that is at the image edge
46
+ # and is only partially visible, the service can return coordinates that
47
+ # are outside the image bounds and, depending on the image edge, you
48
+ # might get negative values or values greater than 1 for the `left` or
49
+ # `top` values.
50
+ #
51
+ # </note>
52
+ #
53
+ # @!attribute [rw] width
54
+ # Width of the bounding box as a ratio of the overall image width.
55
+ # @return [Float]
56
+ #
57
+ # @!attribute [rw] height
58
+ # Height of the bounding box as a ratio of the overall image height.
59
+ # @return [Float]
60
+ #
61
+ # @!attribute [rw] left
62
+ # Left coordinate of the bounding box as a ratio of overall image
63
+ # width.
64
+ # @return [Float]
65
+ #
66
+ # @!attribute [rw] top
67
+ # Top coordinate of the bounding box as a ratio of overall image
68
+ # height.
69
+ # @return [Float]
70
+ #
71
+ class BoundingBox < Struct.new(
72
+ :width,
73
+ :height,
74
+ :left,
75
+ :top)
76
+ include Aws::Structure
77
+ end
92
78
 
93
- # @note When making an API call, pass CompareFacesRequest
94
- # data as a hash:
95
- #
96
- # {
97
- # source_image: { # required
98
- # bytes: "data",
99
- # s3_object: {
100
- # bucket: "S3Bucket",
101
- # name: "S3ObjectName",
102
- # version: "S3ObjectVersion",
103
- # },
104
- # },
105
- # target_image: { # required
106
- # bytes: "data",
107
- # s3_object: {
108
- # bucket: "S3Bucket",
109
- # name: "S3ObjectName",
110
- # version: "S3ObjectVersion",
111
- # },
112
- # },
113
- # similarity_threshold: 1.0,
114
- # }
115
- # @!attribute [rw] source_image
116
- # Source image either as bytes or an Amazon S3 object
117
- # @return [Types::Image]
118
- #
119
- # @!attribute [rw] target_image
120
- # Target image either as bytes or an Amazon S3 object
121
- # @return [Types::Image]
122
- #
123
- # @!attribute [rw] similarity_threshold
124
- # The minimum level of confidence in the match you want included in
125
- # the result.
126
- # @return [Float]
127
- class CompareFacesRequest < Struct.new(
128
- :source_image,
129
- :target_image,
130
- :similarity_threshold)
131
- include Aws::Structure
132
- end
79
+ # For the provided the bounding box, confidence level that the bounding
80
+ # box actually contains a face, and the similarity between the face in
81
+ # the bounding box and the face in the source image.
82
+ #
83
+ # @!attribute [rw] similarity
84
+ # Level of confidence that the faces match.
85
+ # @return [Float]
86
+ #
87
+ # @!attribute [rw] face
88
+ # Provides face metadata (bounding box and confidence that the
89
+ # bounding box actually contains a face).
90
+ # @return [Types::ComparedFace]
91
+ #
92
+ class CompareFacesMatch < Struct.new(
93
+ :similarity,
94
+ :face)
95
+ include Aws::Structure
96
+ end
133
97
 
134
- # @!attribute [rw] source_image_face
135
- # The face from the source image that was used for comparison.
136
- # @return [Types::ComparedSourceImageFace]
137
- #
138
- # @!attribute [rw] face_matches
139
- # Provides an array of `CompareFacesMatch ` objects. Each object
140
- # provides the bounding box, confidence that the bounding box contains
141
- # a face, and the similarity between the face in the bounding box and
142
- # the face in the source image.
143
- # @return [Array<Types::CompareFacesMatch>]
144
- class CompareFacesResponse < Struct.new(
145
- :source_image_face,
146
- :face_matches)
147
- include Aws::Structure
148
- end
98
+ # @note When making an API call, you may pass CompareFacesRequest
99
+ # data as a hash:
100
+ #
101
+ # {
102
+ # source_image: { # required
103
+ # bytes: "data",
104
+ # s3_object: {
105
+ # bucket: "S3Bucket",
106
+ # name: "S3ObjectName",
107
+ # version: "S3ObjectVersion",
108
+ # },
109
+ # },
110
+ # target_image: { # required
111
+ # bytes: "data",
112
+ # s3_object: {
113
+ # bucket: "S3Bucket",
114
+ # name: "S3ObjectName",
115
+ # version: "S3ObjectVersion",
116
+ # },
117
+ # },
118
+ # similarity_threshold: 1.0,
119
+ # }
120
+ #
121
+ # @!attribute [rw] source_image
122
+ # Source image either as bytes or an S3 object
123
+ # @return [Types::Image]
124
+ #
125
+ # @!attribute [rw] target_image
126
+ # Target image either as bytes or an S3 object
127
+ # @return [Types::Image]
128
+ #
129
+ # @!attribute [rw] similarity_threshold
130
+ # The minimum level of confidence in the match you want included in
131
+ # the result.
132
+ # @return [Float]
133
+ #
134
+ class CompareFacesRequest < Struct.new(
135
+ :source_image,
136
+ :target_image,
137
+ :similarity_threshold)
138
+ include Aws::Structure
139
+ end
149
140
 
150
- # Provides face metadata (bounding box and confidence that the bounding
151
- # box actually contains a face).
152
- # @!attribute [rw] bounding_box
153
- # Identifies the bounding box around the object or face. The `left`
154
- # (x-coordinate) and `top` (y-coordinate) are coordinates representing
155
- # the top and left sides of the bounding box. Note that the upper-left
156
- # corner of the image is the origin (0,0).
157
- #
158
- # The `top` and `left` values returned are ratios of the overall image
159
- # size. For example, if the input image is 700x200 pixels, and the
160
- # top-left coordinate of the bounding box is 350x50 pixels, the API
161
- # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
162
- # (50/200).
163
- #
164
- # The `width` and `height` values represent the dimensions of the
165
- # bounding box as a ratio of the overall image dimension. For example,
166
- # if the input image is 700x200 pixels, and the bounding box width is
167
- # 70 pixels, the width returned is 0.1.
168
- #
169
- # <note markdown="1"> The bounding box coordinates can have negative values. For example,
170
- # if Amazon Rekognition is able to detect a face that is at the image
171
- # edge and is only partially visible, the service can return
172
- # coordinates that are outside the image bounds and, depending on the
173
- # image edge, you might get negative values or values greater than 1
174
- # for the `left` or `top` values.
175
- #
176
- # </note>
177
- # @return [Types::BoundingBox]
178
- #
179
- # @!attribute [rw] confidence
180
- # Level of confidence that what the bounding box contains is a face.
181
- # @return [Float]
182
- class ComparedFace < Struct.new(
183
- :bounding_box,
184
- :confidence)
185
- include Aws::Structure
186
- end
141
+ # @!attribute [rw] source_image_face
142
+ # The face from the source image that was used for comparison.
143
+ # @return [Types::ComparedSourceImageFace]
144
+ #
145
+ # @!attribute [rw] face_matches
146
+ # Provides an array of `CompareFacesMatch` objects. Each object
147
+ # provides the bounding box, confidence that the bounding box contains
148
+ # a face, and the similarity between the face in the bounding box and
149
+ # the face in the source image.
150
+ # @return [Array<Types::CompareFacesMatch>]
151
+ #
152
+ class CompareFacesResponse < Struct.new(
153
+ :source_image_face,
154
+ :face_matches)
155
+ include Aws::Structure
156
+ end
187
157
 
188
- # Type that describes the face Amazon Rekognition chose to compare with
189
- # the faces in the target. This contains a bounding box for the selected
190
- # face and confidence level that the bounding box contains a face. Note
191
- # that Amazon Rekognition selects the largest face in the source image
192
- # for this comparison.
193
- # @!attribute [rw] bounding_box
194
- # Identifies the bounding box around the object or face. The `left`
195
- # (x-coordinate) and `top` (y-coordinate) are coordinates representing
196
- # the top and left sides of the bounding box. Note that the upper-left
197
- # corner of the image is the origin (0,0).
198
- #
199
- # The `top` and `left` values returned are ratios of the overall image
200
- # size. For example, if the input image is 700x200 pixels, and the
201
- # top-left coordinate of the bounding box is 350x50 pixels, the API
202
- # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
203
- # (50/200).
204
- #
205
- # The `width` and `height` values represent the dimensions of the
206
- # bounding box as a ratio of the overall image dimension. For example,
207
- # if the input image is 700x200 pixels, and the bounding box width is
208
- # 70 pixels, the width returned is 0.1.
209
- #
210
- # <note markdown="1"> The bounding box coordinates can have negative values. For example,
211
- # if Amazon Rekognition is able to detect a face that is at the image
212
- # edge and is only partially visible, the service can return
213
- # coordinates that are outside the image bounds and, depending on the
214
- # image edge, you might get negative values or values greater than 1
215
- # for the `left` or `top` values.
216
- #
217
- # </note>
218
- # @return [Types::BoundingBox]
219
- #
220
- # @!attribute [rw] confidence
221
- # Confidence that the selected bounding box contains a face.
222
- # @return [Float]
223
- class ComparedSourceImageFace < Struct.new(
224
- :bounding_box,
225
- :confidence)
226
- include Aws::Structure
227
- end
158
+ # Provides face metadata (bounding box and confidence that the bounding
159
+ # box actually contains a face).
160
+ #
161
+ # @!attribute [rw] bounding_box
162
+ # Identifies the bounding box around the object or face. The `left`
163
+ # (x-coordinate) and `top` (y-coordinate) are coordinates representing
164
+ # the top and left sides of the bounding box. Note that the upper-left
165
+ # corner of the image is the origin (0,0).
166
+ #
167
+ # The `top` and `left` values returned are ratios of the overall image
168
+ # size. For example, if the input image is 700x200 pixels, and the
169
+ # top-left coordinate of the bounding box is 350x50 pixels, the API
170
+ # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
171
+ # (50/200).
172
+ #
173
+ # The `width` and `height` values represent the dimensions of the
174
+ # bounding box as a ratio of the overall image dimension. For example,
175
+ # if the input image is 700x200 pixels, and the bounding box width is
176
+ # 70 pixels, the width returned is 0.1.
177
+ #
178
+ # <note markdown="1"> The bounding box coordinates can have negative values. For example,
179
+ # if Amazon Rekognition is able to detect a face that is at the image
180
+ # edge and is only partially visible, the service can return
181
+ # coordinates that are outside the image bounds and, depending on the
182
+ # image edge, you might get negative values or values greater than 1
183
+ # for the `left` or `top` values.
184
+ #
185
+ # </note>
186
+ # @return [Types::BoundingBox]
187
+ #
188
+ # @!attribute [rw] confidence
189
+ # Level of confidence that what the bounding box contains is a face.
190
+ # @return [Float]
191
+ #
192
+ class ComparedFace < Struct.new(
193
+ :bounding_box,
194
+ :confidence)
195
+ include Aws::Structure
196
+ end
228
197
 
229
- # @note When making an API call, pass CreateCollectionRequest
230
- # data as a hash:
231
- #
232
- # {
233
- # collection_id: "CollectionId", # required
234
- # }
235
- # @!attribute [rw] collection_id
236
- # ID for the collection that you are creating.
237
- # @return [String]
238
- class CreateCollectionRequest < Struct.new(
239
- :collection_id)
240
- include Aws::Structure
241
- end
198
+ # Type that describes the face Amazon Rekognition chose to compare with
199
+ # the faces in the target. This contains a bounding box for the selected
200
+ # face and confidence level that the bounding box contains a face. Note
201
+ # that Amazon Rekognition selects the largest face in the source image
202
+ # for this comparison.
203
+ #
204
+ # @!attribute [rw] bounding_box
205
+ # Identifies the bounding box around the object or face. The `left`
206
+ # (x-coordinate) and `top` (y-coordinate) are coordinates representing
207
+ # the top and left sides of the bounding box. Note that the upper-left
208
+ # corner of the image is the origin (0,0).
209
+ #
210
+ # The `top` and `left` values returned are ratios of the overall image
211
+ # size. For example, if the input image is 700x200 pixels, and the
212
+ # top-left coordinate of the bounding box is 350x50 pixels, the API
213
+ # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
214
+ # (50/200).
215
+ #
216
+ # The `width` and `height` values represent the dimensions of the
217
+ # bounding box as a ratio of the overall image dimension. For example,
218
+ # if the input image is 700x200 pixels, and the bounding box width is
219
+ # 70 pixels, the width returned is 0.1.
220
+ #
221
+ # <note markdown="1"> The bounding box coordinates can have negative values. For example,
222
+ # if Amazon Rekognition is able to detect a face that is at the image
223
+ # edge and is only partially visible, the service can return
224
+ # coordinates that are outside the image bounds and, depending on the
225
+ # image edge, you might get negative values or values greater than 1
226
+ # for the `left` or `top` values.
227
+ #
228
+ # </note>
229
+ # @return [Types::BoundingBox]
230
+ #
231
+ # @!attribute [rw] confidence
232
+ # Confidence level that the selected bounding box contains a face.
233
+ # @return [Float]
234
+ #
235
+ class ComparedSourceImageFace < Struct.new(
236
+ :bounding_box,
237
+ :confidence)
238
+ include Aws::Structure
239
+ end
242
240
 
243
- # @!attribute [rw] status_code
244
- # HTTP status code indicating the result of the operation.
245
- # @return [Integer]
246
- #
247
- # @!attribute [rw] collection_arn
248
- # Amazon Resource Name (ARN) of the collection. You can use this to
249
- # manage permissions on your resources.
250
- # @return [String]
251
- class CreateCollectionResponse < Struct.new(
252
- :status_code,
253
- :collection_arn)
254
- include Aws::Structure
255
- end
241
+ # @note When making an API call, you may pass CreateCollectionRequest
242
+ # data as a hash:
243
+ #
244
+ # {
245
+ # collection_id: "CollectionId", # required
246
+ # }
247
+ #
248
+ # @!attribute [rw] collection_id
249
+ # ID for the collection that you are creating.
250
+ # @return [String]
251
+ #
252
+ class CreateCollectionRequest < Struct.new(
253
+ :collection_id)
254
+ include Aws::Structure
255
+ end
256
256
 
257
- # @note When making an API call, pass DeleteCollectionRequest
258
- # data as a hash:
259
- #
260
- # {
261
- # collection_id: "CollectionId", # required
262
- # }
263
- # @!attribute [rw] collection_id
264
- # ID of the collection to delete.
265
- # @return [String]
266
- class DeleteCollectionRequest < Struct.new(
267
- :collection_id)
268
- include Aws::Structure
269
- end
257
+ # @!attribute [rw] status_code
258
+ # HTTP status code indicating the result of the operation.
259
+ # @return [Integer]
260
+ #
261
+ # @!attribute [rw] collection_arn
262
+ # Amazon Resource Name (ARN) of the collection. You can use this to
263
+ # manage permissions on your resources.
264
+ # @return [String]
265
+ #
266
+ class CreateCollectionResponse < Struct.new(
267
+ :status_code,
268
+ :collection_arn)
269
+ include Aws::Structure
270
+ end
270
271
 
271
- # @!attribute [rw] status_code
272
- # HTTP status code that indicates the result of the operation.
273
- # @return [Integer]
274
- class DeleteCollectionResponse < Struct.new(
275
- :status_code)
276
- include Aws::Structure
277
- end
272
+ # @note When making an API call, you may pass DeleteCollectionRequest
273
+ # data as a hash:
274
+ #
275
+ # {
276
+ # collection_id: "CollectionId", # required
277
+ # }
278
+ #
279
+ # @!attribute [rw] collection_id
280
+ # ID of the collection to delete.
281
+ # @return [String]
282
+ #
283
+ class DeleteCollectionRequest < Struct.new(
284
+ :collection_id)
285
+ include Aws::Structure
286
+ end
278
287
 
279
- # @note When making an API call, pass DeleteFacesRequest
280
- # data as a hash:
281
- #
282
- # {
283
- # collection_id: "CollectionId", # required
284
- # face_ids: ["FaceId"], # required
285
- # }
286
- # @!attribute [rw] collection_id
287
- # Collection from which to remove the specific faces.
288
- # @return [String]
289
- #
290
- # @!attribute [rw] face_ids
291
- # An array of face IDs to delete.
292
- # @return [Array<String>]
293
- class DeleteFacesRequest < Struct.new(
294
- :collection_id,
295
- :face_ids)
296
- include Aws::Structure
297
- end
288
+ # @!attribute [rw] status_code
289
+ # HTTP status code that indicates the result of the operation.
290
+ # @return [Integer]
291
+ #
292
+ class DeleteCollectionResponse < Struct.new(
293
+ :status_code)
294
+ include Aws::Structure
295
+ end
298
296
 
299
- # @!attribute [rw] deleted_faces
300
- # An array of strings (face IDs) of the faces that were deleted.
301
- # @return [Array<String>]
302
- class DeleteFacesResponse < Struct.new(
303
- :deleted_faces)
304
- include Aws::Structure
305
- end
297
+ # @note When making an API call, you may pass DeleteFacesRequest
298
+ # data as a hash:
299
+ #
300
+ # {
301
+ # collection_id: "CollectionId", # required
302
+ # face_ids: ["FaceId"], # required
303
+ # }
304
+ #
305
+ # @!attribute [rw] collection_id
306
+ # Collection from which to remove the specific faces.
307
+ # @return [String]
308
+ #
309
+ # @!attribute [rw] face_ids
310
+ # An array of face IDs to delete.
311
+ # @return [Array<String>]
312
+ #
313
+ class DeleteFacesRequest < Struct.new(
314
+ :collection_id,
315
+ :face_ids)
316
+ include Aws::Structure
317
+ end
306
318
 
307
- # @note When making an API call, pass DetectFacesRequest
308
- # data as a hash:
309
- #
310
- # {
311
- # image: { # required
312
- # bytes: "data",
313
- # s3_object: {
314
- # bucket: "S3Bucket",
315
- # name: "S3ObjectName",
316
- # version: "S3ObjectVersion",
317
- # },
318
- # },
319
- # attributes: ["DEFAULT"], # accepts DEFAULT, ALL
320
- # }
321
- # @!attribute [rw] image
322
- # The image in which you want to detect faces. You can specify a blob
323
- # or an S3 object.
324
- # @return [Types::Image]
325
- #
326
- # @!attribute [rw] attributes
327
- # A list of facial attributes you would like to be returned. By
328
- # default, the API returns subset of facial attributes.
329
- #
330
- # For example, you can specify the value as, \["ALL"\] or
331
- # \["DEFAULT"\]. If you provide both, \["ALL", "DEFAULT"\], the
332
- # service uses a logical AND operator to determine which attributes to
333
- # return (in this case, it is all attributes). If you specify all
334
- # attributes, Rekognition performs additional detection.
335
- # @return [Array<String>]
336
- class DetectFacesRequest < Struct.new(
337
- :image,
338
- :attributes)
339
- include Aws::Structure
340
- end
319
+ # @!attribute [rw] deleted_faces
320
+ # An array of strings (face IDs) of the faces that were deleted.
321
+ # @return [Array<String>]
322
+ #
323
+ class DeleteFacesResponse < Struct.new(
324
+ :deleted_faces)
325
+ include Aws::Structure
326
+ end
341
327
 
342
- # @!attribute [rw] face_details
343
- # Details of each face found in the image.
344
- # @return [Array<Types::FaceDetail>]
345
- #
346
- # @!attribute [rw] orientation_correction
347
- # The algorithm detects the image orientation. If it detects that the
348
- # image was rotated, it returns the degrees of rotation. If your
349
- # application is displaying the image, you can use this value to
350
- # adjust the orientation.
351
- #
352
- # For example, if the service detects that the input image was rotated
353
- # by 90 degrees, it corrects orientation, performs face detection, and
354
- # then returns the faces. That is, the bounding box coordinates in the
355
- # response are based on the corrected orientation.
356
- # @return [String]
357
- class DetectFacesResponse < Struct.new(
358
- :face_details,
359
- :orientation_correction)
360
- include Aws::Structure
361
- end
328
+ # @note When making an API call, you may pass DetectFacesRequest
329
+ # data as a hash:
330
+ #
331
+ # {
332
+ # image: { # required
333
+ # bytes: "data",
334
+ # s3_object: {
335
+ # bucket: "S3Bucket",
336
+ # name: "S3ObjectName",
337
+ # version: "S3ObjectVersion",
338
+ # },
339
+ # },
340
+ # attributes: ["DEFAULT"], # accepts DEFAULT, ALL
341
+ # }
342
+ #
343
+ # @!attribute [rw] image
344
+ # The image in which you want to detect faces. You can specify a blob
345
+ # or an S3 object.
346
+ # @return [Types::Image]
347
+ #
348
+ # @!attribute [rw] attributes
349
+ # A list of facial attributes you would like to be returned. By
350
+ # default, the API returns subset of facial attributes.
351
+ #
352
+ # For example, you can specify the value as, \["ALL"\] or
353
+ # \["DEFAULT"\]. If you provide both, \["ALL", "DEFAULT"\], the
354
+ # service uses a logical AND operator to determine which attributes to
355
+ # return (in this case, it is all attributes). If you specify all
356
+ # attributes, Amazon Rekognition performs additional detection.
357
+ # @return [Array<String>]
358
+ #
359
+ class DetectFacesRequest < Struct.new(
360
+ :image,
361
+ :attributes)
362
+ include Aws::Structure
363
+ end
362
364
 
363
- # @note When making an API call, pass DetectLabelsRequest
364
- # data as a hash:
365
- #
366
- # {
367
- # image: { # required
368
- # bytes: "data",
369
- # s3_object: {
370
- # bucket: "S3Bucket",
371
- # name: "S3ObjectName",
372
- # version: "S3ObjectVersion",
373
- # },
374
- # },
375
- # max_labels: 1,
376
- # min_confidence: 1.0,
377
- # }
378
- # @!attribute [rw] image
379
- # The input image. You can provide a blob of image bytes or an S3
380
- # object.
381
- # @return [Types::Image]
382
- #
383
- # @!attribute [rw] max_labels
384
- # Maximum number of labels you want the service to return in the
385
- # response. The service returns the specified number of highest
386
- # confidence labels.
387
- # @return [Integer]
388
- #
389
- # @!attribute [rw] min_confidence
390
- # Specifies the minimum confidence level for the labels to return.
391
- # Amazon Rekognition doesn't return any labels with confidence lower
392
- # than this specified value.
393
- #
394
- # If `minConfidence` is not specified, the operation returns labels
395
- # with a confidence values greater than or equal to 50 percent.
396
- # @return [Float]
397
- class DetectLabelsRequest < Struct.new(
398
- :image,
399
- :max_labels,
400
- :min_confidence)
401
- include Aws::Structure
402
- end
365
+ # @!attribute [rw] face_details
366
+ # Details of each face found in the image.
367
+ # @return [Array<Types::FaceDetail>]
368
+ #
369
+ # @!attribute [rw] orientation_correction
370
+ # The algorithm detects the image orientation. If it detects that the
371
+ # image was rotated, it returns the degrees of rotation. If your
372
+ # application is displaying the image, you can use this value to
373
+ # adjust the orientation.
374
+ #
375
+ # For example, if the service detects that the input image was rotated
376
+ # by 90 degrees, it corrects orientation, performs face detection, and
377
+ # then returns the faces. That is, the bounding box coordinates in the
378
+ # response are based on the corrected orientation.
379
+ #
380
+ # <note markdown="1"> If the source image Exif metadata populates the orientation field,
381
+ # Amazon Rekognition does not perform orientation correction and the
382
+ # value of OrientationCorrection will be nil.
383
+ #
384
+ # </note>
385
+ # @return [String]
386
+ #
387
+ class DetectFacesResponse < Struct.new(
388
+ :face_details,
389
+ :orientation_correction)
390
+ include Aws::Structure
391
+ end
403
392
 
404
- # @!attribute [rw] labels
405
- # An array of labels for the real-world objects detected.
406
- # @return [Array<Types::Label>]
407
- #
408
- # @!attribute [rw] orientation_correction
409
- # Amazon Rekognition returns the orientation of the input image that
410
- # was detected (clockwise direction). If your application displays the
411
- # image, you can use this value to correct the orientation. If
412
- # Rekognition detects that the input image was rotated (for example,
413
- # by 90 degrees), it first corrects the orientation before detecting
414
- # the labels.
415
- # @return [String]
416
- class DetectLabelsResponse < Struct.new(
417
- :labels,
418
- :orientation_correction)
419
- include Aws::Structure
420
- end
393
+ # @note When making an API call, you may pass DetectLabelsRequest
394
+ # data as a hash:
395
+ #
396
+ # {
397
+ # image: { # required
398
+ # bytes: "data",
399
+ # s3_object: {
400
+ # bucket: "S3Bucket",
401
+ # name: "S3ObjectName",
402
+ # version: "S3ObjectVersion",
403
+ # },
404
+ # },
405
+ # max_labels: 1,
406
+ # min_confidence: 1.0,
407
+ # }
408
+ #
409
+ # @!attribute [rw] image
410
+ # The input image. You can provide a blob of image bytes or an S3
411
+ # object.
412
+ # @return [Types::Image]
413
+ #
414
+ # @!attribute [rw] max_labels
415
+ # Maximum number of labels you want the service to return in the
416
+ # response. The service returns the specified number of highest
417
+ # confidence labels.
418
+ # @return [Integer]
419
+ #
420
+ # @!attribute [rw] min_confidence
421
+ # Specifies the minimum confidence level for the labels to return.
422
+ # Amazon Rekognition doesn't return any labels with confidence lower
423
+ # than this specified value.
424
+ #
425
+ # If `minConfidence` is not specified, the operation returns labels
426
+ # with a confidence values greater than or equal to 50 percent.
427
+ # @return [Float]
428
+ #
429
+ class DetectLabelsRequest < Struct.new(
430
+ :image,
431
+ :max_labels,
432
+ :min_confidence)
433
+ include Aws::Structure
434
+ end
421
435
 
422
- # The emotions detected on the face, and the confidence level in the
423
- # determination. For example, HAPPY, SAD, and ANGRY.
424
- # @!attribute [rw] type
425
- # Type of emotion detected.
426
- # @return [String]
427
- #
428
- # @!attribute [rw] confidence
429
- # Level of confidence in the determination.
430
- # @return [Float]
431
- class Emotion < Struct.new(
432
- :type,
433
- :confidence)
434
- include Aws::Structure
435
- end
436
+ # @!attribute [rw] labels
437
+ # An array of labels for the real-world objects detected.
438
+ # @return [Array<Types::Label>]
439
+ #
440
+ # @!attribute [rw] orientation_correction
441
+ # Amazon Rekognition returns the orientation of the input image that
442
+ # was detected (clockwise direction). If your application displays the
443
+ # image, you can use this value to correct the orientation. If Amazon
444
+ # Rekognition detects that the input image was rotated (for example,
445
+ # by 90 degrees), it first corrects the orientation before detecting
446
+ # the labels.
447
+ #
448
+ # <note markdown="1"> If the source image Exif metadata populates the orientation field,
449
+ # Amazon Rekognition does not perform orientation correction and the
450
+ # value of OrientationCorrection will be nil.
451
+ #
452
+ # </note>
453
+ # @return [String]
454
+ #
455
+ class DetectLabelsResponse < Struct.new(
456
+ :labels,
457
+ :orientation_correction)
458
+ include Aws::Structure
459
+ end
436
460
 
437
- # Indicates whether or not the eyes on the face are open, and the
438
- # confidence level in the determination.
439
- # @!attribute [rw] value
440
- # Boolean value that indicates whether the eyes on the face are open.
441
- # @return [Boolean]
442
- #
443
- # @!attribute [rw] confidence
444
- # Level of confidence in the determination.
445
- # @return [Float]
446
- class EyeOpen < Struct.new(
447
- :value,
448
- :confidence)
449
- include Aws::Structure
450
- end
461
+ # The emotions detected on the face, and the confidence level in the
462
+ # determination. For example, HAPPY, SAD, and ANGRY.
463
+ #
464
+ # @!attribute [rw] type
465
+ # Type of emotion detected.
466
+ # @return [String]
467
+ #
468
+ # @!attribute [rw] confidence
469
+ # Level of confidence in the determination.
470
+ # @return [Float]
471
+ #
472
+ class Emotion < Struct.new(
473
+ :type,
474
+ :confidence)
475
+ include Aws::Structure
476
+ end
451
477
 
452
- # Indicates whether or not the face is wearing eye glasses, and the
453
- # confidence level in the determination.
454
- # @!attribute [rw] value
455
- # Boolean value that indicates whether the face is wearing eye glasses
456
- # or not.
457
- # @return [Boolean]
458
- #
459
- # @!attribute [rw] confidence
460
- # Level of confidence in the determination.
461
- # @return [Float]
462
- class Eyeglasses < Struct.new(
463
- :value,
464
- :confidence)
465
- include Aws::Structure
466
- end
478
+ # Indicates whether or not the eyes on the face are open, and the
479
+ # confidence level in the determination.
480
+ #
481
+ # @!attribute [rw] value
482
+ # Boolean value that indicates whether the eyes on the face are open.
483
+ # @return [Boolean]
484
+ #
485
+ # @!attribute [rw] confidence
486
+ # Level of confidence in the determination.
487
+ # @return [Float]
488
+ #
489
+ class EyeOpen < Struct.new(
490
+ :value,
491
+ :confidence)
492
+ include Aws::Structure
493
+ end
467
494
 
468
- # Describes the face properties such as the bounding box, face ID, image
469
- # ID of the source image, and external image ID that you assigned.
470
- # @!attribute [rw] face_id
471
- # Unique identifier that Amazon Rekognition assigns to the face.
472
- # @return [String]
473
- #
474
- # @!attribute [rw] bounding_box
475
- # Identifies the bounding box around the object or face. The `left`
476
- # (x-coordinate) and `top` (y-coordinate) are coordinates representing
477
- # the top and left sides of the bounding box. Note that the upper-left
478
- # corner of the image is the origin (0,0).
479
- #
480
- # The `top` and `left` values returned are ratios of the overall image
481
- # size. For example, if the input image is 700x200 pixels, and the
482
- # top-left coordinate of the bounding box is 350x50 pixels, the API
483
- # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
484
- # (50/200).
485
- #
486
- # The `width` and `height` values represent the dimensions of the
487
- # bounding box as a ratio of the overall image dimension. For example,
488
- # if the input image is 700x200 pixels, and the bounding box width is
489
- # 70 pixels, the width returned is 0.1.
490
- #
491
- # <note markdown="1"> The bounding box coordinates can have negative values. For example,
492
- # if Amazon Rekognition is able to detect a face that is at the image
493
- # edge and is only partially visible, the service can return
494
- # coordinates that are outside the image bounds and, depending on the
495
- # image edge, you might get negative values or values greater than 1
496
- # for the `left` or `top` values.
497
- #
498
- # </note>
499
- # @return [Types::BoundingBox]
500
- #
501
- # @!attribute [rw] image_id
502
- # Unique identifier that Amazon Rekognition assigns to the source
503
- # image.
504
- # @return [String]
505
- #
506
- # @!attribute [rw] external_image_id
507
- # Identifier that you assign to all the faces in the input image.
508
- # @return [String]
509
- #
510
- # @!attribute [rw] confidence
511
- # Confidence level that the bounding box contains a face (and not a
512
- # different object such as a tree).
513
- # @return [Float]
514
- class Face < Struct.new(
515
- :face_id,
516
- :bounding_box,
517
- :image_id,
518
- :external_image_id,
519
- :confidence)
520
- include Aws::Structure
521
- end
495
+ # Indicates whether or not the face is wearing eye glasses, and the
496
+ # confidence level in the determination.
497
+ #
498
+ # @!attribute [rw] value
499
+ # Boolean value that indicates whether the face is wearing eye glasses
500
+ # or not.
501
+ # @return [Boolean]
502
+ #
503
+ # @!attribute [rw] confidence
504
+ # Level of confidence in the determination.
505
+ # @return [Float]
506
+ #
507
+ class Eyeglasses < Struct.new(
508
+ :value,
509
+ :confidence)
510
+ include Aws::Structure
511
+ end
522
512
 
523
- # Structure containing attributes of the face that the algorithm
524
- # detected.
525
- # @!attribute [rw] bounding_box
526
- # Bounding box of the face.
527
- # @return [Types::BoundingBox]
528
- #
529
- # @!attribute [rw] smile
530
- # Indicates whether or not the face is smiling, and the confidence
531
- # level in the determination.
532
- # @return [Types::Smile]
533
- #
534
- # @!attribute [rw] eyeglasses
535
- # Indicates whether or not the face is wearing eye glasses, and the
536
- # confidence level in the determination.
537
- # @return [Types::Eyeglasses]
538
- #
539
- # @!attribute [rw] sunglasses
540
- # Indicates whether or not the face is wearing sunglasses, and the
541
- # confidence level in the determination.
542
- # @return [Types::Sunglasses]
543
- #
544
- # @!attribute [rw] gender
545
- # Gender of the face and the confidence level in the determination.
546
- # @return [Types::Gender]
547
- #
548
- # @!attribute [rw] beard
549
- # Indicates whether or not the face has a beard, and the confidence
550
- # level in the determination.
551
- # @return [Types::Beard]
552
- #
553
- # @!attribute [rw] mustache
554
- # Indicates whether or not the face has a mustache, and the confidence
555
- # level in the determination.
556
- # @return [Types::Mustache]
557
- #
558
- # @!attribute [rw] eyes_open
559
- # Indicates whether or not the eyes on the face are open, and the
560
- # confidence level in the determination.
561
- # @return [Types::EyeOpen]
562
- #
563
- # @!attribute [rw] mouth_open
564
- # Indicates whether or not the mouth on the face is open, and the
565
- # confidence level in the determination.
566
- # @return [Types::MouthOpen]
567
- #
568
- # @!attribute [rw] emotions
569
- # The emotions detected on the face, and the confidence level in the
570
- # determination. For example, HAPPY, SAD, and ANGRY.
571
- # @return [Array<Types::Emotion>]
572
- #
573
- # @!attribute [rw] landmarks
574
- # Indicates the location of the landmark on the face.
575
- # @return [Array<Types::Landmark>]
576
- #
577
- # @!attribute [rw] pose
578
- # Indicates the pose of the face as determined by pitch, roll, and the
579
- # yaw.
580
- # @return [Types::Pose]
581
- #
582
- # @!attribute [rw] quality
583
- # Identifies image brightness and sharpness.
584
- # @return [Types::ImageQuality]
585
- #
586
- # @!attribute [rw] confidence
587
- # Confidence level that the bounding box contains a face (and not a
588
- # different object such as a tree).
589
- # @return [Float]
590
- class FaceDetail < Struct.new(
591
- :bounding_box,
592
- :smile,
593
- :eyeglasses,
594
- :sunglasses,
595
- :gender,
596
- :beard,
597
- :mustache,
598
- :eyes_open,
599
- :mouth_open,
600
- :emotions,
601
- :landmarks,
602
- :pose,
603
- :quality,
604
- :confidence)
605
- include Aws::Structure
606
- end
513
+ # Describes the face properties such as the bounding box, face ID, image
514
+ # ID of the source image, and external image ID that you assigned.
515
+ #
516
+ # @!attribute [rw] face_id
517
+ # Unique identifier that Amazon Rekognition assigns to the face.
518
+ # @return [String]
519
+ #
520
+ # @!attribute [rw] bounding_box
521
+ # Identifies the bounding box around the object or face. The `left`
522
+ # (x-coordinate) and `top` (y-coordinate) are coordinates representing
523
+ # the top and left sides of the bounding box. Note that the upper-left
524
+ # corner of the image is the origin (0,0).
525
+ #
526
+ # The `top` and `left` values returned are ratios of the overall image
527
+ # size. For example, if the input image is 700x200 pixels, and the
528
+ # top-left coordinate of the bounding box is 350x50 pixels, the API
529
+ # returns a `left` value of 0.5 (350/700) and a `top` value of 0.25
530
+ # (50/200).
531
+ #
532
+ # The `width` and `height` values represent the dimensions of the
533
+ # bounding box as a ratio of the overall image dimension. For example,
534
+ # if the input image is 700x200 pixels, and the bounding box width is
535
+ # 70 pixels, the width returned is 0.1.
536
+ #
537
+ # <note markdown="1"> The bounding box coordinates can have negative values. For example,
538
+ # if Amazon Rekognition is able to detect a face that is at the image
539
+ # edge and is only partially visible, the service can return
540
+ # coordinates that are outside the image bounds and, depending on the
541
+ # image edge, you might get negative values or values greater than 1
542
+ # for the `left` or `top` values.
543
+ #
544
+ # </note>
545
+ # @return [Types::BoundingBox]
546
+ #
547
+ # @!attribute [rw] image_id
548
+ # Unique identifier that Amazon Rekognition assigns to the source
549
+ # image.
550
+ # @return [String]
551
+ #
552
+ # @!attribute [rw] external_image_id
553
+ # Identifier that you assign to all the faces in the input image.
554
+ # @return [String]
555
+ #
556
+ # @!attribute [rw] confidence
557
+ # Confidence level that the bounding box contains a face (and not a
558
+ # different object such as a tree).
559
+ # @return [Float]
560
+ #
561
+ class Face < Struct.new(
562
+ :face_id,
563
+ :bounding_box,
564
+ :image_id,
565
+ :external_image_id,
566
+ :confidence)
567
+ include Aws::Structure
568
+ end
607
569
 
608
- # Provides face metadata. In addition, it also provides the confidence
609
- # in the match of this face with the input face.
610
- # @!attribute [rw] similarity
611
- # Confidence in the match of this face with the input face.
612
- # @return [Float]
613
- #
614
- # @!attribute [rw] face
615
- # Describes the face properties such as the bounding box, face ID,
616
- # image ID of the source image, and external image ID that you
617
- # assigned.
618
- # @return [Types::Face]
619
- class FaceMatch < Struct.new(
620
- :similarity,
621
- :face)
622
- include Aws::Structure
623
- end
570
+ # Structure containing attributes of the face that the algorithm
571
+ # detected.
572
+ #
573
+ # @!attribute [rw] bounding_box
574
+ # Bounding box of the face.
575
+ # @return [Types::BoundingBox]
576
+ #
577
+ # @!attribute [rw] smile
578
+ # Indicates whether or not the face is smiling, and the confidence
579
+ # level in the determination.
580
+ # @return [Types::Smile]
581
+ #
582
+ # @!attribute [rw] eyeglasses
583
+ # Indicates whether or not the face is wearing eye glasses, and the
584
+ # confidence level in the determination.
585
+ # @return [Types::Eyeglasses]
586
+ #
587
+ # @!attribute [rw] sunglasses
588
+ # Indicates whether or not the face is wearing sunglasses, and the
589
+ # confidence level in the determination.
590
+ # @return [Types::Sunglasses]
591
+ #
592
+ # @!attribute [rw] gender
593
+ # Gender of the face and the confidence level in the determination.
594
+ # @return [Types::Gender]
595
+ #
596
+ # @!attribute [rw] beard
597
+ # Indicates whether or not the face has a beard, and the confidence
598
+ # level in the determination.
599
+ # @return [Types::Beard]
600
+ #
601
+ # @!attribute [rw] mustache
602
+ # Indicates whether or not the face has a mustache, and the confidence
603
+ # level in the determination.
604
+ # @return [Types::Mustache]
605
+ #
606
+ # @!attribute [rw] eyes_open
607
+ # Indicates whether or not the eyes on the face are open, and the
608
+ # confidence level in the determination.
609
+ # @return [Types::EyeOpen]
610
+ #
611
+ # @!attribute [rw] mouth_open
612
+ # Indicates whether or not the mouth on the face is open, and the
613
+ # confidence level in the determination.
614
+ # @return [Types::MouthOpen]
615
+ #
616
+ # @!attribute [rw] emotions
617
+ # The emotions detected on the face, and the confidence level in the
618
+ # determination. For example, HAPPY, SAD, and ANGRY.
619
+ # @return [Array<Types::Emotion>]
620
+ #
621
+ # @!attribute [rw] landmarks
622
+ # Indicates the location of the landmark on the face.
623
+ # @return [Array<Types::Landmark>]
624
+ #
625
+ # @!attribute [rw] pose
626
+ # Indicates the pose of the face as determined by pitch, roll, and the
627
+ # yaw.
628
+ # @return [Types::Pose]
629
+ #
630
+ # @!attribute [rw] quality
631
+ # Identifies image brightness and sharpness.
632
+ # @return [Types::ImageQuality]
633
+ #
634
+ # @!attribute [rw] confidence
635
+ # Confidence level that the bounding box contains a face (and not a
636
+ # different object such as a tree).
637
+ # @return [Float]
638
+ #
639
+ class FaceDetail < Struct.new(
640
+ :bounding_box,
641
+ :smile,
642
+ :eyeglasses,
643
+ :sunglasses,
644
+ :gender,
645
+ :beard,
646
+ :mustache,
647
+ :eyes_open,
648
+ :mouth_open,
649
+ :emotions,
650
+ :landmarks,
651
+ :pose,
652
+ :quality,
653
+ :confidence)
654
+ include Aws::Structure
655
+ end
624
656
 
625
- # Object containing both the face metadata (stored in the back-end
626
- # database) and facial attributes that are detected but aren't stored
627
- # in the database.
628
- # @!attribute [rw] face
629
- # Describes the face properties such as the bounding box, face ID,
630
- # image ID of the source image, and external image ID that you
631
- # assigned.
632
- # @return [Types::Face]
633
- #
634
- # @!attribute [rw] face_detail
635
- # Structure containing attributes of the face that the algorithm
636
- # detected.
637
- # @return [Types::FaceDetail]
638
- class FaceRecord < Struct.new(
639
- :face,
640
- :face_detail)
641
- include Aws::Structure
642
- end
657
+ # Provides face metadata. In addition, it also provides the confidence
658
+ # in the match of this face with the input face.
659
+ #
660
+ # @!attribute [rw] similarity
661
+ # Confidence in the match of this face with the input face.
662
+ # @return [Float]
663
+ #
664
+ # @!attribute [rw] face
665
+ # Describes the face properties such as the bounding box, face ID,
666
+ # image ID of the source image, and external image ID that you
667
+ # assigned.
668
+ # @return [Types::Face]
669
+ #
670
+ class FaceMatch < Struct.new(
671
+ :similarity,
672
+ :face)
673
+ include Aws::Structure
674
+ end
643
675
 
644
- # Gender of the face and the confidence level in the determination.
645
- # @!attribute [rw] value
646
- # Gender of the face.
647
- # @return [String]
648
- #
649
- # @!attribute [rw] confidence
650
- # Level of confidence in the determination.
651
- # @return [Float]
652
- class Gender < Struct.new(
653
- :value,
654
- :confidence)
655
- include Aws::Structure
656
- end
676
+ # Object containing both the face metadata (stored in the back-end
677
+ # database) and facial attributes that are detected but aren't stored
678
+ # in the database.
679
+ #
680
+ # @!attribute [rw] face
681
+ # Describes the face properties such as the bounding box, face ID,
682
+ # image ID of the source image, and external image ID that you
683
+ # assigned.
684
+ # @return [Types::Face]
685
+ #
686
+ # @!attribute [rw] face_detail
687
+ # Structure containing attributes of the face that the algorithm
688
+ # detected.
689
+ # @return [Types::FaceDetail]
690
+ #
691
+ class FaceRecord < Struct.new(
692
+ :face,
693
+ :face_detail)
694
+ include Aws::Structure
695
+ end
657
696
 
658
- # Provides the source image either as bytes or an S3 object.
659
- # @note When making an API call, pass Image
660
- # data as a hash:
661
- #
662
- # {
663
- # bytes: "data",
664
- # s3_object: {
665
- # bucket: "S3Bucket",
666
- # name: "S3ObjectName",
667
- # version: "S3ObjectVersion",
668
- # },
669
- # }
670
- # @!attribute [rw] bytes
671
- # Blob of image bytes up to 5 MBs.
672
- # @return [String]
673
- #
674
- # @!attribute [rw] s3_object
675
- # Identifies an S3 object as the image source.
676
- # @return [Types::S3Object]
677
- class Image < Struct.new(
678
- :bytes,
679
- :s3_object)
680
- include Aws::Structure
681
- end
697
+ # Gender of the face and the confidence level in the determination.
698
+ #
699
+ # @!attribute [rw] value
700
+ # Gender of the face.
701
+ # @return [String]
702
+ #
703
+ # @!attribute [rw] confidence
704
+ # Level of confidence in the determination.
705
+ # @return [Float]
706
+ #
707
+ class Gender < Struct.new(
708
+ :value,
709
+ :confidence)
710
+ include Aws::Structure
711
+ end
682
712
 
683
- # Identifies image brightness and sharpness.
684
- # @!attribute [rw] brightness
685
- # Value representing brightness of the face. The service returns a
686
- # value between 0 and 1 (inclusive).
687
- # @return [Float]
688
- #
689
- # @!attribute [rw] sharpness
690
- # Value representing sharpness of the face.
691
- # @return [Float]
692
- class ImageQuality < Struct.new(
693
- :brightness,
694
- :sharpness)
695
- include Aws::Structure
696
- end
713
+ # Provides the source image either as bytes or an S3 object.
714
+ #
715
+ # The region for the S3 bucket containing the S3 object must match the
716
+ # region you use for Amazon Rekognition operations.
717
+ #
718
+ # You may need to Base64-encode the image bytes depending on the
719
+ # language you are using and whether or not you are using the AWS SDK.
720
+ # For more information, see example4.
721
+ #
722
+ # If you use the Amazon CLI to call Amazon Rekognition operations,
723
+ # passing image bytes using the Bytes property is not supported. You
724
+ # must first upload the image to an Amazon S3 bucket and then call the
725
+ # operation using the S3Object property.
726
+ #
727
+ # For Amazon Rekognition to process an S3 object, the user must have
728
+ # permission to access the S3 object. For more information, see
729
+ # manage-access-resource-policies.
730
+ #
731
+ # @note When making an API call, you may pass Image
732
+ # data as a hash:
733
+ #
734
+ # {
735
+ # bytes: "data",
736
+ # s3_object: {
737
+ # bucket: "S3Bucket",
738
+ # name: "S3ObjectName",
739
+ # version: "S3ObjectVersion",
740
+ # },
741
+ # }
742
+ #
743
+ # @!attribute [rw] bytes
744
+ # Blob of image bytes up to 5 MBs.
745
+ # @return [String]
746
+ #
747
+ # @!attribute [rw] s3_object
748
+ # Identifies an S3 object as the image source.
749
+ # @return [Types::S3Object]
750
+ #
751
+ class Image < Struct.new(
752
+ :bytes,
753
+ :s3_object)
754
+ include Aws::Structure
755
+ end
697
756
 
698
- # @note When making an API call, pass IndexFacesRequest
699
- # data as a hash:
700
- #
701
- # {
702
- # collection_id: "CollectionId", # required
703
- # image: { # required
704
- # bytes: "data",
705
- # s3_object: {
706
- # bucket: "S3Bucket",
707
- # name: "S3ObjectName",
708
- # version: "S3ObjectVersion",
709
- # },
710
- # },
711
- # external_image_id: "ExternalImageId",
712
- # detection_attributes: ["DEFAULT"], # accepts DEFAULT, ALL
713
- # }
714
- # @!attribute [rw] collection_id
715
- # ID of an existing collection to which you want to add the faces that
716
- # are detected in the input images.
717
- # @return [String]
718
- #
719
- # @!attribute [rw] image
720
- # Provides the source image either as bytes or an S3 object.
721
- # @return [Types::Image]
722
- #
723
- # @!attribute [rw] external_image_id
724
- # ID you want to assign to all the faces detected in the image.
725
- # @return [String]
726
- #
727
- # @!attribute [rw] detection_attributes
728
- # (Optional) Returns detailed attributes of indexed faces. By default,
729
- # the operation returns a subset of the facial attributes.
730
- #
731
- # For example, you can specify the value as, \["ALL"\] or
732
- # \["DEFAULT"\]. If you provide both, \["ALL", "DEFAULT"\],
733
- # Rekognition uses the logical AND operator to determine which
734
- # attributes to return (in this case, it is all attributes). If you
735
- # specify all attributes, the service performs additional detection,
736
- # in addition to the default.
737
- # @return [Array<String>]
738
- class IndexFacesRequest < Struct.new(
739
- :collection_id,
740
- :image,
741
- :external_image_id,
742
- :detection_attributes)
743
- include Aws::Structure
744
- end
757
+ # Identifies image brightness and sharpness.
758
+ #
759
+ # @!attribute [rw] brightness
760
+ # Value representing brightness of the face. The service returns a
761
+ # value between 0 and 1 (inclusive).
762
+ # @return [Float]
763
+ #
764
+ # @!attribute [rw] sharpness
765
+ # Value representing sharpness of the face.
766
+ # @return [Float]
767
+ #
768
+ class ImageQuality < Struct.new(
769
+ :brightness,
770
+ :sharpness)
771
+ include Aws::Structure
772
+ end
745
773
 
746
- # @!attribute [rw] face_records
747
- # An array of faces detected and added to the collection. For more
748
- # information, see howitworks-index-faces.
749
- # @return [Array<Types::FaceRecord>]
750
- #
751
- # @!attribute [rw] orientation_correction
752
- # The algorithm detects the image orientation. If it detects that the
753
- # image was rotated, it returns the degree of rotation. You can use
754
- # this value to correct the orientation and also appropriately analyze
755
- # the bounding box coordinates that are returned.
756
- # @return [String]
757
- class IndexFacesResponse < Struct.new(
758
- :face_records,
759
- :orientation_correction)
760
- include Aws::Structure
761
- end
774
+ # @note When making an API call, you may pass IndexFacesRequest
775
+ # data as a hash:
776
+ #
777
+ # {
778
+ # collection_id: "CollectionId", # required
779
+ # image: { # required
780
+ # bytes: "data",
781
+ # s3_object: {
782
+ # bucket: "S3Bucket",
783
+ # name: "S3ObjectName",
784
+ # version: "S3ObjectVersion",
785
+ # },
786
+ # },
787
+ # external_image_id: "ExternalImageId",
788
+ # detection_attributes: ["DEFAULT"], # accepts DEFAULT, ALL
789
+ # }
790
+ #
791
+ # @!attribute [rw] collection_id
792
+ # ID of an existing collection to which you want to add the faces that
793
+ # are detected in the input images.
794
+ # @return [String]
795
+ #
796
+ # @!attribute [rw] image
797
+ # Provides the source image either as bytes or an S3 object.
798
+ #
799
+ # The region for the S3 bucket containing the S3 object must match the
800
+ # region you use for Amazon Rekognition operations.
801
+ #
802
+ # You may need to Base64-encode the image bytes depending on the
803
+ # language you are using and whether or not you are using the AWS SDK.
804
+ # For more information, see example4.
805
+ #
806
+ # If you use the Amazon CLI to call Amazon Rekognition operations,
807
+ # passing image bytes using the Bytes property is not supported. You
808
+ # must first upload the image to an Amazon S3 bucket and then call the
809
+ # operation using the S3Object property.
810
+ #
811
+ # For Amazon Rekognition to process an S3 object, the user must have
812
+ # permission to access the S3 object. For more information, see
813
+ # manage-access-resource-policies.
814
+ # @return [Types::Image]
815
+ #
816
+ # @!attribute [rw] external_image_id
817
+ # ID you want to assign to all the faces detected in the image.
818
+ # @return [String]
819
+ #
820
+ # @!attribute [rw] detection_attributes
821
+ # (Optional) Returns detailed attributes of indexed faces. By default,
822
+ # the operation returns a subset of the facial attributes.
823
+ #
824
+ # For example, you can specify the value as, \["ALL"\] or
825
+ # \["DEFAULT"\]. If you provide both, \["ALL", "DEFAULT"\],
826
+ # Amazon Rekognition uses the logical AND operator to determine which
827
+ # attributes to return (in this case, it is all attributes). If you
828
+ # specify all attributes, the service performs additional detection,
829
+ # in addition to the default.
830
+ # @return [Array<String>]
831
+ #
832
+ class IndexFacesRequest < Struct.new(
833
+ :collection_id,
834
+ :image,
835
+ :external_image_id,
836
+ :detection_attributes)
837
+ include Aws::Structure
838
+ end
762
839
 
763
- # Structure containing details about the detected label, including
764
- # bounding box, name, and level of confidence.
765
- # @!attribute [rw] name
766
- # The name (label) of the object.
767
- # @return [String]
768
- #
769
- # @!attribute [rw] confidence
770
- # Level of confidence.
771
- # @return [Float]
772
- class Label < Struct.new(
773
- :name,
774
- :confidence)
775
- include Aws::Structure
776
- end
840
+ # @!attribute [rw] face_records
841
+ # An array of faces detected and added to the collection. For more
842
+ # information, see howitworks-index-faces.
843
+ # @return [Array<Types::FaceRecord>]
844
+ #
845
+ # @!attribute [rw] orientation_correction
846
+ # The algorithm detects the image orientation. If it detects that the
847
+ # image was rotated, it returns the degree of rotation. You can use
848
+ # this value to correct the orientation and also appropriately analyze
849
+ # the bounding box coordinates that are returned.
850
+ #
851
+ # <note markdown="1"> If the source image Exif metadata populates the orientation field,
852
+ # Amazon Rekognition does not perform orientation correction and the
853
+ # value of OrientationCorrection will be nil.
854
+ #
855
+ # </note>
856
+ # @return [String]
857
+ #
858
+ class IndexFacesResponse < Struct.new(
859
+ :face_records,
860
+ :orientation_correction)
861
+ include Aws::Structure
862
+ end
777
863
 
778
- # Indicates the location of the landmark on the face.
779
- # @!attribute [rw] type
780
- # Type of the landmark.
781
- # @return [String]
782
- #
783
- # @!attribute [rw] x
784
- # x-coordinate from the top left of the landmark expressed as the
785
- # ration of the width of the image. For example, if the images is
786
- # 700x200 and the x-coordinate of the landmark is at 350 pixels, then
787
- # this value is 0.5.
788
- # @return [Float]
789
- #
790
- # @!attribute [rw] y
791
- # y-coordinate from the top left of the landmark expressed as the
792
- # ration of the height of the image. For example, if the images is
793
- # 700x200 and the y-coordinate of the landmark is at 100 pixels, then
794
- # this value is 0.5.
795
- # @return [Float]
796
- class Landmark < Struct.new(
797
- :type,
798
- :x,
799
- :y)
800
- include Aws::Structure
801
- end
864
+ # Structure containing details about the detected label, including name,
865
+ # and level of confidence.
866
+ #
867
+ # @!attribute [rw] name
868
+ # The name (label) of the object.
869
+ # @return [String]
870
+ #
871
+ # @!attribute [rw] confidence
872
+ # Level of confidence.
873
+ # @return [Float]
874
+ #
875
+ class Label < Struct.new(
876
+ :name,
877
+ :confidence)
878
+ include Aws::Structure
879
+ end
802
880
 
803
- # @note When making an API call, pass ListCollectionsRequest
804
- # data as a hash:
805
- #
806
- # {
807
- # next_token: "PaginationToken",
808
- # max_results: 1,
809
- # }
810
- # @!attribute [rw] next_token
811
- # Pagination token from the previous response.
812
- # @return [String]
813
- #
814
- # @!attribute [rw] max_results
815
- # Maximum number of collection IDs to return.
816
- # @return [Integer]
817
- class ListCollectionsRequest < Struct.new(
818
- :next_token,
819
- :max_results)
820
- include Aws::Structure
821
- end
881
+ # Indicates the location of the landmark on the face.
882
+ #
883
+ # @!attribute [rw] type
884
+ # Type of the landmark.
885
+ # @return [String]
886
+ #
887
+ # @!attribute [rw] x
888
+ # x-coordinate from the top left of the landmark expressed as the
889
+ # ration of the width of the image. For example, if the images is
890
+ # 700x200 and the x-coordinate of the landmark is at 350 pixels, this
891
+ # value is 0.5.
892
+ # @return [Float]
893
+ #
894
+ # @!attribute [rw] y
895
+ # y-coordinate from the top left of the landmark expressed as the
896
+ # ration of the height of the image. For example, if the images is
897
+ # 700x200 and the y-coordinate of the landmark is at 100 pixels, this
898
+ # value is 0.5.
899
+ # @return [Float]
900
+ #
901
+ class Landmark < Struct.new(
902
+ :type,
903
+ :x,
904
+ :y)
905
+ include Aws::Structure
906
+ end
822
907
 
823
- # @!attribute [rw] collection_ids
824
- # An array of collection IDs.
825
- # @return [Array<String>]
826
- #
827
- # @!attribute [rw] next_token
828
- # If the result is truncated, the response provides a `NextToken` that
829
- # you can use in the subsequent request to fetch the next set of
830
- # collection IDs.
831
- # @return [String]
832
- class ListCollectionsResponse < Struct.new(
833
- :collection_ids,
834
- :next_token)
835
- include Aws::Structure
836
- end
908
+ # @note When making an API call, you may pass ListCollectionsRequest
909
+ # data as a hash:
910
+ #
911
+ # {
912
+ # next_token: "PaginationToken",
913
+ # max_results: 1,
914
+ # }
915
+ #
916
+ # @!attribute [rw] next_token
917
+ # Pagination token from the previous response.
918
+ # @return [String]
919
+ #
920
+ # @!attribute [rw] max_results
921
+ # Maximum number of collection IDs to return.
922
+ # @return [Integer]
923
+ #
924
+ class ListCollectionsRequest < Struct.new(
925
+ :next_token,
926
+ :max_results)
927
+ include Aws::Structure
928
+ end
837
929
 
838
- # @note When making an API call, pass ListFacesRequest
839
- # data as a hash:
840
- #
841
- # {
842
- # collection_id: "CollectionId", # required
843
- # next_token: "PaginationToken",
844
- # max_results: 1,
845
- # }
846
- # @!attribute [rw] collection_id
847
- # ID of the collection from which to list the faces.
848
- # @return [String]
849
- #
850
- # @!attribute [rw] next_token
851
- # If the previous response was incomplete (because there is more data
852
- # to retrieve), Amazon Rekognition returns a pagination token in the
853
- # response. You can use this pagination token to retrieve the next set
854
- # of faces.
855
- # @return [String]
856
- #
857
- # @!attribute [rw] max_results
858
- # Maximum number of faces to return.
859
- # @return [Integer]
860
- class ListFacesRequest < Struct.new(
861
- :collection_id,
862
- :next_token,
863
- :max_results)
864
- include Aws::Structure
865
- end
930
+ # @!attribute [rw] collection_ids
931
+ # An array of collection IDs.
932
+ # @return [Array<String>]
933
+ #
934
+ # @!attribute [rw] next_token
935
+ # If the result is truncated, the response provides a `NextToken` that
936
+ # you can use in the subsequent request to fetch the next set of
937
+ # collection IDs.
938
+ # @return [String]
939
+ #
940
+ class ListCollectionsResponse < Struct.new(
941
+ :collection_ids,
942
+ :next_token)
943
+ include Aws::Structure
944
+ end
866
945
 
867
- # @!attribute [rw] faces
868
- # An array of `Face` objects.
869
- # @return [Array<Types::Face>]
870
- #
871
- # @!attribute [rw] next_token
872
- # If the response is truncated, Amazon Rekognition returns this token
873
- # that you can use in the subsequent request to retrieve the next set
874
- # of faces.
875
- # @return [String]
876
- class ListFacesResponse < Struct.new(
877
- :faces,
878
- :next_token)
879
- include Aws::Structure
880
- end
946
+ # @note When making an API call, you may pass ListFacesRequest
947
+ # data as a hash:
948
+ #
949
+ # {
950
+ # collection_id: "CollectionId", # required
951
+ # next_token: "PaginationToken",
952
+ # max_results: 1,
953
+ # }
954
+ #
955
+ # @!attribute [rw] collection_id
956
+ # ID of the collection from which to list the faces.
957
+ # @return [String]
958
+ #
959
+ # @!attribute [rw] next_token
960
+ # If the previous response was incomplete (because there is more data
961
+ # to retrieve), Amazon Rekognition returns a pagination token in the
962
+ # response. You can use this pagination token to retrieve the next set
963
+ # of faces.
964
+ # @return [String]
965
+ #
966
+ # @!attribute [rw] max_results
967
+ # Maximum number of faces to return.
968
+ # @return [Integer]
969
+ #
970
+ class ListFacesRequest < Struct.new(
971
+ :collection_id,
972
+ :next_token,
973
+ :max_results)
974
+ include Aws::Structure
975
+ end
881
976
 
882
- # Indicates whether or not the mouth on the face is open, and the
883
- # confidence level in the determination.
884
- # @!attribute [rw] value
885
- # Boolean value that indicates whether the mouth on the face is open
886
- # or not.
887
- # @return [Boolean]
888
- #
889
- # @!attribute [rw] confidence
890
- # Level of confidence in the determination.
891
- # @return [Float]
892
- class MouthOpen < Struct.new(
893
- :value,
894
- :confidence)
895
- include Aws::Structure
896
- end
977
+ # @!attribute [rw] faces
978
+ # An array of `Face` objects.
979
+ # @return [Array<Types::Face>]
980
+ #
981
+ # @!attribute [rw] next_token
982
+ # If the response is truncated, Amazon Rekognition returns this token
983
+ # that you can use in the subsequent request to retrieve the next set
984
+ # of faces.
985
+ # @return [String]
986
+ #
987
+ class ListFacesResponse < Struct.new(
988
+ :faces,
989
+ :next_token)
990
+ include Aws::Structure
991
+ end
897
992
 
898
- # Indicates whether or not the face has a mustache, and the confidence
899
- # level in the determination.
900
- # @!attribute [rw] value
901
- # Boolean value that indicates whether the face has mustache or not.
902
- # @return [Boolean]
903
- #
904
- # @!attribute [rw] confidence
905
- # Level of confidence in the determination.
906
- # @return [Float]
907
- class Mustache < Struct.new(
908
- :value,
909
- :confidence)
910
- include Aws::Structure
911
- end
993
+ # Indicates whether or not the mouth on the face is open, and the
994
+ # confidence level in the determination.
995
+ #
996
+ # @!attribute [rw] value
997
+ # Boolean value that indicates whether the mouth on the face is open
998
+ # or not.
999
+ # @return [Boolean]
1000
+ #
1001
+ # @!attribute [rw] confidence
1002
+ # Level of confidence in the determination.
1003
+ # @return [Float]
1004
+ #
1005
+ class MouthOpen < Struct.new(
1006
+ :value,
1007
+ :confidence)
1008
+ include Aws::Structure
1009
+ end
912
1010
 
913
- # Indicates the pose of the face as determined by pitch, roll, and the
914
- # yaw.
915
- # @!attribute [rw] roll
916
- # Value representing the face rotation on the roll axis.
917
- # @return [Float]
918
- #
919
- # @!attribute [rw] yaw
920
- # Value representing the face rotation on the yaw axis.
921
- # @return [Float]
922
- #
923
- # @!attribute [rw] pitch
924
- # Value representing the face rotation on the pitch axis.
925
- # @return [Float]
926
- class Pose < Struct.new(
927
- :roll,
928
- :yaw,
929
- :pitch)
930
- include Aws::Structure
931
- end
1011
+ # Indicates whether or not the face has a mustache, and the confidence
1012
+ # level in the determination.
1013
+ #
1014
+ # @!attribute [rw] value
1015
+ # Boolean value that indicates whether the face has mustache or not.
1016
+ # @return [Boolean]
1017
+ #
1018
+ # @!attribute [rw] confidence
1019
+ # Level of confidence in the determination.
1020
+ # @return [Float]
1021
+ #
1022
+ class Mustache < Struct.new(
1023
+ :value,
1024
+ :confidence)
1025
+ include Aws::Structure
1026
+ end
932
1027
 
933
- # Provides the S3 bucket name and object name.
934
- # @note When making an API call, pass S3Object
935
- # data as a hash:
936
- #
937
- # {
938
- # bucket: "S3Bucket",
939
- # name: "S3ObjectName",
940
- # version: "S3ObjectVersion",
941
- # }
942
- # @!attribute [rw] bucket
943
- # Name of the S3 bucket.
944
- # @return [String]
945
- #
946
- # @!attribute [rw] name
947
- # S3 object key name.
948
- # @return [String]
949
- #
950
- # @!attribute [rw] version
951
- # If the bucket is versioning enabled, you can specify the object
952
- # version.
953
- # @return [String]
954
- class S3Object < Struct.new(
955
- :bucket,
956
- :name,
957
- :version)
958
- include Aws::Structure
959
- end
1028
+ # Indicates the pose of the face as determined by pitch, roll, and the
1029
+ # yaw.
1030
+ #
1031
+ # @!attribute [rw] roll
1032
+ # Value representing the face rotation on the roll axis.
1033
+ # @return [Float]
1034
+ #
1035
+ # @!attribute [rw] yaw
1036
+ # Value representing the face rotation on the yaw axis.
1037
+ # @return [Float]
1038
+ #
1039
+ # @!attribute [rw] pitch
1040
+ # Value representing the face rotation on the pitch axis.
1041
+ # @return [Float]
1042
+ #
1043
+ class Pose < Struct.new(
1044
+ :roll,
1045
+ :yaw,
1046
+ :pitch)
1047
+ include Aws::Structure
1048
+ end
960
1049
 
961
- # @note When making an API call, pass SearchFacesByImageRequest
962
- # data as a hash:
963
- #
964
- # {
965
- # collection_id: "CollectionId", # required
966
- # image: { # required
967
- # bytes: "data",
968
- # s3_object: {
969
- # bucket: "S3Bucket",
970
- # name: "S3ObjectName",
971
- # version: "S3ObjectVersion",
972
- # },
973
- # },
974
- # max_faces: 1,
975
- # face_match_threshold: 1.0,
976
- # }
977
- # @!attribute [rw] collection_id
978
- # ID of the collection to search.
979
- # @return [String]
980
- #
981
- # @!attribute [rw] image
982
- # Provides the source image either as bytes or an S3 object.
983
- # @return [Types::Image]
984
- #
985
- # @!attribute [rw] max_faces
986
- # Maximum number of faces to return. The operation returns the maximum
987
- # number of faces with the highest confidence in the match.
988
- # @return [Integer]
989
- #
990
- # @!attribute [rw] face_match_threshold
991
- # (Optional) Specifies the minimum confidence in the face match to
992
- # return. For example, don't return any matches where confidence in
993
- # matches is less than 70%.
994
- # @return [Float]
995
- class SearchFacesByImageRequest < Struct.new(
996
- :collection_id,
997
- :image,
998
- :max_faces,
999
- :face_match_threshold)
1000
- include Aws::Structure
1001
- end
1050
+ # Provides the S3 bucket name and object name.
1051
+ #
1052
+ # The region for the S3 bucket containing the S3 object must match the
1053
+ # region you use for Amazon Rekognition operations.
1054
+ #
1055
+ # For Amazon Rekognition to process an S3 object, the user must have
1056
+ # permission to access the S3 object. For more information, see
1057
+ # manage-access-resource-policies.
1058
+ #
1059
+ # @note When making an API call, you may pass S3Object
1060
+ # data as a hash:
1061
+ #
1062
+ # {
1063
+ # bucket: "S3Bucket",
1064
+ # name: "S3ObjectName",
1065
+ # version: "S3ObjectVersion",
1066
+ # }
1067
+ #
1068
+ # @!attribute [rw] bucket
1069
+ # Name of the S3 bucket.
1070
+ # @return [String]
1071
+ #
1072
+ # @!attribute [rw] name
1073
+ # S3 object key name.
1074
+ # @return [String]
1075
+ #
1076
+ # @!attribute [rw] version
1077
+ # If the bucket is versioning enabled, you can specify the object
1078
+ # version.
1079
+ # @return [String]
1080
+ #
1081
+ class S3Object < Struct.new(
1082
+ :bucket,
1083
+ :name,
1084
+ :version)
1085
+ include Aws::Structure
1086
+ end
1002
1087
 
1003
- # @!attribute [rw] searched_face_bounding_box
1004
- # The bounding box around the face in the input image that Rekognition
1005
- # used for the search.
1006
- # @return [Types::BoundingBox]
1007
- #
1008
- # @!attribute [rw] searched_face_confidence
1009
- # The level of confidence that the `searchedFaceBoundingBox`, contains
1010
- # a face.
1011
- # @return [Float]
1012
- #
1013
- # @!attribute [rw] face_matches
1014
- # An array of faces that match the input face, along with the
1015
- # confidence in the match.
1016
- # @return [Array<Types::FaceMatch>]
1017
- class SearchFacesByImageResponse < Struct.new(
1018
- :searched_face_bounding_box,
1019
- :searched_face_confidence,
1020
- :face_matches)
1021
- include Aws::Structure
1022
- end
1088
+ # @note When making an API call, you may pass SearchFacesByImageRequest
1089
+ # data as a hash:
1090
+ #
1091
+ # {
1092
+ # collection_id: "CollectionId", # required
1093
+ # image: { # required
1094
+ # bytes: "data",
1095
+ # s3_object: {
1096
+ # bucket: "S3Bucket",
1097
+ # name: "S3ObjectName",
1098
+ # version: "S3ObjectVersion",
1099
+ # },
1100
+ # },
1101
+ # max_faces: 1,
1102
+ # face_match_threshold: 1.0,
1103
+ # }
1104
+ #
1105
+ # @!attribute [rw] collection_id
1106
+ # ID of the collection to search.
1107
+ # @return [String]
1108
+ #
1109
+ # @!attribute [rw] image
1110
+ # Provides the source image either as bytes or an S3 object.
1111
+ #
1112
+ # The region for the S3 bucket containing the S3 object must match the
1113
+ # region you use for Amazon Rekognition operations.
1114
+ #
1115
+ # You may need to Base64-encode the image bytes depending on the
1116
+ # language you are using and whether or not you are using the AWS SDK.
1117
+ # For more information, see example4.
1118
+ #
1119
+ # If you use the Amazon CLI to call Amazon Rekognition operations,
1120
+ # passing image bytes using the Bytes property is not supported. You
1121
+ # must first upload the image to an Amazon S3 bucket and then call the
1122
+ # operation using the S3Object property.
1123
+ #
1124
+ # For Amazon Rekognition to process an S3 object, the user must have
1125
+ # permission to access the S3 object. For more information, see
1126
+ # manage-access-resource-policies.
1127
+ # @return [Types::Image]
1128
+ #
1129
+ # @!attribute [rw] max_faces
1130
+ # Maximum number of faces to return. The operation returns the maximum
1131
+ # number of faces with the highest confidence in the match.
1132
+ # @return [Integer]
1133
+ #
1134
+ # @!attribute [rw] face_match_threshold
1135
+ # (Optional) Specifies the minimum confidence in the face match to
1136
+ # return. For example, don't return any matches where confidence in
1137
+ # matches is less than 70%.
1138
+ # @return [Float]
1139
+ #
1140
+ class SearchFacesByImageRequest < Struct.new(
1141
+ :collection_id,
1142
+ :image,
1143
+ :max_faces,
1144
+ :face_match_threshold)
1145
+ include Aws::Structure
1146
+ end
1023
1147
 
1024
- # @note When making an API call, pass SearchFacesRequest
1025
- # data as a hash:
1026
- #
1027
- # {
1028
- # collection_id: "CollectionId", # required
1029
- # face_id: "FaceId", # required
1030
- # max_faces: 1,
1031
- # face_match_threshold: 1.0,
1032
- # }
1033
- # @!attribute [rw] collection_id
1034
- # ID of the collection to search.
1035
- # @return [String]
1036
- #
1037
- # @!attribute [rw] face_id
1038
- # ID of a face to find matches for in the collection.
1039
- # @return [String]
1040
- #
1041
- # @!attribute [rw] max_faces
1042
- # Maximum number of faces to return. The API will return the maximum
1043
- # number of faces with the highest confidence in the match.
1044
- # @return [Integer]
1045
- #
1046
- # @!attribute [rw] face_match_threshold
1047
- # Optional value specifying the minimum confidence in the face match
1048
- # to return. For example, don't return any matches where confidence
1049
- # in matches is less than 70%.
1050
- # @return [Float]
1051
- class SearchFacesRequest < Struct.new(
1052
- :collection_id,
1053
- :face_id,
1054
- :max_faces,
1055
- :face_match_threshold)
1056
- include Aws::Structure
1057
- end
1148
+ # @!attribute [rw] searched_face_bounding_box
1149
+ # The bounding box around the face in the input image that Amazon
1150
+ # Rekognition used for the search.
1151
+ # @return [Types::BoundingBox]
1152
+ #
1153
+ # @!attribute [rw] searched_face_confidence
1154
+ # The level of confidence that the `searchedFaceBoundingBox`, contains
1155
+ # a face.
1156
+ # @return [Float]
1157
+ #
1158
+ # @!attribute [rw] face_matches
1159
+ # An array of faces that match the input face, along with the
1160
+ # confidence in the match.
1161
+ # @return [Array<Types::FaceMatch>]
1162
+ #
1163
+ class SearchFacesByImageResponse < Struct.new(
1164
+ :searched_face_bounding_box,
1165
+ :searched_face_confidence,
1166
+ :face_matches)
1167
+ include Aws::Structure
1168
+ end
1058
1169
 
1059
- # @!attribute [rw] searched_face_id
1060
- # ID of the face that was searched for matches in a collection.
1061
- # @return [String]
1062
- #
1063
- # @!attribute [rw] face_matches
1064
- # An array of faces that matched the input face, along with the
1065
- # confidence in the match.
1066
- # @return [Array<Types::FaceMatch>]
1067
- class SearchFacesResponse < Struct.new(
1068
- :searched_face_id,
1069
- :face_matches)
1070
- include Aws::Structure
1071
- end
1170
+ # @note When making an API call, you may pass SearchFacesRequest
1171
+ # data as a hash:
1172
+ #
1173
+ # {
1174
+ # collection_id: "CollectionId", # required
1175
+ # face_id: "FaceId", # required
1176
+ # max_faces: 1,
1177
+ # face_match_threshold: 1.0,
1178
+ # }
1179
+ #
1180
+ # @!attribute [rw] collection_id
1181
+ # ID of the collection the face belongs to.
1182
+ # @return [String]
1183
+ #
1184
+ # @!attribute [rw] face_id
1185
+ # ID of a face to find matches for in the collection.
1186
+ # @return [String]
1187
+ #
1188
+ # @!attribute [rw] max_faces
1189
+ # Maximum number of faces to return. The operation returns the maximum
1190
+ # number of faces with the highest confidence in the match.
1191
+ # @return [Integer]
1192
+ #
1193
+ # @!attribute [rw] face_match_threshold
1194
+ # Optional value specifying the minimum confidence in the face match
1195
+ # to return. For example, don't return any matches where confidence
1196
+ # in matches is less than 70%.
1197
+ # @return [Float]
1198
+ #
1199
+ class SearchFacesRequest < Struct.new(
1200
+ :collection_id,
1201
+ :face_id,
1202
+ :max_faces,
1203
+ :face_match_threshold)
1204
+ include Aws::Structure
1205
+ end
1072
1206
 
1073
- # Indicates whether or not the face is smiling, and the confidence level
1074
- # in the determination.
1075
- # @!attribute [rw] value
1076
- # Boolean value that indicates whether the face is smiling or not.
1077
- # @return [Boolean]
1078
- #
1079
- # @!attribute [rw] confidence
1080
- # Level of confidence in the determination.
1081
- # @return [Float]
1082
- class Smile < Struct.new(
1083
- :value,
1084
- :confidence)
1085
- include Aws::Structure
1086
- end
1207
+ # @!attribute [rw] searched_face_id
1208
+ # ID of the face that was searched for matches in a collection.
1209
+ # @return [String]
1210
+ #
1211
+ # @!attribute [rw] face_matches
1212
+ # An array of faces that matched the input face, along with the
1213
+ # confidence in the match.
1214
+ # @return [Array<Types::FaceMatch>]
1215
+ #
1216
+ class SearchFacesResponse < Struct.new(
1217
+ :searched_face_id,
1218
+ :face_matches)
1219
+ include Aws::Structure
1220
+ end
1087
1221
 
1088
- # Indicates whether or not the face is wearing sunglasses, and the
1089
- # confidence level in the determination.
1090
- # @!attribute [rw] value
1091
- # Boolean value that indicates whether the face is wearing sunglasses
1092
- # or not.
1093
- # @return [Boolean]
1094
- #
1095
- # @!attribute [rw] confidence
1096
- # Level of confidence in the determination.
1097
- # @return [Float]
1098
- class Sunglasses < Struct.new(
1099
- :value,
1100
- :confidence)
1101
- include Aws::Structure
1102
- end
1222
+ # Indicates whether or not the face is smiling, and the confidence level
1223
+ # in the determination.
1224
+ #
1225
+ # @!attribute [rw] value
1226
+ # Boolean value that indicates whether the face is smiling or not.
1227
+ # @return [Boolean]
1228
+ #
1229
+ # @!attribute [rw] confidence
1230
+ # Level of confidence in the determination.
1231
+ # @return [Float]
1232
+ #
1233
+ class Smile < Struct.new(
1234
+ :value,
1235
+ :confidence)
1236
+ include Aws::Structure
1237
+ end
1103
1238
 
1239
+ # Indicates whether or not the face is wearing sunglasses, and the
1240
+ # confidence level in the determination.
1241
+ #
1242
+ # @!attribute [rw] value
1243
+ # Boolean value that indicates whether the face is wearing sunglasses
1244
+ # or not.
1245
+ # @return [Boolean]
1246
+ #
1247
+ # @!attribute [rw] confidence
1248
+ # Level of confidence in the determination.
1249
+ # @return [Float]
1250
+ #
1251
+ class Sunglasses < Struct.new(
1252
+ :value,
1253
+ :confidence)
1254
+ include Aws::Structure
1104
1255
  end
1256
+
1105
1257
  end
1106
1258
  end