From 1e5ba161443202e27923bd386009370e7b400275 Mon Sep 17 00:00:00 2001 From: alexabruck <5918060+alexabruck@users.noreply.github.com> Date: Mon, 21 Dec 2020 21:29:57 +0100 Subject: [PATCH] Examples: restrict UI controls for scoreThreshold, minConfidence --- examples/examples-browser/public/js/faceDetectionControls.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/examples-browser/public/js/faceDetectionControls.js b/examples/examples-browser/public/js/faceDetectionControls.js index abe410c7..a1224e9c 100644 --- a/examples/examples-browser/public/js/faceDetectionControls.js +++ b/examples/examples-browser/public/js/faceDetectionControls.js @@ -18,7 +18,7 @@ function getFaceDetectorOptions() { } function onIncreaseMinConfidence() { - minConfidence = Math.min(faceapi.utils.round(minConfidence + 0.1), 1.0) + minConfidence = Math.min(faceapi.utils.round(minConfidence + 0.1), 0.9) $('#minConfidence').val(minConfidence) updateResults() } @@ -43,7 +43,7 @@ function changeInputSize(size) { } function onIncreaseScoreThreshold() { - scoreThreshold = Math.min(faceapi.utils.round(scoreThreshold + 0.1), 1.0) + scoreThreshold = Math.min(faceapi.utils.round(scoreThreshold + 0.1), 0.9) $('#scoreThreshold').val(scoreThreshold) updateResults() }