[ aws . rekognition ]
get-face-detection
Description
Gets face detection results for a Amazon Rekognition Video analysis started by StartFaceDetection .
Face detection with Amazon Rekognition Video is an asynchronous operation. You start face detection by calling StartFaceDetection which returns a job identifier (JobId ). When the face detection operation finishes, Amazon 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 GetFaceDetection 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 .
Note that for the GetFaceDetection operation, the returned values for FaceOccluded and EyeDirection will always be “null”.
See also: AWS API Documentation
Synopsis
get-face-detection
--job-id <value>
[--max-results <value>]
[--next-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
Options
--job-id (string)
JobId is returned from StartFaceDetection .--max-results (integer)
--next-token (string)
--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.
--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
Global Options
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
- json
- text
- table
- yaml
- yaml-stream
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
- on
- off
- auto
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
- base64
- raw-in-base64-out
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
Examples
Note
To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.
Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .
To get the results of a face detection operation
The following get-face-detection command displays the results of a face detection operation that you started previously by calling start-face-detection.
aws rekognition get-face-detection \
--job-id 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Output:
{
"Faces": [
{
"Timestamp": 467,
"Face": {
"BoundingBox": {
"Width": 0.1560753583908081,
"Top": 0.13555361330509186,
"Left": -0.0952017530798912,
"Height": 0.6934483051300049
},
"Landmarks": [
{
"Y": 0.4013825058937073,
"X": -0.041750285774469376,
"Type": "eyeLeft"
},
{
"Y": 0.41695496439933777,
"X": 0.027979329228401184,
"Type": "eyeRight"
},
{
"Y": 0.6375303268432617,
"X": -0.04034662991762161,
"Type": "mouthLeft"
},
{
"Y": 0.6497718691825867,
"X": 0.013960429467260838,
"Type": "mouthRight"
},
{
"Y": 0.5238034129142761,
"X": 0.008022055961191654,
"Type": "nose"
}
],
"Pose": {
"Yaw": -58.07863998413086,
"Roll": 1.9384294748306274,
"Pitch": -24.66305160522461
},
"Quality": {
"Sharpness": 83.14741516113281,
"Brightness": 25.75942611694336
},
"Confidence": 87.7622299194336
}
},
{
"Timestamp": 967,
"Face": {
"BoundingBox": {
"Width": 0.28559377789497375,
"Top": 0.19436298310756683,
"Left": 0.024553587660193443,
"Height": 0.7216082215309143
},
"Landmarks": [
{
"Y": 0.4650231599807739,
"X": 0.16269078850746155,
"Type": "eyeLeft"
},
{
"Y": 0.4843238294124603,
"X": 0.2782580852508545,
"Type": "eyeRight"
},
{
"Y": 0.71530681848526,
"X": 0.1741468608379364,
"Type": "mouthLeft"
},
{
"Y": 0.7310671210289001,
"X": 0.26857468485832214,
"Type": "mouthRight"
},
{
"Y": 0.582602322101593,
"X": 0.2566150426864624,
"Type": "nose"
}
],
"Pose": {
"Yaw": 11.487052917480469,
"Roll": 5.074230670928955,
"Pitch": 15.396159172058105
},
"Quality": {
"Sharpness": 73.32209777832031,
"Brightness": 54.96497344970703
},
"Confidence": 99.99998474121094
}
}
],
"NextToken": "OzL223pDKy9116O/02KXRqFIEAwxjy4PkgYcm3hSo0rdysbXg5Ex0eFgTGEj0ADEac6S037U",
"JobStatus": "SUCCEEDED",
"VideoMetadata": {
"Format": "QuickTime / MOV",
"FrameRate": 29.970617294311523,
"Codec": "h264",
"DurationMillis": 6806,
"FrameHeight": 1080,
"FrameWidth": 1920
}
}
For more information, see Detecting Faces in a Stored Video in the Amazon Rekognition Developer Guide.
Output
JobStatus -> (string)
StatusMessage -> (string)
StatusMessage provides a descriptive error message.VideoMetadata -> (structure)
Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a Amazon Rekognition video operation.
Codec -> (string)
DurationMillis -> (long)
Format -> (string)
FrameRate -> (float)
FrameHeight -> (long)
FrameWidth -> (long)
ColorRange -> (string)
NextToken -> (string)
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.
(structure)
Information about a face detected in a video analysis request and the time the face was detected in the video.
Timestamp -> (long)
Timestamp is not guaranteed to be accurate to the individual frame where the face first appears.Face -> (structure)
The face properties for the detected face.
BoundingBox -> (structure)
Bounding box of the face. Default attribute.
Width -> (float)
Height -> (float)
Left -> (float)
Top -> (float)
AgeRange -> (structure)
The estimated age range, in years, for the face. Low represents the lowest estimated age and High represents the highest estimated age.
Low -> (integer)
High -> (integer)
Smile -> (structure)
Indicates whether or not the face is smiling, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
Eyeglasses -> (structure)
Indicates whether or not the face is wearing eye glasses, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
Sunglasses -> (structure)
Indicates whether or not the face is wearing sunglasses, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
Gender -> (structure)
The predicted gender of a detected face.
Value -> (string)
Confidence -> (float)
Beard -> (structure)
Indicates whether or not the face has a beard, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
Mustache -> (structure)
Indicates whether or not the face has a mustache, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
EyesOpen -> (structure)
Indicates whether or not the eyes on the face are open, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
MouthOpen -> (structure)
Indicates whether or not the mouth on the face is open, and the confidence level in the determination.
Value -> (boolean)
Confidence -> (float)
Emotions -> (list)
The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person’s face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.
(structure)
The emotions that appear to be expressed on the face, and the confidence level in the determination. The API is only making a determination of the physical appearance of a person’s face. It is not a determination of the person’s internal emotional state and should not be used in such a way. For example, a person pretending to have a sad face might not be sad emotionally.
Type -> (string)
Confidence -> (float)
Landmarks -> (list)
Indicates the location of landmarks on the face. Default attribute.
(structure)
Indicates the location of the landmark on the face.
Type -> (string)
X -> (float)
Y -> (float)
Pose -> (structure)
Indicates the pose of the face as determined by its pitch, roll, and yaw. Default attribute.
Roll -> (float)
Yaw -> (float)
Pitch -> (float)
Quality -> (structure)
Identifies image brightness and sharpness. Default attribute.
Brightness -> (float)
Sharpness -> (float)
Confidence -> (float)
FaceOccluded -> (structure)
FaceOccluded should return “true” with a high confidence score if a detected face’s eyes, nose, and mouth are partially captured or if they are covered by masks, dark sunglasses, cell phones, hands, or other objects. FaceOccluded should return “false” with a high confidence score if common occurrences that do not impact face verification are detected, such as eye glasses, lightly tinted sunglasses, strands of hair, and others.Value -> (boolean)
Confidence -> (float)
EyeDirection -> (structure)
Indicates the direction the eyes are gazing in, as defined by pitch and yaw.
Yaw -> (float)
Pitch -> (float)
Confidence -> (float)
JobId -> (string)
Video -> (structure)
Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to specify a video for analysis. The supported file formats are .mp4, .mov and .avi.
S3Object -> (structure)
The Amazon S3 bucket name and file name for the video.
Bucket -> (string)
Name -> (string)
Version -> (string)
JobTag -> (string)
© Copyright 2025, Amazon Web Services. Created using Sphinx.