Skip to content

Commit 941ea90

Browse files
authored
chore: update liveness service model with oval fit timeout (#3147)
* chore: update liveness oval service model with fit timeout * chore: update challenge config fit timeout data type
1 parent ed25407 commit 941ea90

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Model/DTOMapping.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ func ovalChallenge(from event: ServerSessionInformationEvent) -> FaceLivenessSes
3131
heightWidthRatio: challengeConfig.ovalHeightWidthRatio,
3232
iouThreshold: challengeConfig.ovalIouThreshold,
3333
iouWidthThreshold: challengeConfig.ovalIouWidthThreshold,
34-
iouHeightThreshold: challengeConfig.ovalIouHeightThreshold
34+
iouHeightThreshold: challengeConfig.ovalIouHeightThreshold,
35+
ovalFitTimeout: challengeConfig.ovalFitTimeout
3536
)
3637
)
3738
}

AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Model/FaceLivenessSession+OvalMatchChallenge.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,22 @@ extension FaceLivenessSession.OvalMatchChallenge {
5555
public let iouThreshold: Double
5656
public let iouWidthThreshold: Double
5757
public let iouHeightThreshold: Double
58+
public let ovalFitTimeout: Int
5859

5960
public init(
6061
boundingBox: FaceLivenessSession.BoundingBox,
6162
heightWidthRatio: Double,
6263
iouThreshold: Double,
6364
iouWidthThreshold: Double,
64-
iouHeightThreshold: Double
65+
iouHeightThreshold: Double,
66+
ovalFitTimeout: Int
6567
) {
6668
self.boundingBox = boundingBox
6769
self.heightWidthRatio = heightWidthRatio
6870
self.iouThreshold = iouThreshold
6971
self.iouWidthThreshold = iouWidthThreshold
7072
self.iouHeightThreshold = iouHeightThreshold
73+
self.ovalFitTimeout = ovalFitTimeout
7174
}
7275
}
7376
}

AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/ServiceModel/ChallengeConfig.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct ChallengeConfig: Codable {
1818
let ovalIouHeightThreshold: Double
1919
let ovalIouThreshold: Double
2020
let ovalIouWidthThreshold: Double
21+
let ovalFitTimeout: Int
2122

2223
enum CodingKeys: String, CodingKey {
2324
case blazeFaceDetectionThreshold = "BlazeFaceDetectionThreshold"
@@ -30,5 +31,6 @@ struct ChallengeConfig: Codable {
3031
case ovalIouHeightThreshold = "OvalIouHeightThreshold"
3132
case ovalIouThreshold = "OvalIouThreshold"
3233
case ovalIouWidthThreshold = "OvalIouWidthThreshold"
34+
case ovalFitTimeout = "OvalFitTimeout"
3335
}
3436
}

0 commit comments

Comments
 (0)