This is an implementation of Linear Regression Classification (LRC) algorithm from the article “Linear Regression for Face Recognition” by Imran Naseem, Roberto Togneri, and Mohammed Bennamoun.
The proposed modular LRC approach segments a given occluded image and reaches individual decisions for each block. These intermediate decisions are combined using a novel Distance-based Evidence Fusion (DEF) algorithm to reach the final decision. The proposed DEF algorithm uses the distance metrics of the intermediate decisions to decide about the “goodness” of a partition.
- hat_beta_i is calculated using the least-squares estimation
- hat_y_i is than calculated for each class model (each subject folder is an individual class)
- Regex pattern is used to load Train and Test sets
- Gray scale images are downscaled to certain output shape
- The model is trained to calculate hat_y_i for each class
- The model is than validated i.e. each test image distance is calculated against each hat_y_i and decision is made in favor of the class with the minimum distance
- Finally, the model summary (Accuracy and the Test images predicted) is displayed onto the console
The LRC algorithm works really well on faces without any rotation and under nominal lightning conditions (i.e. accuracy above 90%). But in case of different face rotations, luminance and elevations the algorithm classification accuracy is above average compared to the state-of-the-art techniques where they lag behind. Even with severe face variations, the Modular LRC algorithm yields the best reported results in the literature.
AT&T Database (https://www.kaggle.com/kasikrit/att-database-of-faces):
- The first 5 and 6th image of 9 individuals were used to train the model
- The remaining 3 were used to validate the model
- 25 images were predicted out of 27 achieving an accuracy of 92.59%
The LRC approach yields high recognition accuracies without requiring any preprocessing steps of face localization and/or normalization.. The simple architecture of the approach makes it computational efficient, therefore suggesting a strong candidacy for realistic video-based face recognition applications.
You can access the complete algorithm implementation from the following GitHub repository.
I. Naseem, R. Togneri and M. Bennamoun, “Linear Regression for Face Recognition,” in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, no. 11, pp. 2106-2112, Nov. 2010, doi: 10.1109/TPAMI.2010.128