OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 10 Apr 2019 03:44:04 -0500Use of LBPHFaceRecognizer (python)http://answers.opencv.org/question/211394/use-of-lbphfacerecognizer-python/ I am testing the python version of LBPHFaceRecognizer and results seems not bad, but I noted something strange.
Making the prediction, let's say:
label= face_recognizer.predict(gray)
print('prediction', label)
I see that `label` is a tuple with 2 values, the first is the prediction, the second I guess is the probability. Now when probability is low the prediction is fine, while when it is high, I have false positive.
Maybe this value is not the probability, so the question is, what is its real meaning ?
ThanksWed, 10 Apr 2019 02:54:13 -0500http://answers.opencv.org/question/211394/use-of-lbphfacerecognizer-python/Answer by berak for <p>I am testing the python version of LBPHFaceRecognizer and results seems not bad, but I noted something strange.
Making the prediction, let's say:</p>
<pre><code>label= face_recognizer.predict(gray)
print('prediction', label)
</code></pre>
<p>I see that <code>label</code> is a tuple with 2 values, the first is the prediction, the second I guess is the probability. Now when probability is low the prediction is fine, while when it is high, I have false positive.</p>
<p>Maybe this value is not the probability, so the question is, what is its real meaning ?
Thanks</p>
http://answers.opencv.org/question/211394/use-of-lbphfacerecognizer-python/?answer=211395#post-id-211395it's not the probability, but the **distance** (chi_sqr is used here) to the closest neighbour in the train db, so the "inverse" of a probability.Wed, 10 Apr 2019 03:13:36 -0500http://answers.opencv.org/question/211394/use-of-lbphfacerecognizer-python/?answer=211395#post-id-211395Comment by procton for <p>it's not the probability, but the <strong>distance</strong> (chi_sqr is used here) to the closest neighbour in the train db, so the "inverse" of a probability.</p>
http://answers.opencv.org/question/211394/use-of-lbphfacerecognizer-python/?comment=211397#post-id-211397Thank you !Wed, 10 Apr 2019 03:44:04 -0500http://answers.opencv.org/question/211394/use-of-lbphfacerecognizer-python/?comment=211397#post-id-211397