Skip to content

Commit 37f4a19

Browse files
committed
Fixed score display on face comparison page
1 parent 3783ce3 commit 37f4a19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/appliedrec/credentials/app/FaceComparisonActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class FaceComparisonActivity : AppCompatActivity() {
5050
)
5151
val threshold = 4f
5252
if (score >= threshold) {
53-
val probability = NormalDistribution().cumulativeProbability(score * 100.0)
53+
val probability = NormalDistribution().cumulativeProbability(score.toDouble()) * 100.0
5454
viewBinding.scoreText.text = String.format("The face matching score %.02f indicates a likelihood of %.0f%% that the person on the ID card is the same person as the one in the selfie. We recommend a threshold of %.02f for a positive identification when comparing faces from identity cards.", score, probability, threshold)
5555
} else {
5656
viewBinding.scoreText.text = String.format("The face matching score %.02f indicates that the person on the ID card is likely NOT the same person as the one in the selfie. We recommend a threshold of %.02f for a positive identification when comparing faces from identity cards.", score, threshold)

0 commit comments

Comments
 (0)