Class 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:
    Serialized Form
    • 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 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.
      • hashCode

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

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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)