Amazon Rekognition

2017/11/29 - Amazon Rekognition - 18 new api methods

Changes  This release introduces Amazon Rekognition support for video analysis.

StartContentModeration (new) Link ¶

Starts asynchronous detection of explicit or suggestive adult content in a stored video.

Rekognition Video can moderate content in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartContentModeration returns a job identifier ( JobId ) which you use to get the results of the analysis. When content moderation analysis is finished, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel .

To get the results of the content moderation analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartContentModeration . For more information, see moderation.

See also: AWS API Documentation

Request Syntax

client.start_content_moderation(
    Video={
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    MinConfidence=...,
    ClientRequestToken='string',
    NotificationChannel={
        'SNSTopicArn': 'string',
        'RoleArn': 'string'
    },
    JobTag='string'
)
type Video

dict

param Video

[REQUIRED]

The video in which you want to moderate content. The video must be stored in an Amazon S3 bucket.

  • S3Object (dict) --

    The Amazon S3 bucket name and file name for the video.

    • 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.

type MinConfidence

float

param MinConfidence

Specifies the minimum confidence that Amazon Rekognition must have in order to return a moderated content label. Confidence represents how certain Amazon Rekognition is that the moderated content is correctly identified. 0 is the lowest confidence. 100 is the highest confidence. Amazon Rekognition doesn't return any moderated content labels with a confidence level lower than this specified value.

type ClientRequestToken

string

param ClientRequestToken

Idempotent token used to identify the start request. If you use the same token with multiple StartContentModeration requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started more than once.

type NotificationChannel

dict

param NotificationChannel

The Amazon SNS topic ARN that you want Rekognition Video to publish the completion status of the content moderation analysis to.

  • SNSTopicArn (string) -- [REQUIRED]

    The Amazon SNS topic to which Amazon Rekognition to posts the completion status.

  • RoleArn (string) -- [REQUIRED]

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

type JobTag

string

param JobTag

Unique identifier you specify to identify the job in the completion status published to the Amazon Simple Notification Service topic.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier for the content moderation analysis job. Use JobId to identify the job in a subsequent call to GetContentModeration .

GetFaceSearch (new) Link ¶

Gets the face search results for Rekognition Video face search started by . The search returns faces in a collection that match the faces of persons detected in a video. It also includes the time(s) that faces are matched in the video.

Face search in a video is an asynchronous operation. You start face search by calling to which returns a job identifier ( JobId ). When the search operation finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartFaceSearch . To get the search results, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call GetFaceSearch and pass the job identifier ( JobId ) from the initial call to StartFaceSearch . For more information, see collections.

The search results are retured in an array, Persons , of objects. Each PersonMatch element contains details about the matching faces in the input collection, person information for the matched person, and the time the person was matched in the video.

By default, the Persons array is sorted by the time, in milliseconds from the start of the video, persons are matched. You can also sort by persons by specifying INDEX for the SORTBY input parameter.

See also: AWS API Documentation

Request Syntax

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

string

param JobId

[REQUIRED]

The job identifer for the search request. You get the job identifier from an initial call to StartFaceSearch .

type MaxResults

integer

param MaxResults

Maximum number of search results you want Rekognition Video to return in the response. The default is 1000.

type NextToken

string

param NextToken

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

type SortBy

string

param SortBy

Sort to use for grouping faces in the response. Use TIMESTAMP to group faces by the time that they are recognized. Use INDEX to sort by recognized faces.

rtype

dict

returns

Response Syntax

{
    'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'StatusMessage': 'string',
    'NextToken': 'string',
    'VideoMetadata': {
        'Codec': 'string',
        'DurationMillis': 123,
        'Format': 'string',
        'FrameRate': ...,
        'FrameHeight': 123,
        'FrameWidth': 123
    },
    'Persons': [
        {
            'Timestamp': 123,
            'Person': {
                'Index': 123,
                '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',
                            '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',
                            'X': ...,
                            'Y': ...
                        },
                    ],
                    'Pose': {
                        'Roll': ...,
                        'Yaw': ...,
                        'Pitch': ...
                    },
                    'Quality': {
                        'Brightness': ...,
                        'Sharpness': ...
                    },
                    'Confidence': ...
                }
            },
            'FaceMatches': [
                {
                    'Similarity': ...,
                    'Face': {
                        'FaceId': 'string',
                        'BoundingBox': {
                            'Width': ...,
                            'Height': ...,
                            'Left': ...,
                            'Top': ...
                        },
                        'ImageId': 'string',
                        'ExternalImageId': 'string',
                        'Confidence': ...
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • JobStatus (string) --

      The current status of the face search job.

    • StatusMessage (string) --

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

    • NextToken (string) --

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

    • VideoMetadata (dict) --

      Information about a video that Amazon Rekognition analyzed. Videometadata is returned in every page of paginated responses from a 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.

    • Persons (list) --

      An array of persons, , in the video whose face(s) match the face(s) in an Amazon Rekognition collection. It also includes time information for when persons are matched in the video. You specify the input collection in an initial call to StartFaceSearch . Each Persons element includes a time the person was matched, face match details ( FaceMatches ) for matching faces in the collection, and person information ( Person ) for the matched person.

      • (dict) --

        Information about a person whose face matches a face(s) in a Amazon Rekognition collection. Includes information about the faces in the Amazon Rekognition collection (,information about the person ( PersonDetail ) and the timestamp for when the person was detected in a video. An array of PersonMatch objects is returned by .

        • Timestamp (integer) --

          The time, in milliseconds from the beginning of the video, that the person was matched in the video.

        • Person (dict) --

          Information about the matched person.

          • Index (integer) --

            Identifier for the person detected person within a video. Use to keep track of the person throughout the video. The identifier is not stored by Amazon Rekognition.

          • BoundingBox (dict) --

            Bounding box around the detected person.

            • 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 detected person.

            • 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.

            • 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) --

              Gender of the face and the confidence level in the determination.

              • Value (string) --

                Gender of the face.

              • Confidence (float) --

                Level of confidence in the determination.

            • 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 detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

              • (dict) --

                The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

                • Type (string) --

                  Type of emotion detected.

                • Confidence (float) --

                  Level of confidence in the determination.

            • Landmarks (list) --

              Indicates the location of landmarks on the face.

              • (dict) --

                Indicates the location of the landmark on the face.

                • Type (string) --

                  Type of the landmark.

                • X (float) --

                  x-coordinate from the top left of the landmark expressed as the ratio of the width of the image. For example, if the images is 700x200 and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

                • Y (float) --

                  y-coordinate from the top left of the landmark expressed as the ratio of the height of the image. For example, if the images is 700x200 and the y-coordinate of the landmark is at 100 pixels, this value is 0.5.

            • 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 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.

            • Confidence (float) --

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

        • FaceMatches (list) --

          Information about the faces in the input collection that match the face of a person in the video.

          • (dict) --

            Provides face metadata. In addition, it also provides the confidence in the match of this face with the input face.

            • Similarity (float) --

              Confidence in the match of this face with the input face.

            • Face (dict) --

              Describes the face properties such as the bounding box, face ID, image ID of the source image, and external image ID that you assigned.

              • FaceId (string) --

                Unique identifier that Amazon Rekognition assigns to the face.

              • 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.

              • ImageId (string) --

                Unique identifier that Amazon Rekognition assigns to the input image.

              • ExternalImageId (string) --

                Identifier that you assign to all the faces in the input image.

              • Confidence (float) --

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

GetPersonTracking (new) Link ¶

Gets the person tracking results of a Rekognition Video analysis started by .

The person detection operation is started by a call to StartPersonTracking which returns a job identifier ( JobId ). When the person detection operation finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartPersonTracking .

To get the results of the person tracking operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartPersonTracking .

GetPersonTracking returns an array, Persons , of tracked persons and the time(s) they were tracked in the video.

By default, the array is sorted by the time(s) a person is tracked in the video. You can sort by tracked persons by specifying INDEX for the SortBy input parameter.

Use the MaxResults parameter to limit the number of items 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 GetPersonTracking and populate the NextToken request parameter with the token value returned from the previous call to GetPersonTracking .

See also: AWS API Documentation

Request Syntax

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

string

param JobId

[REQUIRED]

The identifier for a job that tracks persons in a video. You get the JobId from a call to StartPersonTracking .

type MaxResults

integer

param MaxResults

Maximum number of tracked persons to return. The default is 1000.

type NextToken

string

param NextToken

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

type SortBy

string

param SortBy

Sort to use for elements in the Persons array. Use TIMESTAMP to sort array elements by the time persons are detected. Use INDEX to sort by the tracked persons. If you sort by INDEX , the array elements for each person are sorted by detection confidence. The default sort is by TIMESTAMP .

rtype

dict

returns

Response Syntax

{
    'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'StatusMessage': 'string',
    'VideoMetadata': {
        'Codec': 'string',
        'DurationMillis': 123,
        'Format': 'string',
        'FrameRate': ...,
        'FrameHeight': 123,
        'FrameWidth': 123
    },
    'NextToken': 'string',
    'Persons': [
        {
            'Timestamp': 123,
            'Person': {
                'Index': 123,
                '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',
                            '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',
                            'X': ...,
                            'Y': ...
                        },
                    ],
                    'Pose': {
                        'Roll': ...,
                        'Yaw': ...,
                        'Pitch': ...
                    },
                    'Quality': {
                        'Brightness': ...,
                        'Sharpness': ...
                    },
                    'Confidence': ...
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    • JobStatus (string) --

      The current status of the person tracking job.

    • StatusMessage (string) --

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

    • VideoMetadata (dict) --

      Information about a video that Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a 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.

    • NextToken (string) --

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

    • Persons (list) --

      An array of the persons detected in the video and the times they are tracked throughout the video. An array element will exist for each time the person is tracked.

      • (dict) --

        Details and tracking information for a single time a person is tracked in a video. Amazon Rekognition operations that track persons return an array of PersonDetection objects with elements for each time a person is tracked in a video. For more information, see .

        • Timestamp (integer) --

          The time, in milliseconds from the start of the video, that the person was tracked.

        • Person (dict) --

          Details about a person tracked in a video.

          • Index (integer) --

            Identifier for the person detected person within a video. Use to keep track of the person throughout the video. The identifier is not stored by Amazon Rekognition.

          • BoundingBox (dict) --

            Bounding box around the detected person.

            • 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 detected person.

            • 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.

            • 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) --

              Gender of the face and the confidence level in the determination.

              • Value (string) --

                Gender of the face.

              • Confidence (float) --

                Level of confidence in the determination.

            • 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 detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

              • (dict) --

                The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

                • Type (string) --

                  Type of emotion detected.

                • Confidence (float) --

                  Level of confidence in the determination.

            • Landmarks (list) --

              Indicates the location of landmarks on the face.

              • (dict) --

                Indicates the location of the landmark on the face.

                • Type (string) --

                  Type of the landmark.

                • X (float) --

                  x-coordinate from the top left of the landmark expressed as the ratio of the width of the image. For example, if the images is 700x200 and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

                • Y (float) --

                  y-coordinate from the top left of the landmark expressed as the ratio of the height of the image. For example, if the images is 700x200 and the y-coordinate of the landmark is at 100 pixels, this value is 0.5.

            • 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 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.

            • Confidence (float) --

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

ListStreamProcessors (new) Link ¶

Gets a list of stream processors that you have created with .

See also: AWS API Documentation

Request Syntax

client.list_stream_processors(
    NextToken='string',
    MaxResults=123
)
type NextToken

string

param NextToken

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

type MaxResults

integer

param MaxResults

Maximum number of stream processors you want Rekognition Video to return in the response. The default is 1000.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'StreamProcessors': [
        {
            'Name': 'string',
            'Status': 'STOPPED'|'STARTING'|'RUNNING'|'FAILED'|'STOPPING'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

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

    • StreamProcessors (list) --

      List of stream processors that you have created.

      • (dict) --

        An object that recognizes faces in a streaming video. An Amazon Rekognition stream processor is created by a call to . The request parameters for CreateStreamProcessor describe the Kinesis video stream source for the streaming video, face recognition parameters, and where to stream the analysis resullts.

        • Name (string) --

          Name of the Amazon Rekognition stream processor.

        • Status (string) --

          Current status of the Amazon Rekognition stream processor.

StopStreamProcessor (new) Link ¶

Stops a running stream processor that was created by .

See also: AWS API Documentation

Request Syntax

client.stop_stream_processor(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of a stream processor created by .

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetFaceDetection (new) Link ¶

Gets face detection results for a Rekognition Video analysis started by .

Face detection with Rekognition Video is an asynchronous operation. You start face detection by calling which returns a job identifier ( JobId ). When the face detection operation finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartFaceDetection . To get the results of the face detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartFaceDetection .

GetFaceDetection returns an array of detected faces ( Faces ) sorted by the time the faces were detected.

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 GetFaceDetection and populate the NextToken request parameter with the token value returned from the previous call to GetFaceDetection .

See also: AWS API Documentation

Request Syntax

client.get_face_detection(
    JobId='string',
    MaxResults=123,
    NextToken='string'
)
type JobId

string

param JobId

[REQUIRED]

Unique identifier for the face detection job. The JobId is returned from StartFaceDetection .

type MaxResults

integer

param MaxResults

Maximum number of detected faces to return. The default is 1000.

type NextToken

string

param NextToken

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

rtype

dict

returns

Response Syntax

{
    'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'StatusMessage': 'string',
    'VideoMetadata': {
        'Codec': 'string',
        'DurationMillis': 123,
        'Format': 'string',
        'FrameRate': ...,
        'FrameHeight': 123,
        'FrameWidth': 123
    },
    'NextToken': 'string',
    'Faces': [
        {
            'Timestamp': 123,
            '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',
                        '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',
                        'X': ...,
                        'Y': ...
                    },
                ],
                'Pose': {
                    'Roll': ...,
                    'Yaw': ...,
                    'Pitch': ...
                },
                'Quality': {
                    'Brightness': ...,
                    'Sharpness': ...
                },
                'Confidence': ...
            }
        },
    ]
}

Response Structure

  • (dict) --

    • JobStatus (string) --

      The current status of the face detection job.

    • StatusMessage (string) --

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

    • VideoMetadata (dict) --

      Information about a video that 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.

    • NextToken (string) --

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

    • Faces (list) --

      An array of faces detected in the video. Each element contains a detected face's details and the time, in milliseconds from the start of the video, the face was detected.

      • (dict) --

        Information about a face detected in a video analysis request and the time the face was detected in the video.

        • Timestamp (integer) --

          Time, in milliseconds from the start of the video, that the face was detected.

        • Face (dict) --

          The face properties for the detected face.

          • 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.

          • 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) --

            Gender of the face and the confidence level in the determination.

            • Value (string) --

              Gender of the face.

            • Confidence (float) --

              Level of confidence in the determination.

          • 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 detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

            • (dict) --

              The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

              • Type (string) --

                Type of emotion detected.

              • Confidence (float) --

                Level of confidence in the determination.

          • Landmarks (list) --

            Indicates the location of landmarks on the face.

            • (dict) --

              Indicates the location of the landmark on the face.

              • Type (string) --

                Type of the landmark.

              • X (float) --

                x-coordinate from the top left of the landmark expressed as the ratio of the width of the image. For example, if the images is 700x200 and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

              • Y (float) --

                y-coordinate from the top left of the landmark expressed as the ratio of the height of the image. For example, if the images is 700x200 and the y-coordinate of the landmark is at 100 pixels, this value is 0.5.

          • 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 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.

          • Confidence (float) --

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

GetLabelDetection (new) Link ¶

Gets the label detection results of a Rekognition Video analysis started by .

The label detection operation is started by a call to which returns a job identifier ( JobId ). When the label detection operation finishes, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartlabelDetection . To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartLabelDetection .

GetLabelDetection returns an array of detected labels ( Labels ) sorted by the time the labels were detected. You can also sort by the label name by specifying NAME for the SortBy input parameter.

The labels returned include the label name, the percentage confidence in the accuracy of the detected label, and the time the label was detected in the video.

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 GetlabelDetection and populate the NextToken request parameter with the token value returned from the previous call to GetLabelDetection .

See also: AWS API Documentation

Request Syntax

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

string

param JobId

[REQUIRED]

Job identifier for the label detection operation for which you want results returned. You get the job identifer from an initial call to StartlabelDetection .

type MaxResults

integer

param MaxResults

Maximum number of labels you want Amazon Rekognition to return in the response. The default is 1000.

type NextToken

string

param NextToken

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

type SortBy

string

param SortBy

Sort to use for elements in the Labels array. Use TIMESTAMP to sort array elements by the time labels are detected. Use NAME to alphabetically group elements for a label together. Within each label group, the array element are sorted by detection confidence. The default sort is by TIMESTAMP .

rtype

dict

returns

Response Syntax

{
    'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'StatusMessage': 'string',
    'VideoMetadata': {
        'Codec': 'string',
        'DurationMillis': 123,
        'Format': 'string',
        'FrameRate': ...,
        'FrameHeight': 123,
        'FrameWidth': 123
    },
    'NextToken': 'string',
    'Labels': [
        {
            'Timestamp': 123,
            'Label': {
                'Name': 'string',
                'Confidence': ...
            }
        },
    ]
}

Response Structure

  • (dict) --

    • JobStatus (string) --

      The current status of the label detection job.

    • StatusMessage (string) --

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

    • VideoMetadata (dict) --

      Information about a video that 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.

    • NextToken (string) --

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

    • Labels (list) --

      An array of labels detected in the video. Each element contains the detected label and the time, in milliseconds from the start of the video, that the label was detected.

      • (dict) --

        Information about a label detected in a video analysis request and the time the label was detected in the video.

        • Timestamp (integer) --

          Time, in milliseconds from the start of the video, that the label was detected.

        • Label (dict) --

          Details about the detected label.

          • Name (string) --

            The name (label) of the object.

          • Confidence (float) --

            Level of confidence.

CreateStreamProcessor (new) Link ¶

Creates an Amazon Rekognition stream processor that you can use to detect and recognize faces in a streaming video.

Rekognition Video is a consumer of live video from Amazon Kinesis Video Streams. Rekognition Video sends analysis results to Amazon Kinesis Data Streams.

You provide as input a Kinesis video stream ( Input ) and a Kinesis data stream ( Output ) stream. You also specify the face recognition criteria in Settings . For example, the collection containing faces that you want to recognize. Use Name to assign an identifier for the stream processor. You use Name to manage the stream processor. For example, you can start processing the source video by calling with the Name field.

After you have finished analyzing a streaming video, use to stop processing. You can delete the stream processor by calling .

See also: AWS API Documentation

Request Syntax

client.create_stream_processor(
    Input={
        'KinesisVideoStream': {
            'Arn': 'string'
        }
    },
    Output={
        'KinesisDataStream': {
            'Arn': 'string'
        }
    },
    Name='string',
    Settings={
        'FaceSearch': {
            'CollectionId': 'string',
            'FaceMatchThreshold': ...
        }
    },
    RoleArn='string'
)
type Input

dict

param Input

[REQUIRED]

Kinesis video stream stream that provides the source streaming video. If you are using the AWS CLI, the parameter name is StreamProcessorInput .

  • KinesisVideoStream (dict) --

    The Kinesis video stream input stream for the source streaming video.

    • Arn (string) --

      ARN of the Kinesis video stream stream that streams the source video.

type Output

dict

param Output

[REQUIRED]

Kinesis data stream stream to which Rekognition Video puts the analysis results. If you are using the AWS CLI, the parameter name is StreamProcessorOutput .

  • KinesisDataStream (dict) --

    The Amazon Kinesis Data Streams stream to which the Amazon Rekognition stream processor streams the analysis results.

    • Arn (string) --

      ARN of the output Amazon Kinesis Data Streams stream.

type Name

string

param Name

[REQUIRED]

An identifier you assign to the stream processor. You can use Name to manage the stream processor. For example, you can get the current status of the stream processor by calling . Name is idempotent.

type Settings

dict

param Settings

[REQUIRED]

Face recognition input parameters to be used by the stream processor. Includes the collection to use for face recognition and the face attributes to detect.

  • FaceSearch (dict) --

    Face search settings to use on a streaming video.

    • CollectionId (string) --

      The ID of a collection that contains faces that you want to search for.

    • FaceMatchThreshold (float) --

      Minimum face match confidence score that must be met to return a result for a recognized face. Default is 70. 0 is the lowest confidence. 100 is the highest confidence.

type RoleArn

string

param RoleArn

[REQUIRED]

ARN of the IAM role that allows access to the stream processor.

rtype

dict

returns

Response Syntax

{
    'StreamProcessorArn': 'string'
}

Response Structure

  • (dict) --

    • StreamProcessorArn (string) --

      ARN for the newly create stream processor.

GetCelebrityRecognition (new) Link ¶

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

Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call to which returns a job identifier ( JobId ). When the celebrity recognition operation finishes, 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 video.

GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array ( Celebrities ) of objects. Each CelebrityRecognition contains information about the celebrity in a object and the time, Timestamp , the celebrity was detected.

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 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 celebrities you want Rekognition Video to return in the response. The default is 1000.

type NextToken

string

param NextToken

If the previous response was incomplete (because there is more recognized celebrities to retrieve), 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
    },
    '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',
                            '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',
                            'X': ...,
                            'Y': ...
                        },
                    ],
                    'Pose': {
                        'Roll': ...,
                        'Yaw': ...,
                        'Pitch': ...
                    },
                    'Quality': {
                        'Brightness': ...,
                        'Sharpness': ...
                    },
                    'Confidence': ...
                }
            }
        },
    ]
}

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 Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a 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.

    • NextToken (string) --

      If the response is truncated, 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 .

        • 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.

              • 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) --

              Gender of the face and the confidence level in the determination.

              • Value (string) --

                Gender of the face.

              • Confidence (float) --

                Level of confidence in the determination.

            • 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 detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

              • (dict) --

                The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and ANGRY.

                • Type (string) --

                  Type of emotion detected.

                • Confidence (float) --

                  Level of confidence in the determination.

            • Landmarks (list) --

              Indicates the location of landmarks on the face.

              • (dict) --

                Indicates the location of the landmark on the face.

                • Type (string) --

                  Type of the landmark.

                • X (float) --

                  x-coordinate from the top left of the landmark expressed as the ratio of the width of the image. For example, if the images is 700x200 and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.

                • Y (float) --

                  y-coordinate from the top left of the landmark expressed as the ratio of the height of the image. For example, if the images is 700x200 and the y-coordinate of the landmark is at 100 pixels, this value is 0.5.

            • 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 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.

            • Confidence (float) --

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

