How to recognize face as unknown?
Hi, i am using this official tutorial: http://docs.opencv.org/3.0-beta/modul...
I trained the fisherRecognizer for 2 faces and it recognizes them well. But how to recognize the unknown face wich is not in the faces database? predict method never returns -1. Can you help me please?
Can anybody advice me how to define face as unknown with any kind of algorithm (fisher, eighen, LBH). I tried all of them, but never achieved the result that algorithm recognize a new face as unknown. It recognizes the new face as like as this face already present in database..
you can set a threshold value in the createXXXRecognizer method. if the distance from your test img to the closest item in the db turns out to be larger than this, it will return -1 for the label, and DBL_MAX for the distance/confidence
( if you're using opencv3, also have a look at this post , current behaviour seems broken wrt. )
Thank you very much for your comment!!! I already read about the threshold, but still don't understand what it means and how it really works... It will be very much appreciated if you lit me a little light on it, or share a link where i can read more about this... Can you advice what is the best num_components and threshold values for EigenFaceRecognizer, FisherFaceRecognizer, LBPHFaceRecognizer ??? I am going to use recognition from 2-3 meters...
I took a look on the link about the broken wrt... What is the 'not found' label value for now -1 or 0? I am using 3.1 opencv for windows.
atm, it is 0, but hopefully it will get changed back to -1 in a few days.
Ok Thank you