# How to do face recognition without using any kind of Neural Networks like CNN?

Is/was there any way to perform face recognition, instead of using the Convolution Neural Network which uses the technique of mapping(encoding) the face using 128-D vector and then using classifier (like knn/SVM) on it?

Before the invention of the CNN approach, what did we use for face recognition?

From a comment by @rahulreddy:

Custom object detection is possible using Voila-Jones Haar cascade or using the histogram of oriented gradients (HOG) technique or now by CNN.

As it stands, NN-based approaches are the current state of the art. It outperforms the method described below, but in the spirit of answering the question, here it goes...

The trick for not using CNNs is to find a good representation of images with faces on them. CNNs are great because they learn good features. If you don't want to use it, you can use CNNs, you can use Eingenfaces as your features.

The main assumption is that most face images lie on a low-dimensional subspace determined by the first k (k<d) directions of maximum variance.

You can Use PCA to determine the vectors or “eigenfaces” u1, ... ,uk that span that subspace.

Then you can represent all face images in the dataset as linear combinations of eigenfaces.

For example, given these images for training:

You can learn the following eigenfaces:

These eigenfaces highlight different features in a person's face. If you average all of them you find a mean face, which would be the most common features among all people in your training set.

Then, this face:

Can be reconstructed by a linear combination of the mean face and some other eigenfaces:

Now, the weights of each component can be used as features for your classification algorithm. Which at this point can be anything, like KNN or SVM.

• Probably worth mentioning that the performance of more recent NN-based approaches is better than this alternative. Aug 11, 2018 at 9:14
• @NeilSlater, duly noted. I edited this at the beginning of the answer. Aug 11, 2018 at 9:20