GetContentModeration (new) Link ¶

Gets the content moderation analysis results for a Rekognition Video analysis started by .

Content moderation analysis of a video is an asynchronous operation. You start analysis by calling . which returns a job identifier ( JobId ). When analysis finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartContentModeration . To get the results of the content moderation 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 video.

GetContentModeration returns detected content moderation labels, and the time they are detected, in an array, ModerationLabels , of objects.

By default, the moderated labels are returned sorted by time, in milliseconds from the start of the video. You can also sort them by moderated label by specifying NAME for the SortBy input parameter.

Since video analysis can return a large number of results, use the MaxResults parameter to limit the number of labels returned in a single call to GetContentModeration . 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 GetContentModeration and populate the NextToken request parameter with the value of NextToken returned from the previous call to GetContentModeration .

For more information, see moderation.

See also: AWS API Documentation

Request Syntax

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

string

param JobId

[REQUIRED]

The identifier for the content moderation job. Use JobId to identify the job in a subsequent call to GetContentModeration .

type MaxResults

integer

param MaxResults

Maximum number of content moderation labels to return. The default is 1000.

type NextToken

string

param NextToken

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

type SortBy

string

param SortBy

Sort to use for elements in the ModerationLabelDetections array. Use TIMESTAMP to sort array elements by the time labels are detected. Use NAME to alphabetically group elements for a label together. Within each label group, the array element are sorted by detection confidence. The default sort is by TIMESTAMP .

