Amazon Rekognition

2021/12/03 - Amazon Rekognition - 3 updated api methods

Changes  This release added new KnownGender types for Celebrity Recognition.

GetCelebrityInfo (updated) Link ¶
Changes (response)
{'KnownGender': {'Type': {'Unlisted', 'Nonbinary'}}}

Gets the name and additional information about a celebrity based on their Amazon Rekognition ID. The additional information is returned as an array of URLs. If there is no additional information about the celebrity, this list is empty.

For more information, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.

This operation requires permissions to perform the rekognition:GetCelebrityInfo action.

See also: AWS API Documentation

Request Syntax

client.get_celebrity_info(
    Id='string'
)
type Id

string

param Id

[REQUIRED]

The ID for the celebrity. You get the celebrity ID from a call to the RecognizeCelebrities operation, which recognizes celebrities in an image.

rtype

dict

returns

Response Syntax

{
    'Urls': [
        'string',
    ],
    'Name': 'string',
    'KnownGender': {
        'Type': 'Male'|'Female'|'Nonbinary'|'Unlisted'
    }
}

Response Structure

  • (dict) --

    • Urls (list) --

      An array of URLs pointing to additional celebrity information.

      • (string) --

    • Name (string) --

      The name of the celebrity.

    • KnownGender (dict) --

      Retrieves the known gender for the celebrity.

      • Type (string) --

        A string value of the KnownGender info about the Celebrity.

GetCelebrityRecognition (updated) Link ¶
Changes (response)
{'Celebrities': {'Celebrity': {'KnownGender': {'Type': {'Nonbinary',
                                                        'Unlisted'}}}}}

Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by StartCelebrityRecognition.

Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call to StartCelebrityRecognition which returns a job identifier ( JobId ).

When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartCelebrityRecognition . To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call GetCelebrityDetection and pass the job identifier ( JobId ) from the initial call to StartCelebrityDetection .

For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide.

GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array ( Celebrities ) of CelebrityRecognition objects. Each CelebrityRecognition contains information about the celebrity in a CelebrityDetail object and the time, Timestamp , the celebrity was detected. This CelebrityDetail object stores information about the detected celebrity's face attributes, a face bounding box, known gender, the celebrity's name, and a confidence estimate.

Note

GetCelebrityRecognition only returns the default facial attributes ( BoundingBox , Confidence , Landmarks , Pose , and Quality ). The BoundingBox field only applies to the detected face instance. The other facial attributes listed in the Face object of the following response syntax are not returned. For more information, see FaceDetail in the Amazon Rekognition Developer Guide.

By default, the Celebrities array is sorted by time (milliseconds from the start of the video). You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter.

The CelebrityDetail object includes the celebrity identifer and additional information urls. If you don't store the additional information urls, you can get them later by calling GetCelebrityInfo with the celebrity identifer.

No information is returned for faces not recognized as celebrities.

Use MaxResults parameter to limit the number of labels returned. If there are more results than specified in MaxResults , the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetCelebrityDetection and populate the NextToken request parameter with the token value returned from the previous call to GetCelebrityRecognition .

See also: AWS API Documentation

Request Syntax

client.get_celebrity_recognition(
    JobId='string',
    MaxResults=123,
    NextToken='string',
    SortBy='ID'|'TIMESTAMP'
)
type JobId

string

param JobId

[REQUIRED]

Job identifier for the required celebrity recognition analysis. You can get the job identifer from a call to StartCelebrityRecognition .

type MaxResults

integer

param MaxResults

Maximum number of results to return per paginated call. The largest value you can specify is 1000. If you specify a value greater than 1000, a maximum of 1000 results is returned. The default value is 1000.

type NextToken

string

param NextToken

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

type SortBy

string

param SortBy

Sort to use for celebrities returned in Celebrities field. Specify ID to sort by the celebrity identifier, specify TIMESTAMP to sort by the time the celebrity was recognized.

rtype

dict

returns

Response Syntax

