In this project I have written 3 python scripts. First script collects face data using OpenCV that extracts image features. Second script identifies faces based on recorded data. Here, I have implemented my own K-nearest-neighbor algorithm to predict or identify faces present in front of webcam. Third script is for validation and evaluation of face data.
Note : Your Laptop/Desktop must have webcam in order to record and identify faces.
For validation and evaluation purpose, I have done following steps :
- Split the data into a training and testing set using train_test_split.
- Apply PCA that transforms 7500 features into 400.
- Apply feature selection due to high dimensional input.
- Train a SVM classification model
- Calculate accuracy on test set.
The accuracy for SVM comes out to be 98.89% with a f1 score of 0.99
- It can be used as a attendance software that recognizes faces of the employees working in a company.
- Instead of using passcodes, mobile phones will be accessed via owners’ facial features.