Skip to content

Commit

Permalink
feat(predictions): Add more backend-retrieved attributes to FaceTarge…
Browse files Browse the repository at this point in the history
…tMatchingParams
  • Loading branch information
vincetran committed Jul 30, 2024
1 parent ef3180f commit b280ab7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ data class FaceTargetMatchingParameters internal constructor(
val targetIouThreshold: Float,
val targetIouWidthThreshold: Float,
val targetIouHeightThreshold: Float,
val targetHeightWidthRatio: Float,
val faceDetectionThreshold: Float,
val faceIouWidthThreshold: Float,
val faceIouHeightThreshold: Float,
val faceDistanceThreshold: Float,
val faceDistanceThresholdMin: Float,
val ovalFitTimeout: Int
)
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,16 @@ internal class RunFaceLivenessSession(
challengeConfig: ChallengeConfig
): FaceTargetChallenge {
val faceTargetMatching = FaceTargetMatchingParameters(
challengeConfig.ovalIouThreshold,
challengeConfig.ovalIouWidthThreshold,
challengeConfig.ovalIouHeightThreshold,
challengeConfig.faceIouWidthThreshold,
challengeConfig.faceIouHeightThreshold,
challengeConfig.ovalFitTimeout
targetIouThreshold = challengeConfig.ovalIouThreshold,
targetIouWidthThreshold = challengeConfig.ovalIouWidthThreshold,
targetIouHeightThreshold = challengeConfig.ovalIouHeightThreshold,
targetHeightWidthRatio = challengeConfig.ovalHeightWidthRatio,
faceDetectionThreshold = challengeConfig.blazeFaceDetectionThreshold,
faceIouWidthThreshold = challengeConfig.faceIouWidthThreshold,
faceIouHeightThreshold = challengeConfig.faceIouHeightThreshold,
faceDistanceThreshold = challengeConfig.faceDistanceThreshold,
faceDistanceThresholdMin = challengeConfig.faceDistanceThresholdMin,
ovalFitTimeout = challengeConfig.ovalFitTimeout
)
return FaceTargetChallenge(
ovalParameters.width,
Expand Down

0 comments on commit b280ab7

Please sign in to comment.