{
    'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'StatusMessage': 'string',
    'VideoMetadata': {
        'Codec': 'string',
        'DurationMillis': 123,
        'Format': 'string',
        'FrameRate': ...,
        'FrameHeight': 123,
        'FrameWidth': 123,
        'ColorRange': 'FULL'|'LIMITED'
    },
    'NextToken': 'string',
    'Celebrities': [
        {
            'Timestamp': 123,
            'Celebrity': {
                'Urls': [
                    'string',
                ],
                'Name': 'string',
                'Id': 'string',
                'Confidence': ...,
                'BoundingBox': {
                    'Width': ...,
                    'Height': ...,
                    'Left': ...,
                    'Top': ...
                },
                'Face': {
                    'BoundingBox': {
                        'Width': ...,
                        'Height': ...,
                        'Left': ...,
                        'Top': ...
                    },
                    'AgeRange': {
                        'Low': 123,
                        'High': 123
                    },
                    'Smile': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'Eyeglasses': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'Sunglasses': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'Gender': {
                        'Value': 'Male'|'Female',
                        'Confidence': ...
                    },
                    'Beard': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'Mustache': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'EyesOpen': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'MouthOpen': {
                        'Value': True|False,
                        'Confidence': ...
                    },
                    'Emotions': [
                        {
                            'Type': 'HAPPY'|'SAD'|'ANGRY'|'CONFUSED'|'DISGUSTED'|'SURPRISED'|'CALM'|'UNKNOWN'|'FEAR',
                            'Confidence': ...
                        },
                    ],
                    'Landmarks': [
                        {
                            'Type': 'eyeLeft'|'eyeRight'|'nose'|'mouthLeft'|'mouthRight'|'leftEyeBrowLeft'|'leftEyeBrowRight'|'leftEyeBrowUp'|'rightEyeBrowLeft'|'rightEyeBrowRight'|'rightEyeBrowUp'|'leftEyeLeft'|'leftEyeRight'|'leftEyeUp'|'leftEyeDown'|'rightEyeLeft'|'rightEyeRight'|'rightEyeUp'|'rightEyeDown'|'noseLeft'|'noseRight'|'mouthUp'|'mouthDown'|'leftPupil'|'rightPupil'|'upperJawlineLeft'|'midJawlineLeft'|'chinBottom'|'midJawlineRight'|'upperJawlineRight',
                            'X': ...,
                            'Y': ...
                        },
                    ],
                    'Pose': {
                        'Roll': ...,
                        'Yaw': ...,
                        'Pitch': ...
                    },
                    'Quality': {
                        'Brightness': ...,
                        'Sharpness': ...
                    },
                    'Confidence': ...
                },
                'KnownGender': {
                    'Type': 'Male'|'Female'|'Nonbinary'|'Unlisted'
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    • JobStatus (string) --

      The current status of the celebrity recognition job.

    • StatusMessage (string) --

      If the job fails, StatusMessage provides a descriptive error message.

    • VideoMetadata (dict) --

      Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a Amazon Rekognition Video operation.

      • Codec (string) --

        Type of compression used in the analyzed video.

      • DurationMillis (integer) --

        Length of the video in milliseconds.

      • Format (string) --

        Format of the analyzed video. Possible values are MP4, MOV and AVI.

      • FrameRate (float) --

        Number of frames per second in the video.

      • FrameHeight (integer) --

        Vertical pixel dimension of the video.

      • FrameWidth (integer) --

        Horizontal pixel dimension of the video.

      • ColorRange (string) --

        A description of the range of luminance values in a video, either LIMITED (16 to 235) or FULL (0 to 255).

    • NextToken (string) --

      If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of celebrities.

    • Celebrities (list) --

      Array of celebrities recognized in the video.

      • (dict) --

        Information about a detected celebrity and the time the celebrity was detected in a stored video. For more information, see GetCelebrityRecognition in the Amazon Rekognition Developer Guide.

        • Timestamp (integer) --

          The time, in milliseconds from the start of the video, that the celebrity was recognized.

        • Celebrity (dict) --

          Information about a recognized celebrity.

          • Urls (list) --

            An array of URLs pointing to additional celebrity information.

            • (string) --

          • Name (string) --

            The name of the celebrity.

          • Id (string) --

            The unique identifier for the celebrity.

          • Confidence (float) --

            The confidence, in percentage, that Amazon Rekognition has that the recognized face is the celebrity.

          • BoundingBox (dict) --

            Bounding box around the body of a celebrity.

            • Width (float) --

              Width of the bounding box as a ratio of the overall image width.

            • Height (float) --

              Height of the bounding box as a ratio of the overall image height.

            • Left (float) --

              Left coordinate of the bounding box as a ratio of overall image width.

            • Top (float) --

              Top coordinate of the bounding box as a ratio of overall image height.

          • Face (dict) --

            Face details for the recognized celebrity.

            • BoundingBox (dict) --

              Bounding box of the face. Default attribute.

              • Width (float) --

                Width of the bounding box as a ratio of the overall image width.

              • Height (float) --

                Height of the bounding box as a ratio of the overall image height.

              • Left (float) --

                Left coordinate of the bounding box as a ratio of overall image width.

              • Top (float) --

                Top coordinate of the bounding box as a ratio of overall image height.

            • AgeRange (dict) --

              The estimated age range, in years, for the face. Low represents the lowest estimated age and High represents the highest estimated age.

              • Low (integer) --

                The lowest estimated age.

              • High (integer) --

                The highest estimated age.

            • Smile (dict) --

              Indicates whether or not the face is smiling, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the face is smiling or not.

              • Confidence (float) --

                Level of confidence in the determination.

            • Eyeglasses (dict) --

              Indicates whether or not the face is wearing eye glasses, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the face is wearing eye glasses or not.

              • Confidence (float) --

                Level of confidence in the determination.

            • Sunglasses (dict) --

              Indicates whether or not the face is wearing sunglasses, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the face is wearing sunglasses or not.

              • Confidence (float) --

                Level of confidence in the determination.

            • Gender (dict) --

              The predicted gender of a detected face.

              • Value (string) --

                The predicted gender of the face.

              • Confidence (float) --

                Level of confidence in the prediction.

            • Beard (dict) --

              Indicates whether or not the face has a beard, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the face has beard or not.

              • Confidence (float) --

                Level of confidence in the determination.

            • Mustache (dict) --

              Indicates whether or not the face has a mustache, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the face has mustache or not.

              • Confidence (float) --

                Level of confidence in the determination.

            • EyesOpen (dict) --

              Indicates whether or not the eyes on the face are open, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the eyes on the face are open.

              • Confidence (float) --

                Level of confidence in the determination.

            • MouthOpen (dict) --

              Indicates whether or not the mouth on the face is open, and the confidence level in the determination.

              • Value (boolean) --

                Boolean value that indicates whether the mouth on the face is open or not.

              • Confidence (float) --

                Level of confidence in the determination.

            • Emotions (list) --

              The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person's face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.

              • (dict) --

                The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person's face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.

                • Type (string) --

                  Type of emotion detected.

                • Confidence (float) --

                  Level of confidence in the determination.

            • Landmarks (list) --

              Indicates the location of landmarks on the face. Default attribute.

              • (dict) --

                Indicates the location of the landmark on the face.

                • Type (string) --

                  Type of landmark.

                • X (float) --

                  The x-coordinate of the landmark expressed as a ratio of the width of the image. The x-coordinate is measured from the left-side of the image. For example, if the image is 700 pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

                • Y (float) --

                  The y-coordinate of the landmark expressed as a ratio of the height of the image. The y-coordinate is measured from the top of the image. For example, if the image height is 200 pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.

            • Pose (dict) --

              Indicates the pose of the face as determined by its pitch, roll, and yaw. Default attribute.

              • Roll (float) --

                Value representing the face rotation on the roll axis.

              • Yaw (float) --

                Value representing the face rotation on the yaw axis.

              • Pitch (float) --

                Value representing the face rotation on the pitch axis.

            • Quality (dict) --

              Identifies image brightness and sharpness. Default attribute.

              • Brightness (float) --

                Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a brighter face image.

              • Sharpness (float) --

                Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a sharper face image.

            • Confidence (float) --

              Confidence level that the bounding box contains a face (and not a different object such as a tree). Default attribute.

          • KnownGender (dict) --

            Retrieves the known gender for the celebrity.

            • Type (string) --

              A string value of the KnownGender info about the Celebrity.

RecognizeCelebrities (updated) Link ¶
Changes (response)
{'CelebrityFaces': {'KnownGender': {'Type': {'Unlisted', 'Nonbinary'}}}}

Returns an array of celebrities recognized in the input image. For more information, see Recognizing Celebrities in the Amazon Rekognition Developer Guide.

RecognizeCelebrities returns the 64 largest faces in the image. It lists the recognized celebrities in the CelebrityFaces array and any unrecognized faces in the UnrecognizedFaces array. RecognizeCelebrities doesn't return celebrities whose faces aren't among the largest 64 faces in the image.

For each celebrity recognized, RecognizeCelebrities returns a Celebrity object. The Celebrity object contains the celebrity name, ID, URL links to additional information, match confidence, and a ComparedFace object that you can use to locate the celebrity's face on the image.

Amazon Rekognition doesn't retain information about which images a celebrity has been recognized in. Your application must store this information and use the Celebrity ID property as a unique identifier for the celebrity. If you don't store the celebrity name or additional information URLs returned by RecognizeCelebrities , you will need the ID to identify the celebrity in a call to the GetCelebrityInfo operation.

You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.

For an example, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.

This operation requires permissions to perform the rekognition:RecognizeCelebrities operation.

See also: AWS API Documentation

Request Syntax

client.recognize_celebrities(
    Image={
        'Bytes': b'bytes',
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    }
)
type Image

dict

param Image

[REQUIRED]

The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the Bytes field. For more information, see Images in the Amazon Rekognition developer guide.

  • Bytes (bytes) --

    Blob of image bytes up to 5 MBs.

  • S3Object (dict) --

    Identifies an S3 object as the image source.

    • Bucket (string) --

      Name of the S3 bucket.

    • Name (string) --

      S3 object key name.

    • Version (string) --

      If the bucket is versioning enabled, you can specify the object version.

rtype

dict

returns

Response Syntax

{
    'CelebrityFaces': [
        {
            'Urls': [
                'string',
            ],
            'Name': 'string',
            'Id': 'string',
            'Face': {
                'BoundingBox': {
                    'Width': ...,
                    'Height': ...,
                    'Left': ...,
                    'Top': ...
                },
                'Confidence': ...,
                'Landmarks': [
                    {
                        'Type': 'eyeLeft'|'eyeRight'|'nose'|'mouthLeft'|'mouthRight'|'leftEyeBrowLeft'|'leftEyeBrowRight'|'leftEyeBrowUp'|'rightEyeBrowLeft'|'rightEyeBrowRight'|'rightEyeBrowUp'|'leftEyeLeft'|'leftEyeRight'|'leftEyeUp'|'leftEyeDown'|'rightEyeLeft'|'rightEyeRight'|'rightEyeUp'|'rightEyeDown'|'noseLeft'|'noseRight'|'mouthUp'|'mouthDown'|'leftPupil'|'rightPupil'|'upperJawlineLeft'|'midJawlineLeft'|'chinBottom'|'midJawlineRight'|'upperJawlineRight',
                        'X': ...,
                        'Y': ...
                    },
                ],
                'Pose': {
                    'Roll': ...,
                    'Yaw': ...,
                    'Pitch': ...
                },
                'Quality': {
                    'Brightness': ...,
                    'Sharpness': ...
                },
                'Emotions': [
                    {
                        'Type': 'HAPPY'|'SAD'|'ANGRY'|'CONFUSED'|'DISGUSTED'|'SURPRISED'|'CALM'|'UNKNOWN'|'FEAR',
                        'Confidence': ...
                    },
                ],
                'Smile': {
                    'Value': True|False,
                    'Confidence': ...
                }
            },
            'MatchConfidence': ...,
            'KnownGender': {
                'Type': 'Male'|'Female'|'Nonbinary'|'Unlisted'
            }
        },
    ],
    'UnrecognizedFaces': [
        {
            'BoundingBox': {
                'Width': ...,
                'Height': ...,
                'Left': ...,
                'Top': ...
            },
            'Confidence': ...,
            'Landmarks': [
                {
                    'Type': 'eyeLeft'|'eyeRight'|'nose'|'mouthLeft'|'mouthRight'|'leftEyeBrowLeft'|'leftEyeBrowRight'|'leftEyeBrowUp'|'rightEyeBrowLeft'|'rightEyeBrowRight'|'rightEyeBrowUp'|'leftEyeLeft'|'leftEyeRight'|'leftEyeUp'|'leftEyeDown'|'rightEyeLeft'|'rightEyeRight'|'rightEyeUp'|'rightEyeDown'|'noseLeft'|'noseRight'|'mouthUp'|'mouthDown'|'leftPupil'|'rightPupil'|'upperJawlineLeft'|'midJawlineLeft'|'chinBottom'|'midJawlineRight'|'upperJawlineRight',
                    'X': ...,
                    'Y': ...
                },
            ],
            'Pose': {
                'Roll': ...,
                'Yaw': ...,
                'Pitch': ...
            },
            'Quality': {
                'Brightness': ...,
                'Sharpness': ...
            },
            'Emotions': [
                {
                    'Type': 'HAPPY'|'SAD'|'ANGRY'|'CONFUSED'|'DISGUSTED'|'SURPRISED'|'CALM'|'UNKNOWN'|'FEAR',
                    'Confidence': ...
                },
            ],
            'Smile': {
                'Value': True|False,
                'Confidence': ...
            }
        },
    ],
    'OrientationCorrection': 'ROTATE_0'|'ROTATE_90'|'ROTATE_180'|'ROTATE_270'
}

Response Structure

  • (dict) --

    • CelebrityFaces (list) --

      Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 celebrities in an image. Each celebrity object includes the following attributes: Face , Confidence , Emotions , Landmarks , Pose , Quality , Smile , Id , KnownGender , MatchConfidence , Name , Urls .

      • (dict) --

        Provides information about a celebrity recognized by the RecognizeCelebrities operation.

        • Urls (list) --

          An array of URLs pointing to additional information about the celebrity. If there is no additional information about the celebrity, this list is empty.

          • (string) --

        • Name (string) --

          The name of the celebrity.

        • Id (string) --

          A unique identifier for the celebrity.

        • Face (dict) --

          Provides information about the celebrity's face, such as its location on the image.

          • BoundingBox (dict) --

            Bounding box of the face.

            • Width (float) --

              Width of the bounding box as a ratio of the overall image width.

            • Height (float) --

              Height of the bounding box as a ratio of the overall image height.

            • Left (float) --

              Left coordinate of the bounding box as a ratio of overall image width.

            • Top (float) --

              Top coordinate of the bounding box as a ratio of overall image height.

          • Confidence (float) --

            Level of confidence that what the bounding box contains is a face.

          • Landmarks (list) --

            An array of facial landmarks.

            • (dict) --

              Indicates the location of the landmark on the face.

              • Type (string) --

                Type of landmark.

              • X (float) --

                The x-coordinate of the landmark expressed as a ratio of the width of the image. The x-coordinate is measured from the left-side of the image. For example, if the image is 700 pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

              • Y (float) --

                The y-coordinate of the landmark expressed as a ratio of the height of the image. The y-coordinate is measured from the top of the image. For example, if the image height is 200 pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.

          • Pose (dict) --

            Indicates the pose of the face as determined by its pitch, roll, and yaw.

            • Roll (float) --

              Value representing the face rotation on the roll axis.

            • Yaw (float) --

              Value representing the face rotation on the yaw axis.

            • Pitch (float) --

              Value representing the face rotation on the pitch axis.

          • Quality (dict) --

            Identifies face image brightness and sharpness.

            • Brightness (float) --

              Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a brighter face image.

            • Sharpness (float) --

              Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a sharper face image.

          • Emotions (list) --

            The emotions that appear to be expressed on the face, and the confidence level in the determination. Valid values include "Happy", "Sad", "Angry", "Confused", "Disgusted", "Surprised", "Calm", "Unknown", and "Fear".

            • (dict) --

              The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person's face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.

              • Type (string) --

                Type of emotion detected.

              • Confidence (float) --

                Level of confidence in the determination.

          • Smile (dict) --

            Indicates whether or not the face is smiling, and the confidence level in the determination.

            • Value (boolean) --

              Boolean value that indicates whether the face is smiling or not.

            • Confidence (float) --

              Level of confidence in the determination.

        • MatchConfidence (float) --

          The confidence, in percentage, that Amazon Rekognition has that the recognized face is the celebrity.

        • KnownGender (dict) --

          The known gender identity for the celebrity that matches the provided ID. The known gender identity can be Male, Female, Nonbinary, or Unlisted.

          • Type (string) --

            A string value of the KnownGender info about the Celebrity.

    • UnrecognizedFaces (list) --

      Details about each unrecognized face in the image.

      • (dict) --

        Provides face metadata for target image faces that are analyzed by CompareFaces and RecognizeCelebrities .

        • BoundingBox (dict) --

          Bounding box of the face.

          • Width (float) --

            Width of the bounding box as a ratio of the overall image width.

          • Height (float) --

            Height of the bounding box as a ratio of the overall image height.

          • Left (float) --

            Left coordinate of the bounding box as a ratio of overall image width.

          • Top (float) --

            Top coordinate of the bounding box as a ratio of overall image height.

        • Confidence (float) --

          Level of confidence that what the bounding box contains is a face.

        • Landmarks (list) --

          An array of facial landmarks.

          • (dict) --

            Indicates the location of the landmark on the face.

            • Type (string) --

              Type of landmark.

            • X (float) --

              The x-coordinate of the landmark expressed as a ratio of the width of the image. The x-coordinate is measured from the left-side of the image. For example, if the image is 700 pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

            • Y (float) --

              The y-coordinate of the landmark expressed as a ratio of the height of the image. The y-coordinate is measured from the top of the image. For example, if the image height is 200 pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.

        • Pose (dict) --

          Indicates the pose of the face as determined by its pitch, roll, and yaw.

          • Roll (float) --

            Value representing the face rotation on the roll axis.

          • Yaw (float) --

            Value representing the face rotation on the yaw axis.

          • Pitch (float) --

            Value representing the face rotation on the pitch axis.

        • Quality (dict) --

          Identifies face image brightness and sharpness.

          • Brightness (float) --

            Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a brighter face image.

          • Sharpness (float) --

            Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a sharper face image.

        • Emotions (list) --

          The emotions that appear to be expressed on the face, and the confidence level in the determination. Valid values include "Happy", "Sad", "Angry", "Confused", "Disgusted", "Surprised", "Calm", "Unknown", and "Fear".

          • (dict) --

            The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person's face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.

            • Type (string) --

              Type of emotion detected.

            • Confidence (float) --

              Level of confidence in the determination.

        • Smile (dict) --

          Indicates whether or not the face is smiling, and the confidence level in the determination.

          • Value (boolean) --

            Boolean value that indicates whether the face is smiling or not.

          • Confidence (float) --

            Level of confidence in the determination.

    • OrientationCorrection (string) --

      Note

      Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.

      The orientation of the input image (counterclockwise direction). If your application displays the image, you can use this value to correct the orientation. The bounding box coordinates returned in CelebrityFaces and UnrecognizedFaces represent face locations before the image orientation is corrected.

      Note

      If the input image is in .jpeg format, it might contain exchangeable image (Exif) metadata that includes the image's orientation. If so, and the Exif metadata for the input image populates the orientation field, the value of OrientationCorrection is null. The CelebrityFaces and UnrecognizedFaces bounding box coordinates represent face locations after Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.