problem in training the model using createFisherFaceRecognizer

asked 2015-09-30 12:13:56 -0600

i have been used opencv c++ library to detect faces and save theme to my desk then i make database with the images path and there labels. after call theme back to two vectors of the images and labels and use model1->train(images, labels); then model1->predict(face_resized, predictedLabel, confidence);

the "predictedLabel" come with -1 value thought the training model have the images and labels please any help about what is the problem note:i use "haarcascade_frontalface_default.xml" in CascadeClassifier

thanks Mohamed Sayed

edit retag flag offensive close merge delete

Comments

1

"note:i use "haarcascade_frontalface_default.xml" in CascadeClassifier" - that's only for the dection/cropping phase. it is not responsible for your bad prediction in the recognition phase.

you must have set some 'threshold' value in the create... function, to get a prediction value of -1. what was that ? my blunt guess is, that that value was just too low

berak gravatar imageberak ( 2015-09-30 12:18:24 -0600 )edit