Ask Your Question

Revision history [back]

Facerecognizer

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.

Facerecognizer

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)

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.