Attendance_System
An image processing project uses Viola-jones technique to detect faces and then use LPB algorithm for recognition.
Face Detection Using Viola-Jones Algorithm
steps to implement:
- 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)
Preprocessing Images
before preprocessing
- image is cropped centered and resized to fit our window size(19,19)
- a gamma correction is applied to the image to enhance the detection
π
Results 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
π₯
results on image with multiple faces
π€
results on realtime with only one face
How to use?
open ViolaJones/main.ipynb and run all cells
π
Recognition can detect most of input images
π₯
results on image
How to use?
make new dataset in gray images and name it with your name
save your input photo in images folder
open recognize faces.ipynb and run all cells and just type your photo name and extention in test function
For Training
- 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
For Testing
- Run the remaining cells and change the image by the one you want
- For realtime run the last cell that opens camera for you