rtype

dict

returns

Response Syntax

{
    'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'StatusMessage': 'string',
    'VideoMetadata': {
        'Codec': 'string',
        'DurationMillis': 123,
        'Format': 'string',
        'FrameRate': ...,
        'FrameHeight': 123,
        'FrameWidth': 123
    },
    'ModerationLabels': [
        {
            'Timestamp': 123,
            'ModerationLabel': {
                'Confidence': ...,
                'Name': 'string',
                'ParentName': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • JobStatus (string) --

      The current status of the content moderation job.

    • StatusMessage (string) --

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

    • VideoMetadata (dict) --

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

      • 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.

    • ModerationLabels (list) --

      The detected moderation labels and the time(s) they were detected.

      • (dict) --

        Information about a moderation label detection in a stored video.

        • Timestamp (integer) --

          Time, in milliseconds from the beginning of the video, that the moderation label was detected.

        • ModerationLabel (dict) --

          The moderation label detected by in the stored video.

          • Confidence (float) --

            Specifies the confidence that Amazon Rekognition has that the label has been correctly identified.

            If you don't specify the MinConfidence parameter in the call to DetectModerationLabels , the operation returns labels with a confidence value greater than or equal to 50 percent.

          • Name (string) --

            The label name for the type of content detected in the image.

          • ParentName (string) --

            The name for the parent label. Labels at the top-level of the hierarchy have the parent label "" .

    • NextToken (string) --

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

StartPersonTracking (new) Link ¶

Starts the asynchronous tracking of persons in a stored video.

Rekognition Video can track persons in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartPersonTracking returns a job identifier ( JobId ) which you use to get the results of the operation. When label detection is finished, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel .

To get the results of the person detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartPersonTracking .

See also: AWS API Documentation

Request Syntax

client.start_person_tracking(
    Video={
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    ClientRequestToken='string',
    NotificationChannel={
        'SNSTopicArn': 'string',
        'RoleArn': 'string'
    },
    JobTag='string'
)
type Video

dict

param Video

[REQUIRED]

The video in which you want to detect people. The video must be stored in an Amazon S3 bucket.

  • S3Object (dict) --

    The Amazon S3 bucket name and file name for the video.

    • 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.

type ClientRequestToken

string

param ClientRequestToken

Idempotent token used to identify the start request. If you use the same token with multiple StartPersonTracking requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started more than once.

type NotificationChannel

dict

param NotificationChannel

The Amazon SNS topic ARN you want Rekognition Video to publish the completion status of the people detection operation to.

  • SNSTopicArn (string) -- [REQUIRED]

    The Amazon SNS topic to which Amazon Rekognition to posts the completion status.

  • RoleArn (string) -- [REQUIRED]

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

type JobTag

string

param JobTag

Unique identifier you specify to identify the job in the completion status published to the Amazon Simple Notification Service topic.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier for the person detection job. Use JobId to identify the job in a subsequent call to GetPersonTracking .

StartCelebrityRecognition (new) Link ¶

Starts asynchronous recognition of celebrities in a stored video.

Rekognition Video can detect celebrities in a video must be stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartCelebrityRecognition returns a job identifier ( JobId ) which you use to get the results of the analysis. When celebrity recognition analysis is finished, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel . 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 and pass the job identifier ( JobId ) from the initial call to StartCelebrityRecognition . For more information, see celebrities.

See also: AWS API Documentation

Request Syntax

client.start_celebrity_recognition(
    Video={
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    ClientRequestToken='string',
    NotificationChannel={
        'SNSTopicArn': 'string',
        'RoleArn': 'string'
    },
    JobTag='string'
)
type Video

dict

param Video

[REQUIRED]

The video in which you want to recognize celebrities. The video must be stored in an Amazon S3 bucket.

  • S3Object (dict) --

    The Amazon S3 bucket name and file name for the video.

    • 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.

type ClientRequestToken

string

param ClientRequestToken

Idempotent token used to identify the start request. If you use the same token with multiple StartCelebrityRecognition requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started more than once.

type NotificationChannel

dict

param NotificationChannel

The Amazon SNS topic ARN that you want Rekognition Video to publish the completion status of the celebrity recognition analysis to.

  • SNSTopicArn (string) -- [REQUIRED]

    The Amazon SNS topic to which Amazon Rekognition to posts the completion status.

  • RoleArn (string) -- [REQUIRED]

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

type JobTag

string

param JobTag

Unique identifier you specify to identify the job in the completion status published to the Amazon Simple Notification Service topic.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier for the celebrity recognition analysis job. Use JobId to identify the job in a subsequent call to GetCelebrityRecognition .

StartFaceSearch (new) Link ¶

Starts the asynchronous search for faces in a collection that match the faces of persons detected in a stored video.

The video must be stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartFaceSearch returns a job identifier ( JobId ) which you use to get the search results once the search has completed. When searching is finished, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel . To get the search results, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartFaceSearch . For more information, see collections-search-person.

See also: AWS API Documentation

Request Syntax

client.start_face_search(
    Video={
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    ClientRequestToken='string',
    FaceMatchThreshold=...,
    CollectionId='string',
    NotificationChannel={
        'SNSTopicArn': 'string',
        'RoleArn': 'string'
    },
    JobTag='string'
)
type Video

dict

param Video

[REQUIRED]

The video you want to search. The video must be stored in an Amazon S3 bucket.

  • S3Object (dict) --

    The Amazon S3 bucket name and file name for the video.

    • 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.

type ClientRequestToken

string

param ClientRequestToken

Idempotent token used to identify the start request. If you use the same token with multiple StartFaceSearch requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started more than once.

type FaceMatchThreshold

float

param FaceMatchThreshold

The minimum confidence in the person match to return. For example, don't return any matches where confidence in matches is less than 70%.

type CollectionId

string

param CollectionId

[REQUIRED]

ID of the collection that contains the faces you want to search for.

type NotificationChannel

dict

param NotificationChannel

The ARN of the Amazon SNS topic to which you want Rekognition Video to publish the completion status of the search.

  • SNSTopicArn (string) -- [REQUIRED]

    The Amazon SNS topic to which Amazon Rekognition to posts the completion status.

  • RoleArn (string) -- [REQUIRED]

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

type JobTag

string

param JobTag

Unique identifier you specify to identify the job in the completion status published to the Amazon Simple Notification Service topic.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier for the search job. Use JobId to identify the job in a subsequent call to GetFaceSearch .

StartStreamProcessor (new) Link ¶

Starts processing a stream processor. You create a stream processor by calling . To tell StartStreamProcessor which stream processor to start, use the value of the Name field specified in the call to CreateStreamProcessor .

See also: AWS API Documentation

Request Syntax

client.start_stream_processor(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the stream processor to start processing.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteStreamProcessor (new) Link ¶

Deletes the stream processor identified by Name . You assign the value for Name when you create the stream processor with . You might not be able to use the same name for a stream processor for a few seconds after calling DeleteStreamProcessor .

See also: AWS API Documentation

Request Syntax

client.delete_stream_processor(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the stream processor you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

StartLabelDetection (new) Link ¶

Starts asynchronous detection of labels in a stored video.

Rekognition Video can detect labels in a video. Labels are instances of real-world entities. This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; concepts like landscape, evening, and nature; and activities like a person getting out of a car or a person skiing.

The video must be stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartLabelDetection returns a job identifier ( JobId ) which you use to get the results of the operation. When label detection is finished, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel .

To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartLabelDetection .

See also: AWS API Documentation

Request Syntax

client.start_label_detection(
    Video={
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    ClientRequestToken='string',
    MinConfidence=...,
    NotificationChannel={
        'SNSTopicArn': 'string',
        'RoleArn': 'string'
    },
    JobTag='string'
)
type Video

dict

param Video

[REQUIRED]

The video in which you want to detect labels. The video must be stored in an Amazon S3 bucket.

  • S3Object (dict) --

    The Amazon S3 bucket name and file name for the video.

    • 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.

type ClientRequestToken

string

param ClientRequestToken

Idempotent token used to identify the start request. If you use the same token with multiple StartLabelDetection requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started more than once.

type MinConfidence

float

param MinConfidence

Specifies the minimum confidence that Rekognition Video must have in order to return a detected label. Confidence represents how certain Amazon Rekognition is that a label is correctly identified.0 is the lowest confidence. 100 is the highest confidence. Rekognition Video doesn't return any labels with a confidence level lower than this specified value.

If you don't specify MinConfidence , the operation returns labels with confidence values greater than or equal to 50 percent.

type NotificationChannel

dict

param NotificationChannel

The Amazon SNS topic ARN you want Rekognition Video to publish the completion status of the label detection operation to.

  • SNSTopicArn (string) -- [REQUIRED]

    The Amazon SNS topic to which Amazon Rekognition to posts the completion status.

  • RoleArn (string) -- [REQUIRED]

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

type JobTag

string

param JobTag

Unique identifier you specify to identify the job in the completion status published to the Amazon Simple Notification Service topic.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier for the label detection job. Use JobId to identify the job in a subsequent call to GetLabelDetection .

StartFaceDetection (new) Link ¶

Starts asynchronous detection of faces in a stored video.

Rekognition Video can detect faces in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartFaceDetection returns a job identifier ( JobId ) that you use to get the results of the operation. When face detection is finished, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel . To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier ( JobId ) from the initial call to StartFaceDetection . For more information, see faces-video.

See also: AWS API Documentation

Request Syntax

client.start_face_detection(
    Video={
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    ClientRequestToken='string',
    NotificationChannel={
        'SNSTopicArn': 'string',
        'RoleArn': 'string'
    },
    FaceAttributes='DEFAULT'|'ALL',
    JobTag='string'
)
type Video

dict

param Video

[REQUIRED]

The video in which you want to detect faces. The video must be stored in an Amazon S3 bucket.

  • S3Object (dict) --

    The Amazon S3 bucket name and file name for the video.

    • 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.

type ClientRequestToken

string

param ClientRequestToken

Idempotent token used to identify the start request. If you use the same token with multiple StartFaceDetection requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started more than once.

type NotificationChannel

dict

param NotificationChannel

The ARN of the Amazon SNS topic to which you want Rekognition Video to publish the completion status of the face detection operation.

  • SNSTopicArn (string) -- [REQUIRED]

    The Amazon SNS topic to which Amazon Rekognition to posts the completion status.

  • RoleArn (string) -- [REQUIRED]

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

type FaceAttributes

string

param FaceAttributes

The face attributes you want returned.

DEFAULT - The following subset of facial attributes are returned: BoundingBox, Confidence, Pose, Quality and Landmarks.

ALL - All facial attributes are returned.

type JobTag

string

param JobTag

Unique identifier you specify to identify the job in the completion status published to the Amazon Simple Notification Service topic.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier for the face detection job. Use JobId to identify the job in a subsequent call to GetFaceDetection .

DescribeStreamProcessor (new) Link ¶

Provides information about a stream processor created by . You can get information about the input and output streams, the input parameters for the face recognition being performed, and the current status of the stream processor.

See also: AWS API Documentation

Request Syntax

client.describe_stream_processor(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

Name of the stream processor for which you want information.

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'StreamProcessorArn': 'string',
    'Status': 'STOPPED'|'STARTING'|'RUNNING'|'FAILED'|'STOPPING',
    'StatusMessage': 'string',
    'CreationTimestamp': datetime(2015, 1, 1),
    'LastUpdateTimestamp': datetime(2015, 1, 1),
    'Input': {
        'KinesisVideoStream': {
            'Arn': 'string'
        }
    },
    'Output': {
        'KinesisDataStream': {
            'Arn': 'string'
        }
    },
    'RoleArn': 'string',
    'Settings': {
        'FaceSearch': {
            'CollectionId': 'string',
            'FaceMatchThreshold': ...
        }
    }
}

Response Structure

  • (dict) --

    • Name (string) --

      Name of the stream processor.

    • StreamProcessorArn (string) --

      ARN of the stream processor.

    • Status (string) --

      Current status of the stream processor.

    • StatusMessage (string) --

      Detailed status message about the stream processor.

    • CreationTimestamp (datetime) --

      Date and time the stream processor was created

    • LastUpdateTimestamp (datetime) --

      The time, in Unix format, the stream processor was last updated. For example, when the stream processor moves from a running state to a failed state, or when the user starts or stops the stream processor.

    • Input (dict) --

      Kinesis video stream that provides the source streaming video.

      • KinesisVideoStream (dict) --

        The Kinesis video stream input stream for the source streaming video.

        • Arn (string) --

          ARN of the Kinesis video stream stream that streams the source video.

    • Output (dict) --

      Kinesis data stream to which Rekognition Video puts the analysis results.

      • KinesisDataStream (dict) --

        The Amazon Kinesis Data Streams stream to which the Amazon Rekognition stream processor streams the analysis results.

        • Arn (string) --

          ARN of the output Amazon Kinesis Data Streams stream.

    • RoleArn (string) --

      ARN of the IAM role that allows access to the stream processor.

    • Settings (dict) --

      Face recognition input parameters that are being used by the stream processor. Includes the collection to use for face recognition and the face attributes to detect.

      • FaceSearch (dict) --

        Face search settings to use on a streaming video.

        • CollectionId (string) --

          The ID of a collection that contains faces that you want to search for.

        • FaceMatchThreshold (float) --

          Minimum face match confidence score that must be met to return a result for a recognized face. Default is 70. 0 is the lowest confidence. 100 is the highest confidence.