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 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
    Modifier and Type
    Class
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final AgeRange
    The estimated age range, in years, for the face.
    final Beard
    Indicates whether or not the face has a beard, and the confidence level in the determination.
    Bounding box of the face.
     
    final Float
    Confidence level that the bounding box contains a face (and not a different object such as a tree).
    final List<Emotion>
    The emotions that appear to be expressed on the face, and the confidence level in the determination.
    final boolean
     
    final boolean
    Indicates whether some other object is "equal to" this one by SDK fields.
    Indicates the direction the eyes are gazing in, as defined by pitch and yaw.
    Indicates whether or not the face is wearing eye glasses, and the confidence level in the determination.
    final EyeOpen
    Indicates whether or not the eyes on the face are open, and the confidence level in the determination.
    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.
    final Gender
    The predicted gender of a detected face.
    final <T> Optional<T>
    getValueForField(String fieldName, Class<T> clazz)
     
    final boolean
    For responses, this returns true if the service returned a value for the Emotions property.
    final int
     
    final boolean
    For responses, this returns true if the service returned a value for the Landmarks property.
    final List<Landmark>
    Indicates the location of landmarks on the face.
    final MouthOpen
    Indicates whether or not the mouth on the face is open, and the confidence level in the determination.
    final Mustache
    Indicates whether or not the face has a mustache, and the confidence level in the determination.
    final Pose
    Indicates the pose of the face as determined by its pitch, roll, and yaw.
    Identifies image brightness and sharpness.
    final List<SdkField<?>>
     
    static Class<? extends FaceDetail.Builder>
     
    final Smile
    Indicates whether or not the face is smiling, and the confidence level in the determination.
    Indicates 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 String
    Returns a string representation of this object.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder

    copy
  • Method Details

    • 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 the isEmpty() 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 the isEmpty() 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()

      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.

      Returns:
      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.
    • 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()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<FaceDetail.Builder,FaceDetail>
      Returns:
      a builder for type T
    • builder

      public static FaceDetail.Builder builder()
    • serializableBuilderClass

      public static Class<? extends FaceDetail.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.