From 8ba1b59e4cb09bc3864040e0a7f9bbeb3a0c2106 Mon Sep 17 00:00:00 2001 From: Thomas Leing Date: Tue, 29 Aug 2023 17:48:57 -0700 Subject: [PATCH] Read facematch timeout from server event JSON --- .../predictions/aws/models/FaceTargetMatchingParameters.kt | 3 ++- .../predictions/aws/models/liveness/ChallengeConfig.kt | 3 ++- .../predictions/aws/service/RunFaceLivenessSession.kt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/FaceTargetMatchingParameters.kt b/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/FaceTargetMatchingParameters.kt index 715d15c6af..35110a617b 100644 --- a/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/FaceTargetMatchingParameters.kt +++ b/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/FaceTargetMatchingParameters.kt @@ -22,5 +22,6 @@ data class FaceTargetMatchingParameters internal constructor( val targetIouWidthThreshold: Float, val targetIouHeightThreshold: Float, val faceIouWidthThreshold: Float, - val faceIouHeightThreshold: Float + val faceIouHeightThreshold: Float, + val ovalFitTimeout: Int ) diff --git a/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/liveness/ChallengeConfig.kt b/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/liveness/ChallengeConfig.kt index cd9d93b77a..d33db6a483 100644 --- a/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/liveness/ChallengeConfig.kt +++ b/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/liveness/ChallengeConfig.kt @@ -28,5 +28,6 @@ internal data class ChallengeConfig( @SerialName("OvalIouWidthThreshold") val ovalIouWidthThreshold: Float, @SerialName("OvalIouHeightThreshold") val ovalIouHeightThreshold: Float, @SerialName("FaceIouWidthThreshold") val faceIouWidthThreshold: Float, - @SerialName("FaceIouHeightThreshold") val faceIouHeightThreshold: Float + @SerialName("FaceIouHeightThreshold") val faceIouHeightThreshold: Float, + @SerialName("OvalFitTimeout") val ovalFitTimeout: Int ) diff --git a/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/service/RunFaceLivenessSession.kt b/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/service/RunFaceLivenessSession.kt index 0f53d3e42e..fd0b51c904 100644 --- a/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/service/RunFaceLivenessSession.kt +++ b/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/service/RunFaceLivenessSession.kt @@ -87,7 +87,8 @@ internal class RunFaceLivenessSession( challengeConfig.ovalIouWidthThreshold, challengeConfig.ovalIouHeightThreshold, challengeConfig.faceIouWidthThreshold, - challengeConfig.faceIouHeightThreshold + challengeConfig.faceIouHeightThreshold, + challengeConfig.ovalFitTimeout ) val faceTargetChallenge = FaceTargetChallenge( ovalParameters.width,