Skip to content

Commit a0ad760

Browse files
author
awstools
committed
feat(client-rekognition): Adding support for ImageProperties feature to detect dominant colors and image brightness, sharpness, and contrast, inclusion and exclusion filters for labels and label categories, new fields to the API response, "aliases" and "categories"
1 parent 63e5da1 commit a0ad760

24 files changed

+2719
-1662
lines changed

clients/client-rekognition/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@
99

1010
AWS SDK for JavaScript Rekognition Client for Node.js, Browser and React Native.
1111

12-
<p>This is the API Reference for <a href="https://docs.aws.amazon.com/rekognition/latest/dg/images.html">Amazon Rekognition Image</a>,
13-
<a href="https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html">Amazon Rekognition Custom Labels</a>,
14-
<a href="https://docs.aws.amazon.com/rekognition/latest/dg/video.html">Amazon Rekognition Stored Video</a>,
15-
<a href="https://docs.aws.amazon.com/rekognition/latest/dg/streaming-video.html">Amazon Rekognition Streaming Video</a>.
16-
It provides descriptions of actions, data types, common parameters,
17-
and common errors.</p>
18-
12+
<p>This is the API Reference for <a href="https://docs.aws.amazon.com/rekognition/latest/dg/images.html">Amazon Rekognition Image</a>, <a href="https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html">Amazon Rekognition Custom Labels</a>,
13+
<a href="https://docs.aws.amazon.com/rekognition/latest/dg/video.html">Amazon Rekognition Stored
14+
Video</a>, <a href="https://docs.aws.amazon.com/rekognition/latest/dg/streaming-video.html">Amazon Rekognition Streaming Video</a>. It provides descriptions of actions, data types, common
15+
parameters, and common errors.</p>
1916
<p>
2017
<b>Amazon Rekognition Image</b>
2118
</p>
22-
2319
<ul>
2420
<li>
2521
<p>
@@ -107,7 +103,6 @@ and common errors.</p>
107103
</p>
108104
</li>
109105
</ul>
110-
111106
<p>
112107
<b>Amazon Rekognition Custom Labels</b>
113108
</p>
@@ -213,11 +208,9 @@ and common errors.</p>
213208
</p>
214209
</li>
215210
</ul>
216-
217211
<p>
218212
<b>Amazon Rekognition Video Stored Video</b>
219213
</p>
220-
221214
<ul>
222215
<li>
223216
<p>
@@ -300,11 +293,9 @@ and common errors.</p>
300293
</p>
301294
</li>
302295
</ul>
303-
304296
<p>
305297
<b>Amazon Rekognition Video Streaming Video</b>
306298
</p>
307-
308299
<ul>
309300
<li>
310301
<p>

clients/client-rekognition/src/Rekognition.ts

Lines changed: 226 additions & 229 deletions
Large diffs are not rendered by default.

clients/client-rekognition/src/RekognitionClient.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -479,19 +479,13 @@ type RekognitionClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpH
479479
export interface RekognitionClientResolvedConfig extends RekognitionClientResolvedConfigType {}
480480

