The rule is simple more the images in training more the accuracy in the testing. In the training process, we give more than 50 images to the recognizer so it can learn the different facets of the same person. For face detection, we use haarcascade_frontal_face.xml file to train haar cascade classifier.
More than 50 images of each person. Make different sub-directories with the label name for each person. Specify the name of the person with directory label in your program.
- LBPH Face Recognizer
- Haar cascade classifier
Must have Python3 installed. Must have OpenCV module installed. Must have Numpy module installed. Must have OS module installed.
- First clone the project
- Make your training and testing data.
- Now first run the faceRecognition.py then run tester.py
- After training, you can test your model from testing data.
- While running the program for the second or third time, we can load the trainingData.yml(results of previous training) as training data.
Sharad Kumar Tiwari