1
$\begingroup$

I'm interested to find out how to implement NMF for facial recognition. I understand that the NMF works by taking V, which is a matrix of face images (n resolution x m persons), and factorize V = WH, where we get r basis vectors. I presume that this step is done using the training set. But I don't know how to proceed from here.

With PCA, after building the eigenfaces from the training set, we project the test image onto the face-space, then classify the image by comparing the weight coefficients between the test image and training images. But what about NMF? Do I use the basis vectors? What do I do with them?

$\endgroup$

3 Answers 3

2
$\begingroup$

One major issue with this approach is that if you represent your image as a vector of pixel intensities, you have zero translation-invariance. Two pictures that are exactly the same but shifted over 10 pixels will likely look like dissimilar vectors. That is why people try to use other methods that handle translation, like convolutional neural networks or SIFT features.

$\endgroup$
1
  • $\begingroup$ Thanks for your suggestion. However, as I'm learning about NMF, that's the algorithm I have to implement. $\endgroup$
    – Rayne
    Nov 4, 2015 at 17:08
1
$\begingroup$

NMF is not a classifier -- it is a transformation (or, more specifically, a factorization). We have $V \sim W H$, where (depending on your perspective) each column of $H$ corresponds to some "proto-image", and each row of $W$ corresponds to the amount that the corresponding row of $V$ is made up of each image.

One approach that I might suggest (and this is not the only approach) is to take your lower-dimensional data $W$ and use some other classification method on top of that. From this perspective there is no need for the basis vectors in $H$; you operate only with $W$. So this is like seeing NMF as a preprocessing dimensionality reduction step before some out-of-the-box classifier. An advantage here is that the rank of your decomposition is often much lower than your original dimensionality, which can (among other things) reduce the necessary training time.

$\endgroup$
0
$\begingroup$

NMF and PCA are very similar such that both are factoring a matrix M into WH. However, with NMF, you have the constraint that M, W and H are all nonnegative. In PCA, you can think of W and H as coefficients and eigenfaces then proceed to use the coefficients for facial recognition. In NMF, W and H are coefficients and face profiles (that is, parts of the face). You then proceed to use the coefficients for your facial recognition in the same manner as using PCA.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.