Linear Regression for Face Recognition

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.

Linear Regression for Face Recognition

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.

Algorithm Explanation

Linear Regression for Face Recognition
  • 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)

Linear Regression for Face Recognition

Algorithm Implementation

Linear Regression for Face Recognition
  • 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

Linear Regression for Face Recognition
  • Finally, the model summary (Accuracy and the Test images predicted) is displayed onto the console

Simulation Result

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%

Linear Regression for Face Recognition

Conclusion

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.

References:

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

OUR LATEST BLOGS

Related Blogs

The Definitive Guide to Embedding AI Agents in ERP and CRM
ai agent

The Definitive Guide to Embedding AI Agents in ERP and CRM

AI agents in ERP and CRM are intelligent software systems embedded within enterprise platforms to automate tasks, interpret business data, support decision-making, and execute workflow actions across functions such as sales, customer service, finance, operations, and planning.

Top 8 Sports Video Analysis Software Solutions for 2026 Coaches
AI in sports

Top 8 Sports Video Analysis Software Solutions for 2026 Coaches

Sports video analysis software is a digital coaching tool that helps teams capture, tag, review, annotate, and share game or training footage to evaluate performance, improve tactics, refine technique, and support faster, evidence-based coaching decisions.

AI Projects Failure Rate
AI Enablement

What Percentage of AI Projects Fail in 2026?

AI project failure rates in 2026 remain high across industries. This article breaks down updated statistics, common causes of failure, and enterprise challenges, while offering practical insights to help businesses increase AI adoption success and ROI.