Skip to content

Commit e5b6db1

Browse files
authored
feat(predictions): Add more backend-retrieved attributes to FaceTargetMatchingParams (#2883)
1 parent ef3180f commit e5b6db1

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

aws-predictions/src/main/java/com/amplifyframework/predictions/aws/models/FaceTargetMatchingParameters.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ data class FaceTargetMatchingParameters internal constructor(
2121
val targetIouThreshold: Float,
2222
val targetIouWidthThreshold: Float,
2323
val targetIouHeightThreshold: Float,
24+
val targetHeightWidthRatio: Float,
25+
val faceDetectionThreshold: Float,
2426
val faceIouWidthThreshold: Float,
2527
val faceIouHeightThreshold: Float,
28+
val faceDistanceThreshold: Float,
29+
val faceDistanceThresholdMin: Float,
2630
val ovalFitTimeout: Int
2731
)

aws-predictions/src/main/java/com/amplifyframework/predictions/aws/service/RunFaceLivenessSession.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,16 @@ internal class RunFaceLivenessSession(
132132
challengeConfig: ChallengeConfig
133133
): FaceTargetChallenge {
134134
val faceTargetMatching = FaceTargetMatchingParameters(
135-
challengeConfig.ovalIouThreshold,
136-
challengeConfig.ovalIouWidthThreshold,
137-
challengeConfig.ovalIouHeightThreshold,
138-
challengeConfig.faceIouWidthThreshold,
139-
challengeConfig.faceIouHeightThreshold,
140-
challengeConfig.ovalFitTimeout
135+
targetIouThreshold = challengeConfig.ovalIouThreshold,
136+
targetIouWidthThreshold = challengeConfig.ovalIouWidthThreshold,
137+
targetIouHeightThreshold = challengeConfig.ovalIouHeightThreshold,
138+
targetHeightWidthRatio = challengeConfig.ovalHeightWidthRatio,
139+
faceDetectionThreshold = challengeConfig.blazeFaceDetectionThreshold,
140+
faceIouWidthThreshold = challengeConfig.faceIouWidthThreshold,
141+
faceIouHeightThreshold = challengeConfig.faceIouHeightThreshold,
142+
faceDistanceThreshold = challengeConfig.faceDistanceThreshold,
143+
faceDistanceThresholdMin = challengeConfig.faceDistanceThresholdMin,
144+
ovalFitTimeout = challengeConfig.ovalFitTimeout
141145
)
142146
return FaceTargetChallenge(
143147
ovalParameters.width,

0 commit comments

Comments
 (0)