Class FaceDetail
- java.lang.Object
-
- software.amazon.awssdk.services.rekognition.model.FaceDetail
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<FaceDetail.Builder,FaceDetail>
@Generated("software.amazon.awssdk:codegen") public final class FaceDetail extends Object implements SdkPojo, Serializable, ToCopyableBuilder<FaceDetail.Builder,FaceDetail>
Structure containing attributes of the face that the algorithm detected.
A
FaceDetailobject contains either the default facial attributes or all facial attributes. The default attributes areBoundingBox,Confidence,Landmarks,Pose, andQuality.GetFaceDetection is the only Amazon Rekognition Video stored video operation that can return a
FaceDetailobject with all attributes. To specify which attributes to return, use theFaceAttributesinput parameter for StartFaceDetection. The following Amazon Rekognition Video operations return only the default attributes. The corresponding Start operations don't have aFaceAttributesinput 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
Attributesinput parameter forDetectFaces. ForIndexFaces, use theDetectAttributesinput parameter.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFaceDetail.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AgeRangeageRange()The estimated age range, in years, for the face.Beardbeard()Indicates whether or not the face has a beard, and the confidence level in the determination.BoundingBoxboundingBox()Bounding box of the face.static FaceDetail.Builderbuilder()Floatconfidence()Confidence level that the bounding box contains a face (and not a different object such as a tree).List<Emotion>emotions()The emotions that appear to be expressed on the face, and the confidence level in the determination.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)EyeDirectioneyeDirection()Indicates the direction the eyes are gazing in, as defined by pitch and yaw.Eyeglasseseyeglasses()Indicates whether or not the face is wearing eye glasses, and the confidence level in the determination.EyeOpeneyesOpen()Indicates whether or not the eyes on the face are open, and the confidence level in the determination.FaceOccludedfaceOccluded()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.Gendergender()The predicted gender of a detected face.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasEmotions()For responses, this returns true if the service returned a value for the Emotions property.inthashCode()booleanhasLandmarks()For responses, this returns true if the service returned a value for the Landmarks property.List<Landmark>landmarks()Indicates the location of landmarks on the face.MouthOpenmouthOpen()Indicates whether or not the mouth on the face is open, and the confidence level in the determination.Mustachemustache()Indicates whether or not the face has a mustache, and the confidence level in the determination.Posepose()Indicates the pose of the face as determined by its pitch, roll, and yaw.ImageQualityquality()Identifies image brightness and sharpness.List<SdkField<?>>sdkFields()static Class<? extends FaceDetail.Builder>serializableBuilderClass()Smilesmile()Indicates whether or not the face is smiling, and the confidence level in the determination.Sunglassessunglasses()Indicates whether or not the face is wearing sunglasses, and the confidence level in the determination.FaceDetail.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
boundingBox
public final BoundingBox boundingBox()
Bounding box of the face. Default attribute.
- Returns:
- Bounding box of the face. Default attribute.
-
ageRange
public final AgeRange 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
public final Smile 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
public final Eyeglasses 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
public final Sunglasses 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
public final Gender gender()
The predicted gender of a detected face.
- Returns:
- The predicted gender of a detected face.
-
beard
public final Beard 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
public final Mustache 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
public final EyeOpen 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
public final MouthOpen 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
public final List<Emotion> 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
public final List<Landmark> 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
public final Pose 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
public final ImageQuality quality()
Identifies image brightness and sharpness. Default attribute.
- Returns:
- Identifies image brightness and sharpness. Default attribute.
-
confidence
public final Float 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
public final FaceOccluded 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
public final EyeDirection 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
public FaceDetail.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<FaceDetail.Builder,FaceDetail>
-
builder
public static FaceDetail.Builder builder()
-
serializableBuilderClass
public static Class<? extends FaceDetail.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-