An image processing project uses Viola-jones technique to detect faces and then use LPB algorithm for recognition.
- Calculating Integral Image
- Calculating Haar like features
- AdaBoost Learning Algorithm
- Cascade Filter
integral images are used to simplify the calculations of haar like features and save time of iterating over all pixels
there are multiple types of haar feature windows, in our implementation, we used 5 types: (2 horizontal, 2 vertical, 3 horizontal, 3 vertical, 2*2 diagonal)
Best Accuracy we got from a model trained by a training set of ( 2000 faces, 1500 non-faces) with 40 classifiers and only 1 layer of cascade classifier
open recognize faces.ipynb and run all cells and just type your photo name and extention in test function
- In the fisrt cell slice the dataset as you want (the pkl file consist of 4000 faces and 7060 non-faces)
- Run the second cell and wait until the model finish the training (it might take a while depending on number of training samples)
- after that the model is stored in file called cvj_weights-..-...-...pkl
- Run the remaining cells and change the image by the one you want
- For realtime run the last cell that opens camera for you