confidence value in LBPH
Ex:
id,confidence=recognizer.predict(gray[y:y+h,x:x+w])
confidence=100*(1-(confidence)/300))
what is this calculation i did'nt understand this formula to get confidence value maximum
Ex:
id,confidence=recognizer.predict(gray[y:y+h,x:x+w])
confidence=100*(1-(confidence)/300))
what is this calculation i did'nt understand this formula to get confidence value maximum
opencv's FaceRecognizer classes return the distance from your img to the closest item in the database, not a confidence (it's the opposite), that's a misnomer in the code already.
the code you're trying with attempts to "normalize" the distance to [0..1] by dividing by some large value (300 here, but unfortunately, this heavily depends on your data !!!), then tries to invert it (1-x) to get a "confidence", and then scales to [0..100], to get something in %.
please note, that all of it is "heuristic", there's no silver bullet or exact formula for this (the distances are not even "linear") so play with it on your own data, but use "with a grain of salt" ;)
Asked: 2020-02-23 07:01:37 -0600
Seen: 1,003 times
Last updated: Feb 23 '20
confidence value and threshold in opencv
createLBPHFaceRecognizer() radius parameter [closed]
Confidence in Face Recognition
Online Learning and Confidence with cv::FaceRecognizer
FaceRecognizer LBPH update function can't be called
Which confidence level and parameters for face recognizer?
Multi Block - Local Binary Patterns
Classification methods used in OpenCV
I want to implement a FaceRecognizer which just judge the two faces are the same person or not