Ask Your Question
0

Facerecognizer

asked 2012-11-21 14:20:34 -0600

updated 2012-11-21 14:30:07 -0600

Hello,

I am using the facerecognizer EigenFaceRecognizer.

And I am using these instructions to get the label prediction:

Mat img = imread("person1/3.jpg", CV_LOAD_IMAGE_GRAYSCALE);
// Some variables for the predicted label and associated confidence (e.g. distance):
int predicted_label = -1;
double predicted_confidence = 0.0;
// Get the prediction and associated confidence from the model
model->predict(img, predicted_label, predicted_confidence)

In the predicted_label, I got the label of the person the facerecognizer thinks is the most nearest to the one in the test image.

My question is: Is there any way to get the 5 closest labels for the image to identify???

  1. label "1" predicted_confidence = 90 %
  2. Label "1" predicted_confidence = 85 %
  3. Label "4" predicted_confidence = 80 %
  4. Label "20" predicted_confidence = 70 %
  5. Label "7" predicted_confidence = 65 %

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-11-21 14:32:24 -0600

Not yet, but I think about adding such a functionality. If it is urgent, you could extend the existing code like this:

You would only need to order the result, in order to find the 5 nearest neighbors.

edit flag offensive delete link more

Comments

this link is not giving the required result....any other way out ?

Ishmeet gravatar imageIshmeet ( 2014-06-17 08:49:16 -0600 )edit

Question Tools

Stats

Asked: 2012-11-21 14:20:34 -0600

Seen: 877 times

Last updated: Nov 21 '12