How to recognize face as unknown?

asked 2016-01-04 11:59:48 -0600

Bilityuk gravatar image

updated 2016-01-05 11:46:46 -0600

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..

edit retag flag offensive close merge delete

Comments

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. )

berak gravatar imageberak ( 2016-01-05 11:54:44 -0600 )edit

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.

Bilityuk gravatar imageBilityuk ( 2016-01-05 16:08:02 -0600 )edit
1

atm, it is 0, but hopefully it will get changed back to -1 in a few days.

berak gravatar imageberak ( 2016-01-05 22:16:49 -0600 )edit

Ok Thank you

Bilityuk gravatar imageBilityuk ( 2016-01-07 12:39:23 -0600 )edit