Class FaceDetail
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<FaceDetail.Builder,FaceDetail>
Structure containing attributes of the face that the algorithm detected.
A FaceDetail object contains either the default facial attributes or all facial attributes. The default
attributes are BoundingBox, Confidence, Landmarks, Pose, and
Quality.
GetFaceDetection is the only Amazon Rekognition Video stored video operation that can return a
FaceDetail object with all attributes. To specify which attributes to return, use the
FaceAttributes input parameter for StartFaceDetection. The following Amazon Rekognition Video
operations return only the default attributes. The corresponding Start operations don't have a
FaceAttributes input parameter:
-
GetCelebrityRecognition
-
GetPersonTracking
-
GetFaceSearch
The Amazon Rekognition Image DetectFaces and IndexFaces operations can return all facial attributes. To
specify which attributes to return, use the Attributes input parameter for DetectFaces. For
IndexFaces, use the DetectAttributes input parameter.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AgeRangeageRange()The estimated age range, in years, for the face.final Beardbeard()Indicates whether or not the face has a beard, and the confidence level in the determination.final BoundingBoxBounding box of the face.static FaceDetail.Builderbuilder()final FloatConfidence level that the bounding box contains a face (and not a different object such as a tree).emotions()The emotions that appear to be expressed on the face, and the confidence level in the determination.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final EyeDirectionIndicates the direction the eyes are gazing in, as defined by pitch and yaw.final EyeglassesIndicates whether or not the face is wearing eye glasses, and the confidence level in the determination.final EyeOpeneyesOpen()Indicates whether or not the eyes on the face are open, and the confidence level in the determination.final FaceOccludedFaceOccludedshould 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.final Gendergender()The predicted gender of a detected face.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the Emotions property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the Landmarks property.Indicates the location of landmarks on the face.final MouthOpenIndicates whether or not the mouth on the face is open, and the confidence level in the determination.final Mustachemustache()Indicates whether or not the face has a mustache, and the confidence level in the determination.final Posepose()Indicates the pose of the face as determined by its pitch, roll, and yaw.final ImageQualityquality()Identifies image brightness and sharpness.static Class<? extends FaceDetail.Builder> final Smilesmile()Indicates whether or not the face is smiling, and the confidence level in the determination.final SunglassesIndicates whether or not the face is wearing sunglasses, and the confidence level in the determination.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
boundingBox
Bounding box of the face. Default attribute.
- Returns:
- Bounding box of the face. Default attribute.
-
ageRange
The estimated age range, in years, for the face. Low represents the lowest estimated age and High represents the highest estimated age.
- Returns:
- The estimated age range, in years, for the face. Low represents the lowest estimated age and High represents the highest estimated age.
-
smile
Indicates whether or not the face is smiling, and the confidence level in the determination.
- Returns:
- Indicates whether or not the face is smiling, and the confidence level in the determination.
-
eyeglasses
Indicates whether or not the face is wearing eye glasses, and the confidence level in the determination.
- Returns:
- Indicates whether or not the face is wearing eye glasses, and the confidence level in the determination.
-
sunglasses
Indicates whether or not the face is wearing sunglasses, and the confidence level in the determination.
- Returns:
- Indicates whether or not the face is wearing sunglasses, and the confidence level in the determination.
-
gender
The predicted gender of a detected face.
- Returns:
- The predicted gender of a detected face.
-
beard
Indicates whether or not the face has a beard, and the confidence level in the determination.
- Returns:
- Indicates whether or not the face has a beard, and the confidence level in the determination.
-
mustache
Indicates whether or not the face has a mustache, and the confidence level in the determination.
- Returns:
- Indicates whether or not the face has a mustache, and the confidence level in the determination.
-
eyesOpen
Indicates whether or not the eyes on the face are open, and the confidence level in the determination.
- Returns:
- Indicates whether or not the eyes on the face are open, and the confidence level in the determination.
-
mouthOpen
Indicates whether or not the mouth on the face is open, and the confidence level in the determination.
- Returns:
- Indicates whether or not the mouth on the face is open, and the confidence level in the determination.
-
hasEmotions
public final boolean hasEmotions()For responses, this returns true if the service returned a value for the Emotions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
emotions
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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEmotions()method.- Returns:
- 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.
-
hasLandmarks
public final boolean hasLandmarks()For responses, this returns true if the service returned a value for the Landmarks property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
landmarks
Indicates the location of landmarks on the face. Default attribute.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLandmarks()method.- Returns:
- Indicates the location of landmarks on the face. Default attribute.
-
pose
Indicates the pose of the face as determined by its pitch, roll, and yaw. Default attribute.
- Returns:
- Indicates the pose of the face as determined by its pitch, roll, and yaw. Default attribute.
-
quality
Identifies image brightness and sharpness. Default attribute.
- Returns:
- Identifies image brightness and sharpness. Default attribute.
-
confidence
Confidence level that the bounding box contains a face (and not a different object such as a tree). Default attribute.
- Returns:
- Confidence level that the bounding box contains a face (and not a different object such as a tree). Default attribute.
-
faceOccluded
FaceOccludedshould 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.FaceOccludedshould 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.- Returns:
FaceOccludedshould 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.FaceOccludedshould 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.
-
eyeDirection
Indicates the direction the eyes are gazing in, as defined by pitch and yaw.
- Returns:
- Indicates the direction the eyes are gazing in, as defined by pitch and yaw.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<FaceDetail.Builder,FaceDetail> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-