481481
/**
482-
* <p>This is the API Reference for <a href="https://docs.aws.amazon.com/rekognition/latest/dg/images.html">Amazon Rekognition Image</a>,
483-
* <a href="https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html">Amazon Rekognition Custom Labels</a>,
484-
* <a href="https://docs.aws.amazon.com/rekognition/latest/dg/video.html">Amazon Rekognition Stored Video</a>,
485-
* <a href="https://docs.aws.amazon.com/rekognition/latest/dg/streaming-video.html">Amazon Rekognition Streaming Video</a>.
486-
* It provides descriptions of actions, data types, common parameters,
487-
* and common errors.</p>
488-
*
482+
* <p>This is the API Reference for <a href="https://docs.aws.amazon.com/rekognition/latest/dg/images.html">Amazon Rekognition Image</a>, <a href="https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/what-is.html">Amazon Rekognition Custom Labels</a>,
483+
* <a href="https://docs.aws.amazon.com/rekognition/latest/dg/video.html">Amazon Rekognition Stored
484+
* Video</a>, <a href="https://docs.aws.amazon.com/rekognition/latest/dg/streaming-video.html">Amazon Rekognition Streaming Video</a>. It provides descriptions of actions, data types, common
485+
* parameters, and common errors.</p>
489486
* <p>
490487
* <b>Amazon Rekognition Image</b>
491488
* </p>
492-
*
493-
*
494-
*
495489
* <ul>
496490
* <li>
497491
* <p>
@@ -579,8 +573,6 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv
579573
* </p>
580574
* </li>
581575
* </ul>
582-
*
583-
*
584576
* <p>
585577
* <b>Amazon Rekognition Custom Labels</b>
586578
* </p>
@@ -686,12 +678,9 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv
686678
* </p>
687679
* </li>
688680
* </ul>
689-
*
690-
*
691681
* <p>
692682
* <b>Amazon Rekognition Video Stored Video</b>
693683
* </p>
694-
*
695684
* <ul>
696685
* <li>
697686
* <p>
@@ -774,11 +763,9 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv
774763
* </p>
775764
* </li>
776765
* </ul>
777-
*
778766
* <p>
779767
* <b>Amazon Rekognition Video Streaming Video</b>
780768
* </p>
781-
*
782769
* <ul>
783770
* <li>
784771
* <p>

clients/client-rekognition/src/commands/CompareFacesCommand.ts

Lines changed: 30 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,19 @@ export interface CompareFacesCommandInput extends CompareFacesRequest {}
2929
export interface CompareFacesCommandOutput extends CompareFacesResponse, __MetadataBearer {}
3030

3131
/**
32-
* <p>Compares a face in the <i>source</i> input image with
33-
* each of the 100 largest faces detected in the <i>target</i> input image.
34-
* </p>
35-
*
36-
* <p> If the source image contains multiple faces, the service detects the largest face
37-
* and compares it with each face detected in the target image. </p>
38-
*
39-
*
32+
* <p>Compares a face in the <i>source</i> input image with each of the 100
33+
* largest faces detected in the <i>target</i> input image. </p>
34+
* <p> If the source image contains multiple faces, the service detects the largest face and
35+
* compares it with each face detected in the target image. </p>
4036
* <note>
41-
* <p>CompareFaces uses machine learning algorithms, which are probabilistic.
42-
* A false negative is an incorrect prediction that
43-
* a face in the target image has a low similarity confidence score when compared to the face
44-
* in the source image. To reduce the probability of false negatives,
45-
* we recommend that you compare the target image against multiple source images.
46-
* If you plan to use <code>CompareFaces</code> to make a decision that impacts an individual's rights,
47-
* privacy, or access to services, we recommend that you pass the result to a human for review and further
48-
* validation before taking action.</p>
37+
* <p>CompareFaces uses machine learning algorithms, which are probabilistic. A false negative
38+
* is an incorrect prediction that a face in the target image has a low similarity confidence
39+
* score when compared to the face in the source image. To reduce the probability of false
40+
* negatives, we recommend that you compare the target image against multiple source images. If
41+
* you plan to use <code>CompareFaces</code> to make a decision that impacts an individual's
42+
* rights, privacy, or access to services, we recommend that you pass the result to a human for
43+
* review and further validation before taking action.</p>
4944
* </note>
50-
*
51-
*
5245
* <p>You pass the input and target images either as base64-encoded image bytes or as
5346
* references to images in an Amazon S3 bucket. If you use the
5447
* AWS
@@ -59,39 +52,35 @@ export interface CompareFacesCommandOutput extends CompareFacesResponse, __Metad
5952
* facial landmarks, pose details (pitch, roll, and yaw), quality (brightness and sharpness), and
6053
* confidence value (indicating the level of confidence that the bounding box contains a face).
6154
* The response also provides a similarity score, which indicates how closely the faces match. </p>
62-
*
6355
* <note>
6456
* <p>By default, only faces with a similarity score of greater than or equal to 80% are
6557
* returned in the response. You can change this value by specifying the
6658
* <code>SimilarityThreshold</code> parameter.</p>
6759
* </note>
68-
*
6960
* <p>
70-
* <code>CompareFaces</code> also returns an array of faces that don't match the source image.
71-
* For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality.
72-
* The response also returns information about the face in the source image, including the bounding box
73-
* of the face and confidence value.</p>
74-
*
61+
* <code>CompareFaces</code> also returns an array of faces that don't match the source
62+
* image. For each face, it returns a bounding box, confidence value, landmarks, pose details,
63+
* and quality. The response also returns information about the face in the source image,
64+
* including the bounding box of the face and confidence value.</p>
7565
* <p>The <code>QualityFilter</code> input parameter allows you to filter out detected faces
76-
* that don’t meet a required quality bar. The quality bar is based on a
77-
* variety of common use cases. Use <code>QualityFilter</code> to set the quality bar
78-
* by specifying <code>LOW</code>, <code>MEDIUM</code>, or <code>HIGH</code>.
79-
* If you do not want to filter detected faces, specify <code>NONE</code>. The default value is <code>NONE</code>. </p>
80-
*
81-
* <p>If the image doesn't contain Exif metadata, <code>CompareFaces</code> returns orientation information for the
82-
* source and target images. Use these values to display the images with the correct image orientation.</p>
83-
* <p>If no faces are detected in the source or target images, <code>CompareFaces</code> returns an
84-
* <code>InvalidParameterException</code> error. </p>
85-
*
86-
*
66+
* that don’t meet a required quality bar. The quality bar is based on a variety of common use
67+
* cases. Use <code>QualityFilter</code> to set the quality bar by specifying <code>LOW</code>,
68+
* <code>MEDIUM</code>, or <code>HIGH</code>. If you do not want to filter detected faces,
69+
* specify <code>NONE</code>. The default value is <code>NONE</code>. </p>
70+
* <p>If the image doesn't contain Exif metadata, <code>CompareFaces</code> returns
71+
* orientation information for the source and target images. Use these values to display the
72+
* images with the correct image orientation.</p>
73+
* <p>If no faces are detected in the source or target images, <code>CompareFaces</code>
74+
* returns an <code>InvalidParameterException</code> error. </p>
8775
* <note>
88-
* <p> This is a stateless API operation. That is, data returned by this operation doesn't persist.</p>
76+
* <p> This is a stateless API operation. That is, data returned by this operation doesn't
77+
* persist.</p>
8978
* </note>
9079
*
91-
*
92-
* <p>For an example, see Comparing Faces in Images in the Amazon Rekognition Developer Guide.</p>
93-
* <p>This operation requires permissions to perform the <code>rekognition:CompareFaces</code>
94-
* action.</p>
80+
* <p>For an example, see Comparing Faces in Images in the Amazon Rekognition Developer
81+
* Guide.</p>
82+
* <p>This operation requires permissions to perform the
83+
* <code>rekognition:CompareFaces</code> action.</p>
9584
* @example
9685
* Use a bare-bones client and the command you need to make an API call.
9786
* ```javascript

clients/client-rekognition/src/commands/CreateCollectionCommand.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ export interface CreateCollectionCommandOutput extends CreateCollectionResponse,
3535
* user can then index faces using the <code>IndexFaces</code> operation and persist results in a
3636
* specific collection. Then, a user can search the collection for faces in the user-specific
3737
* container. </p>
38-
* <p>When you create a collection, it is associated with the latest version of the face model version.</p>
38+
* <p>When you create a collection, it is associated with the latest version of the face model
39+
* version.</p>
3940
* <note>
4041
* <p>Collection names are case-sensitive.</p>
4142
* </note>
42-
*
4343
* <p>This operation requires permissions to perform the
44-
* <code>rekognition:CreateCollection</code> action. If you want to tag your collection, you also require permission to perform the <code>rekognition:TagResource</code> operation.</p>
44+
* <code>rekognition:CreateCollection</code> action. If you want to tag your collection, you
45+
* also require permission to perform the <code>rekognition:TagResource</code>
46+
* operation.</p>
4547
* @example
4648
* Use a bare-bones client and the command you need to make an API call.
4749
* ```javascript

clients/client-rekognition/src/commands/DeleteCollectionCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export interface DeleteCollectionCommandInput extends DeleteCollectionRequest {}
2929
export interface DeleteCollectionCommandOutput extends DeleteCollectionResponse, __MetadataBearer {}
3030

3131
/**
32-
* <p>Deletes the specified collection. Note that this operation
33-
* removes all faces in the collection. For an example, see <a href="https://docs.aws.amazon.com/rekognition/latest/dg/delete-collection-procedure.html">Deleting a collection</a>.</p>
34-
*
32+
* <p>Deletes the specified collection. Note that this operation removes all faces in the
33+
* collection. For an example, see <a href="https://docs.aws.amazon.com/rekognition/latest/dg/delete-collection-procedure.html">Deleting a
34+
* collection</a>.</p>
3535
* <p>This operation requires permissions to perform the
3636
* <code>rekognition:DeleteCollection</code> action.</p>
3737
* @example

clients/client-rekognition/src/commands/DetectFacesCommand.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,24 @@ export interface DetectFacesCommandOutput extends DetectFacesResponse, __Metadat
3030

3131
/**
3232
* <p>Detects faces within an image that is provided as input.</p>
33-
*
3433
* <p>
3534
* <code>DetectFaces</code> detects the 100 largest faces in the image. For each face
3635
* detected, the operation returns face details. These details include a bounding box of the
3736
* face, a confidence value (that the bounding box contains a face), and a fixed set of
38-
* attributes such as facial landmarks (for example, coordinates of eye and mouth),
39-
* presence of beard, sunglasses, and so on. </p>
37+
* attributes such as facial landmarks (for example, coordinates of eye and mouth), presence of
38+
* beard, sunglasses, and so on. </p>
4039
* <p>The face-detection algorithm is most effective on frontal faces. For non-frontal or
4140
* obscured faces, the algorithm might not detect the faces or might detect faces with lower
4241
* confidence. </p>
4342
* <p>You pass the input image either as base64-encoded image bytes or as a reference to an
44-
* image in an Amazon S3 bucket. If you use the AWS CLI
45-
* to call Amazon Rekognition operations, passing image bytes is not
46-
* supported. The image must be either a PNG or JPEG formatted file. </p>
47-
*
43+
* image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations,
44+
* passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. </p>
4845
* <note>
4946
* <p>This is a stateless API operation. That is, the operation does not persist any
5047
* data.</p>
5148
* </note>
52-
*
53-
* <p>This operation requires permissions to perform the
54-
* <code>rekognition:DetectFaces</code> action. </p>
49+
* <p>This operation requires permissions to perform the <code>rekognition:DetectFaces</code>
50+
* action. </p>
5551
* @example
5652
* Use a bare-bones client and the command you need to make an API call.
5753
* ```javascript

0 commit comments

Comments
 (0)