Ask Your Question

Revision history [back]

How to improve identification confidence using LBPHFaceRecognizer

Hi, I am researching LBPHFaceRecognizer with the aim of implementing a face recognition system. However, I am only attaining confidence levels of no more than 80% and usually well below 50%. I have flipped the confidence returned from ' predictedId, predictedId, doubtLevel = recognizer.predict(imageNp) so that 100% is high confidence and 0% is low confidence.

Using Python I prepared the training dataset by:

Converting image to gray scale:-

pilImage = Image.open(imagePath).convert('L')         
imageNp = np.array(pilImage,'uint8')

Resizing the image:-

imageNp = cv2.resize(imageNp, (200, 200), interpolation=cv2.INTER_AREA)

Equalising the image Histogram:-

equalized_image = cv2.equalizeHist(imageNp)

Normalising the lighting in the Image:-

normalised_image = np.zeros((300, 300))
imageNp = cv2.normalize(imageNp, normalised_image, 0, 255, cv2.NORM_MINMAX)

and rotating the image so that eyes are horizontal, although the method I am using does not always do this completely for all images.

I am using images from vgg2Faces, (http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/) in this instance Cybil_Shepherd and Anna_Kalata. Cybil_Shepherd has 160 images and Anna_Kalata, 442 images. I have removed images with more than 1 face and that are clearly not the stated person.

Once trained, I am attempting to recognize Anna_Kalata or Cybil_Shepherd using images from the original dataset but not included in the training set. All images are pre-processed in exactly the same way as those in the training set.

My question is two-fold: What confidence levels can I reasonably be expecting from LBPHFaceRecognizer? and How can Improve these confidence levels?

Thanks in advance for your help.