Kernel: Python 3 (Ubuntu Linux)
Eigenfaces
We used the faces94
dataset for this implementation: https://cswww.essex.ac.uk/mv/allfaces/faces94.zip
In [1]:
Enrollment Process
In [2]:
In [3]:
For each set of faces, we take the first one and add it to the training set.
In [4]:
In [5]:
In [6]:
In [7]:
In [8]:
We compute for the eigenvalues and eigenvectors using singular value decomposition.
In [9]:
In [21]:
In [22]:
(39, 39)
This is what the first eigenface looks like.
In [10]:
<matplotlib.image.AxesImage at 0x7f2bd78e5c18>
Face Recognition
In [11]:
Projection
In [12]:
In [13]:
In [14]:
Distance computation
In [15]:
Match finding
In [16]:
In [17]:
spacl
dist=6604.41185875018
Visualization of the face space
We plot the projections of each training image onto the face space spanned by the first two eigenfaces. The projected input image is represented in the plot as a square.
In [18]:
In [19]:
In [20]:
<matplotlib.legend.Legend at 0x7f2bd77a8dd8>
In [0]: