Eigenfaces
Using SVD on a few thousand face photographs to rebuild each face from its first 100 eigenfaces.
2022 · CSCI 2033 Elementary Computational Linear Algebra, University of Minnesota · created with Nayan, Daniel and Cameron
A linear algebra course project that uses principal component analysis to represent faces. Every face in the dataset is flattened into a column vector. The eigenvectors of the sample covariance of the centered matrix are the eigenfaces, the principal components of "face". Each face then becomes a short linear combination of them. The work is in NumPy, in a Colab notebook. Reconstructing every face in the dataset from just its first 100 eigenfaces accounted for 99.4% of it on average, a mean-squared error of 0.6% against the original.
Media