Ask Your Question
1

confidence of predict model (face recognizer) > 1

asked 2013-04-25 04:12:12 -0500

Alexis gravatar image

Hi, I am working on face Recognition (C++ code) in Android app.

In first, I use first findfaces() method to detect, resize each image of my person. It works well.

Then I want to recognize my face (via createEigenFaceRecognizer), I refer to sample images previously created, the image's path and the haarcascade_frontalface_alt.xml.The model is filled. I train the model. But as soon as model->predict(face_resized,prediction,predicted_confidence); is called, it returne me a confidence > 1. It is often between 1600 and 10000 depending on person. I do not understand why.

Yet, I have constructed my algorithm according to tutorial on openCV.

Can you help me ? I can give you my code.

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-25 04:19:51 -0500

Actually what you do is creating a map of descriptors for each face you feed to the algorithm. Successively for each data reference a distance measurement is generated between the input image (new test image) and the existing database.

Distance = 0 means an exact match. Large values mean that there is almost no match between both.

However, even if two images of the exact person are matched, different lighting conditions can actually create a large distance. From application to application you have to define which distance threshold to use for accepting a match.

edit flag offensive delete link more

Comments

Hi, Thanks for your response, This reinforces my idea about images context (lighting, head size). But, what kind of distance measurment does createEigenFaceRecognizer calculate ? How to imporve it ? By taking images in same distance (between me and camera) by example ? My database of images have same sizes. But for my new image, I am not sure. Is it important to adjust this mage ?

Alexis gravatar imageAlexis ( 2013-04-25 06:09:14 -0500 )edit
1

Basically there are several steps you need to perform

  • You need to make sure that the image you are using as new image, has indeed the same size as the database images.
  • Distance measure is euclidean distance between points that represent the face in the eigenspace dimensions. Each person is represented as a combination of the different eigenfaces (which each create a dimension)
  • In order to get a robust recognition system, you need to include as much variance as possible, different lightning conditions, different hairstyles, glasses or not, ... the more examples it can match towards, the better.

Getting to a final and robust recognition product, requires dedication and adapting of parameters until you reach a satisfying result.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-25 06:16:35 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-04-25 04:12:12 -0500

Seen: 5,863 times

Last updated: Apr 25 '13