Comparing 3 Face Recognition Approaches in Python: Eigenfaces (PCA), LBPH, and DeepFace A developer implemented and compared three Python face recognition approaches — Eigenfaces (PCA), LBPH, and DeepFace — on a small sample dataset, testing each against a simulated 50% brightness reduction to gauge robustness to illumination changes. The writeup includes runnable code, notes that standard opencv-python lacks the cv2.face module required for Eigenfaces and LBPH (fixed by installing opencv-contrib-python), and offers a Google Colab variant that pulls real faces from Scikit-Learn's LFW dataset. Face recognition has evolved significantly—from classical statistical methods like Eigenfaces PCA and texture-based descriptors like LBPH Local Binary Pattern Histograms to modern deep learning frameworks like DeepFace . In this post, we will implement and compare all three approaches on a small dataset in Python, test how they hold up against illumination changes e.g., low lighting , and look at how to run the code effortlessly without running into environment issues. Eigenfaces PCA-based Representation LBPH Local Binary Pattern Histograms DeepFace Deep Learning-based Recognition ModuleNotFoundError: No module named 'cv2' A common mistake when running this code is executing it inside lightweight online compilers like Programiz or OnlineGDB , which results in: Traceback most recent call last : File "/box/main.py", line 1, in