From 106a7299c6900ee207572047ec490b2649e802b5 Mon Sep 17 00:00:00 2001 From: AWS Mobile SDK Bot <46607340+awsmobilesdk@users.noreply.github.com> Date: Tue, 9 May 2023 13:53:39 -0400 Subject: [PATCH] feat(aws-android-sdk-rekognition): update models to latest (#3279) --- .../rekognition/AmazonRekognition.java | 21 +- .../rekognition/AmazonRekognitionClient.java | 21 +- .../services/rekognition/model/Attribute.java | 24 +- ...ateFaceLivenessSessionRequestSettings.java | 20 +- .../rekognition/model/DetectFacesRequest.java | 175 ++++++------ .../rekognition/model/FaceDetail.java | 108 +++++++- .../rekognition/model/FaceOccluded.java | 260 ++++++++++++++++++ .../rekognition/model/IndexFacesRequest.java | 172 ++++++------ .../transform/FaceDetailJsonMarshaller.java | 5 + .../transform/FaceDetailJsonUnmarshaller.java | 3 + .../transform/FaceOccludedJsonMarshaller.java | 49 ++++ .../FaceOccludedJsonUnmarshaller.java | 59 ++++ 12 files changed, 728 insertions(+), 189 deletions(-) create mode 100644 aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/FaceOccluded.java create mode 100644 aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonMarshaller.java create mode 100644 aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonUnmarshaller.java diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognition.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognition.java index a7c3df8e30..9fc3218cef 100644 --- a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognition.java +++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognition.java @@ -1539,8 +1539,8 @@ DetectCustomLabelsResult detectCustomLabels(DetectCustomLabelsRequest detectCust * each face detected, the operation returns face details. These details * include a bounding box of the face, a confidence value (that the bounding * box contains a face), and a fixed set of attributes such as facial - * landmarks (for example, coordinates of eye and mouth), presence of beard, - * sunglasses, and so on. + * landmarks (for example, coordinates of eye and mouth), pose, presence of + * facial occlusion, and so on. *
** The face-detection algorithm is most effective on frontal faces. For @@ -2889,13 +2889,16 @@ GetTextDetectionResult getTextDetection(GetTextDetectionRequest getTextDetection * * *
- * If you request all facial attributes (by using the
- * detectionAttributes
parameter), Amazon Rekognition returns
- * detailed facial attributes, such as facial landmarks (for example,
- * location of eye and mouth) and other facial attributes. If you provide
- * the same image, specify the same collection, and use the same external ID
- * in the IndexFaces
operation, Amazon Rekognition doesn't save
- * duplicate face metadata.
+ * If you request ALL
or specific facial attributes (e.g.,
+ * FACE_OCCLUDED
) by using the detectionAttributes parameter,
+ * Amazon Rekognition returns detailed facial attributes, such as facial
+ * landmarks (for example, location of eye and mouth), facial occlusion, and
+ * other facial attributes.
+ *
+ * If you provide the same image, specify the same collection, and use the
+ * same external ID in the IndexFaces
operation, Amazon
+ * Rekognition doesn't save duplicate face metadata.
*
diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java index d08dd2e3aa..3d1d424e79 100644 --- a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java +++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java @@ -2378,8 +2378,8 @@ public DetectCustomLabelsResult detectCustomLabels( * each face detected, the operation returns face details. These details * include a bounding box of the face, a confidence value (that the bounding * box contains a face), and a fixed set of attributes such as facial - * landmarks (for example, coordinates of eye and mouth), presence of beard, - * sunglasses, and so on. + * landmarks (for example, coordinates of eye and mouth), pose, presence of + * facial occlusion, and so on. *
** The face-detection algorithm is most effective on frontal faces. For @@ -4155,13 +4155,16 @@ public GetTextDetectionResult getTextDetection(GetTextDetectionRequest getTextDe * * *
- * If you request all facial attributes (by using the
- * detectionAttributes
parameter), Amazon Rekognition returns
- * detailed facial attributes, such as facial landmarks (for example,
- * location of eye and mouth) and other facial attributes. If you provide
- * the same image, specify the same collection, and use the same external ID
- * in the IndexFaces
operation, Amazon Rekognition doesn't save
- * duplicate face metadata.
+ * If you request ALL
or specific facial attributes (e.g.,
+ * FACE_OCCLUDED
) by using the detectionAttributes parameter,
+ * Amazon Rekognition returns detailed facial attributes, such as facial
+ * landmarks (for example, location of eye and mouth), facial occlusion, and
+ * other facial attributes.
+ *
+ * If you provide the same image, specify the same collection, and use the
+ * same external ID in the IndexFaces
operation, Amazon
+ * Rekognition doesn't save duplicate face metadata.
*
diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/Attribute.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/Attribute.java
index c9eb5e035a..8fbe5ca597 100644
--- a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/Attribute.java
+++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/Attribute.java
@@ -24,7 +24,18 @@
public enum Attribute {
DEFAULT("DEFAULT"),
- ALL("ALL");
+ ALL("ALL"),
+ AGE_RANGE("AGE_RANGE"),
+ BEARD("BEARD"),
+ EMOTIONS("EMOTIONS"),
+ EYEGLASSES("EYEGLASSES"),
+ EYES_OPEN("EYES_OPEN"),
+ GENDER("GENDER"),
+ MOUTH_OPEN("MOUTH_OPEN"),
+ MUSTACHE("MUSTACHE"),
+ FACE_OCCLUDED("FACE_OCCLUDED"),
+ SMILE("SMILE"),
+ SUNGLASSES("SUNGLASSES");
private String value;
@@ -42,6 +53,17 @@ public String toString() {
enumMap = new HashMaps3:PutObject
permission on the Amazon S3 bucket.
*
s3:PutObject
permission on the Amazon S3 bucket.
*
*
* @return
@@ -63,6 +65,8 @@ public class CreateFaceLivenessSessionRequestSettings implements Serializable {
* must be located in the caller's AWS account and in the same
* region as the Face Liveness end-point. Additionally, the Amazon
* S3 object keys are auto-generated by the Face Liveness system.
+ * Requires that the caller has the s3:PutObject
+ * permission on the Amazon S3 bucket.
*
s3:PutObject
permission on the Amazon S3 bucket.
*
*
* @param outputConfig
@@ -84,7 +89,8 @@ public LivenessOutputConfig getOutputConfig() {
* Amazon S3 bucket must be located in the caller's AWS account
* and in the same region as the Face Liveness end-point.
* Additionally, the Amazon S3 object keys are auto-generated by
- * the Face Liveness system.
+ * the Face Liveness system. Requires that the caller has the
+ * s3:PutObject
permission on the Amazon S3 bucket.
*
s3:PutObject
permission on the Amazon S3 bucket.
*
*
* Returns a reference to this object so that method calls can be chained
@@ -109,7 +116,8 @@ public void setOutputConfig(LivenessOutputConfig outputConfig) {
* Amazon S3 bucket must be located in the caller's AWS account
* and in the same region as the Face Liveness end-point.
* Additionally, the Amazon S3 object keys are auto-generated by
- * the Face Liveness system.
+ * the Face Liveness system. Requires that the caller has the
+ * s3:PutObject
permission on the Amazon S3 bucket.
*
* The face-detection algorithm is most effective on frontal faces. For @@ -70,18 +70,19 @@ public class DetectFacesRequest extends AmazonWebServiceRequest implements Seria /** *
- * An array of facial attributes you want to be returned. This can be the
- * default list of attributes or all attributes. If you don't specify a
- * value for Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"
] or
+ * just ["FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
*
* If you provide both, ["ALL", "DEFAULT"]
, the service uses a
- * logical AND operator to determine which attributes to return (in this
+ * logical "AND" operator to determine which attributes to return (in this
* case, all attributes).
*
- * An array of facial attributes you want to be returned. This can be the
- * default list of attributes or all attributes. If you don't specify a
- * value for Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"
] or
+ * just ["FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
*
* If you provide both, ["ALL", "DEFAULT"]
, the service uses a
- * logical AND operator to determine which attributes to return (in this
+ * logical "AND" operator to determine which attributes to return (in this
* case, all attributes).
*
- * An array of facial attributes you want to be returned. This can
- * be the default list of attributes or all attributes. If you don't
- * specify a value for Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of
- * facial attributes: BoundingBox
,
- * Confidence
, Pose
, Quality
,
- * and Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
,
+ * Pose
, Quality
, and
+ * Landmarks
- will always be returned. You can request
+ * for specific facial attributes (in addition to the default list)
+ * - by using ["DEFAULT", "FACE_OCCLUDED"
] or just [
+ * "FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
*
* If you provide both, ["ALL", "DEFAULT"]
, the service
- * uses a logical AND operator to determine which attributes to
+ * uses a logical "AND" operator to determine which attributes to
* return (in this case, all attributes).
*
- * An array of facial attributes you want to be returned. This can be the
- * default list of attributes or all attributes. If you don't specify a
- * value for Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"
] or
+ * just ["FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
*
* If you provide both, ["ALL", "DEFAULT"]
, the service uses a
- * logical AND operator to determine which attributes to return (in this
+ * logical "AND" operator to determine which attributes to return (in this
* case, all attributes).
*
- * An array of facial attributes you want to be returned. This
- * can be the default list of attributes or all attributes. If
- * you don't specify a value for Attributes
or if
- * you specify ["DEFAULT"]
, the API returns the
- * following subset of facial attributes:
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
* BoundingBox
, Confidence
,
* Pose
, Quality
, and
- * Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * Landmarks
- will always be returned. You can
+ * request for specific facial attributes (in addition to the
+ * default list) - by using [
+ * "DEFAULT", "FACE_OCCLUDED"
] or just [
+ * "FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
*
* If you provide both, ["ALL", "DEFAULT"]
, the
- * service uses a logical AND operator to determine which
+ * service uses a logical "AND" operator to determine which
* attributes to return (in this case, all attributes).
*
- * An array of facial attributes you want to be returned. This can be the
- * default list of attributes or all attributes. If you don't specify a
- * value for Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"
] or
+ * just ["FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
*
* If you provide both, ["ALL", "DEFAULT"]
, the service uses a
- * logical AND operator to determine which attributes to return (in this
+ * logical "AND" operator to determine which attributes to return (in this
* case, all attributes).
*
@@ -312,20 +318,21 @@ public void setAttributes(java.util.Collection
- * An array of facial attributes you want to be returned. This
- * can be the default list of attributes or all attributes. If
- * you don't specify a value for
* If you provide both,
- * An array of facial attributes you want to be returned. This can be the
- * default list of attributes or all attributes. If you don't specify a
- * value for
* If you provide both,
@@ -362,20 +370,21 @@ public DetectFacesRequest withAttributes(String... attributes) {
* together.
*
* @param attributes
- * An array of facial attributes you want to be returned. This
- * can be the default list of attributes or all attributes. If
- * you don't specify a value for
* If you provide both,
+ *
* Bounding box of the face. Default attribute.
@@ -1037,6 +1050,90 @@ public FaceDetail withConfidence(Float confidence) {
return this;
}
+ /**
+ *
+ *
+ *
+ *
+ *
+ *
+ * Returns a reference to this object so that method calls can be chained
+ * together.
+ *
+ * @param faceOccluded
+ *
+ *
+ * You can use
+ * True 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. False if common occurrences that do not impact face
+ * verification are detected, such as eye glasses, lightly tinted
+ * sunglasses, strands of hair, and others.
+ *
+ * The confidence that the service has detected the presence of a face
+ * occlusion.
+ *
+ * Constraints:
+ * True 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. False if common occurrences that do not impact face
+ * verification are detected, such as eye glasses, lightly tinted
+ * sunglasses, strands of hair, and others.
+ *
+ * True 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. False if common occurrences that
+ * do not impact face verification are detected, such as eye
+ * glasses, lightly tinted sunglasses, strands of hair, and others.
+ *
+ * True 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. False if common occurrences that do not impact face
+ * verification are detected, such as eye glasses, lightly tinted
+ * sunglasses, strands of hair, and others.
+ *
+ * True 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. False if common occurrences that
+ * do not impact face verification are detected, such as eye
+ * glasses, lightly tinted sunglasses, strands of hair, and others.
+ *
+ * True 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. False if common occurrences that do not impact face
+ * verification are detected, such as eye glasses, lightly tinted
+ * sunglasses, strands of hair, and others.
+ *
+ * True 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. False if common
+ * occurrences that do not impact face verification are detected,
+ * such as eye glasses, lightly tinted sunglasses, strands of
+ * hair, and others.
+ *
+ * True 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. False if common occurrences that do not impact face
+ * verification are detected, such as eye glasses, lightly tinted
+ * sunglasses, strands of hair, and others.
+ *
+ * Returns a reference to this object so that method calls can be chained
+ * together.
+ *
+ * @param value
+ * True 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. False if common
+ * occurrences that do not impact face verification are detected,
+ * such as eye glasses, lightly tinted sunglasses, strands of
+ * hair, and others.
+ *
+ * The confidence that the service has detected the presence of a face
+ * occlusion.
+ *
+ * Constraints:
+ * The confidence that the service has detected the presence of a
+ * face occlusion.
+ *
+ * The confidence that the service has detected the presence of a face
+ * occlusion.
+ *
+ * Constraints:
+ * The confidence that the service has detected the presence of a
+ * face occlusion.
+ *
+ * The confidence that the service has detected the presence of a face
+ * occlusion.
+ *
+ * Returns a reference to this object so that method calls can be chained
+ * together.
+ *
+ * Constraints:
+ * The confidence that the service has detected the presence of a
+ * face occlusion.
+ *
- * If you request all facial attributes (by using the
- *
+ * If you provide the same image, specify the same collection, and use the same
+ * external ID in the
@@ -217,14 +220,15 @@ public class IndexFacesRequest extends AmazonWebServiceRequest implements Serial
/**
*
- * An array of facial attributes that you want to be returned. This can be
- * the default list of attributes or all attributes. If you don't specify a
- * value for
* If you provide both,
- * An array of facial attributes that you want to be returned. This can be
- * the default list of attributes or all attributes. If you don't specify a
- * value for
* If you provide both,
- * An array of facial attributes that you want to be returned. This
- * can be the default list of attributes or all attributes. If you
- * don't specify a value for
* If you provide both,
- * An array of facial attributes that you want to be returned. This can be
- * the default list of attributes or all attributes. If you don't specify a
- * value for
* If you provide both,
- * An array of facial attributes that you want to be returned.
- * This can be the default list of attributes or all attributes.
- * If you don't specify a value for
* If you provide both,
- * An array of facial attributes that you want to be returned. This can be
- * the default list of attributes or all attributes. If you don't specify a
- * value for
* If you provide both,
- * An array of facial attributes that you want to be returned.
- * This can be the default list of attributes or all attributes.
- * If you don't specify a value for
* If you provide both,
- * An array of facial attributes that you want to be returned. This can be
- * the default list of attributes or all attributes. If you don't specify a
- * value for
* If you provide both,
- * An array of facial attributes that you want to be returned.
- * This can be the default list of attributes or all attributes.
- * If you don't specify a value for
* If you provide both, Attributes
or if
- * you specify ["DEFAULT"]
, the API returns the
- * following subset of facial attributes:
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
* BoundingBox
, Confidence
,
* Pose
, Quality
, and
- * Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * Landmarks
- will always be returned. You can
+ * request for specific facial attributes (in addition to the
+ * default list) - by using [
+ * "DEFAULT", "FACE_OCCLUDED"
] or just [
+ * "FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
* ["ALL", "DEFAULT"]
, the
- * service uses a logical AND operator to determine which
+ * service uses a logical "AND" operator to determine which
* attributes to return (in this case, all attributes).
* Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"
] or
+ * just ["FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
* ["ALL", "DEFAULT"]
, the service uses a
- * logical AND operator to determine which attributes to return (in this
+ * logical "AND" operator to determine which attributes to return (in this
* case, all attributes).
* Attributes
or if
- * you specify ["DEFAULT"]
, the API returns the
- * following subset of facial attributes:
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
* BoundingBox
, Confidence
,
* Pose
, Quality
, and
- * Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * Landmarks
- will always be returned. You can
+ * request for specific facial attributes (in addition to the
+ * default list) - by using [
+ * "DEFAULT", "FACE_OCCLUDED"
] or just [
+ * "FACE_OCCLUDED"
]. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
* ["ALL", "DEFAULT"]
, the
- * service uses a logical AND operator to determine which
+ * service uses a logical "AND" operator to determine which
* attributes to return (in this case, all attributes).
* 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * FaceOccluded
to determine if an obstruction on a
+ * face negatively impacts using the image for face matching.
+ *
+ * Length: 0.0 - 100.0
+ */
+ private Float confidence;
+
+ /**
+ *
+ * Length: 0.0 - 100.0
+ *
+ * @return
+ * Length: 0.0 - 100.0
+ *
+ * @param confidence
+ * Length: 0.0 - 100.0
+ *
+ * @param confidence detectionAttributes
parameter), Amazon Rekognition returns
- * detailed facial attributes, such as facial landmarks (for example, location
- * of eye and mouth) and other facial attributes. If you provide the same image,
- * specify the same collection, and use the same external ID in the
- * IndexFaces
operation, Amazon Rekognition doesn't save duplicate
- * face metadata.
+ * If you request ALL
or specific facial attributes (e.g.,
+ * FACE_OCCLUDED
) by using the detectionAttributes parameter,
+ * Amazon Rekognition returns detailed facial attributes, such as facial
+ * landmarks (for example, location of eye and mouth), facial occlusion, and
+ * other facial attributes.
+ * IndexFaces
operation, Amazon Rekognition
+ * doesn't save duplicate face metadata.
* Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"]
or
+ * just ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
* ["ALL", "DEFAULT"]
, the service uses a
@@ -538,14 +542,15 @@ public IndexFacesRequest withExternalImageId(String externalImageId) {
/**
* Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"]
or
+ * just ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
* ["ALL", "DEFAULT"]
, the service uses a
@@ -554,15 +559,16 @@ public IndexFacesRequest withExternalImageId(String externalImageId) {
* Attributes
or if you
- * specify ["DEFAULT"]
, the API returns the following
- * subset of facial attributes: BoundingBox
,
- * Confidence
, Pose
, Quality
,
- * and Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
,
+ * Pose
, Quality
, and
+ * Landmarks
- will always be returned. You can request
+ * for specific facial attributes (in addition to the default list)
+ * - by using ["DEFAULT", "FACE_OCCLUDED"]
or just
+ * ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
* ["ALL", "DEFAULT"]
, the service
@@ -576,14 +582,15 @@ public java.util.ListAttributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"]
or
+ * just ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
* ["ALL", "DEFAULT"]
, the service uses a
@@ -592,16 +599,17 @@ public java.util.ListAttributes
or if
- * you specify ["DEFAULT"]
, the API returns the
- * following subset of facial attributes:
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
* BoundingBox
, Confidence
,
* Pose
, Quality
, and
- * Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * Landmarks
- will always be returned. You can
+ * request for specific facial attributes (in addition to the
+ * default list) - by using
+ * ["DEFAULT", "FACE_OCCLUDED"]
or just
+ * ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
* ["ALL", "DEFAULT"]
, the
@@ -620,14 +628,15 @@ public void setDetectionAttributes(java.util.CollectionAttributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"]
or
+ * just ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
* ["ALL", "DEFAULT"]
, the service uses a
@@ -639,16 +648,17 @@ public void setDetectionAttributes(java.util.CollectionAttributes
or if
- * you specify ["DEFAULT"]
, the API returns the
- * following subset of facial attributes:
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
* BoundingBox
, Confidence
,
* Pose
, Quality
, and
- * Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * Landmarks
- will always be returned. You can
+ * request for specific facial attributes (in addition to the
+ * default list) - by using
+ * ["DEFAULT", "FACE_OCCLUDED"]
or just
+ * ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
* ["ALL", "DEFAULT"]
, the
@@ -670,14 +680,15 @@ public IndexFacesRequest withDetectionAttributes(String... detectionAttributes)
/**
* Attributes
or if you specify
- * ["DEFAULT"]
, the API returns the following subset of facial
- * attributes: BoundingBox
, Confidence
,
- * Pose
, Quality
, and Landmarks
. If
- * you provide ["ALL"]
, all facial attributes are returned, but
- * the operation takes longer to complete.
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
+ * BoundingBox
, Confidence
, Pose
,
+ * Quality
, and Landmarks
- will always be
+ * returned. You can request for specific facial attributes (in addition to
+ * the default list) - by using ["DEFAULT", "FACE_OCCLUDED"]
or
+ * just ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more attributes may
+ * increase response time.
* ["ALL", "DEFAULT"]
, the service uses a
@@ -689,16 +700,17 @@ public IndexFacesRequest withDetectionAttributes(String... detectionAttributes)
* together.
*
* @param detectionAttributes Attributes
or if
- * you specify ["DEFAULT"]
, the API returns the
- * following subset of facial attributes:
+ * An array of facial attributes you want to be returned. A
+ * DEFAULT
subset of facial attributes -
* BoundingBox
, Confidence
,
* Pose
, Quality
, and
- * Landmarks
. If you provide ["ALL"]
,
- * all facial attributes are returned, but the operation takes
- * longer to complete.
+ * Landmarks
- will always be returned. You can
+ * request for specific facial attributes (in addition to the
+ * default list) - by using
+ * ["DEFAULT", "FACE_OCCLUDED"]
or just
+ * ["FACE_OCCLUDED"]
. You can request for all facial
+ * attributes by using ["ALL"]
. Requesting more
+ * attributes may increase response time.
* ["ALL", "DEFAULT"]
, the
diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonMarshaller.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonMarshaller.java
index f98a134ce5..ae2db2d6aa 100644
--- a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonMarshaller.java
+++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonMarshaller.java
@@ -113,6 +113,11 @@ public void marshall(FaceDetail faceDetail, AwsJsonWriter jsonWriter) throws Exc
jsonWriter.name("Confidence");
jsonWriter.value(confidence);
}
+ if (faceDetail.getFaceOccluded() != null) {
+ FaceOccluded faceOccluded = faceDetail.getFaceOccluded();
+ jsonWriter.name("FaceOccluded");
+ FaceOccludedJsonMarshaller.getInstance().marshall(faceOccluded, jsonWriter);
+ }
jsonWriter.endObject();
}
diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonUnmarshaller.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonUnmarshaller.java
index 5a7621d5f1..67a010803e 100644
--- a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonUnmarshaller.java
+++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceDetailJsonUnmarshaller.java
@@ -84,6 +84,9 @@ public FaceDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
} else if (name.equals("Confidence")) {
faceDetail.setConfidence(FloatJsonUnmarshaller.getInstance()
.unmarshall(context));
+ } else if (name.equals("FaceOccluded")) {
+ faceDetail.setFaceOccluded(FaceOccludedJsonUnmarshaller.getInstance()
+ .unmarshall(context));
} else {
reader.skipValue();
}
diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonMarshaller.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonMarshaller.java
new file mode 100644
index 0000000000..5ed12af5ff
--- /dev/null
+++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonMarshaller.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.amazonaws.services.rekognition.model.transform;
+
+import com.amazonaws.services.rekognition.model.*;
+import com.amazonaws.util.DateUtils;
+import com.amazonaws.util.json.AwsJsonWriter;
+
+/**
+ * JSON marshaller for POJO FaceOccluded
+ */
+class FaceOccludedJsonMarshaller {
+
+ public void marshall(FaceOccluded faceOccluded, AwsJsonWriter jsonWriter) throws Exception {
+ jsonWriter.beginObject();
+ if (faceOccluded.getValue() != null) {
+ Boolean value = faceOccluded.getValue();
+ jsonWriter.name("Value");
+ jsonWriter.value(value);
+ }
+ if (faceOccluded.getConfidence() != null) {
+ Float confidence = faceOccluded.getConfidence();
+ jsonWriter.name("Confidence");
+ jsonWriter.value(confidence);
+ }
+ jsonWriter.endObject();
+ }
+
+ private static FaceOccludedJsonMarshaller instance;
+
+ public static FaceOccludedJsonMarshaller getInstance() {
+ if (instance == null)
+ instance = new FaceOccludedJsonMarshaller();
+ return instance;
+ }
+}
diff --git a/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonUnmarshaller.java b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonUnmarshaller.java
new file mode 100644
index 0000000000..6ee3631d31
--- /dev/null
+++ b/aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/transform/FaceOccludedJsonUnmarshaller.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.amazonaws.services.rekognition.model.transform;
+
+import com.amazonaws.services.rekognition.model.*;
+import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
+import com.amazonaws.transform.*;
+import com.amazonaws.util.json.AwsJsonReader;
+
+/**
+ * JSON unmarshaller for POJO FaceOccluded
+ */
+class FaceOccludedJsonUnmarshaller implements Unmarshaller