anarchy99
anarchy99

Reputation: 1023

Face Recognition Using Backpropagation Neural Network?

I'm very new in image processing and my first assignment is to make a working program which can recognize faces and their names. Until now, I successfully make a project to detect, crop the detected image, make it to sobel and translate it to array of float. But, I'm very confused how to implement the Backpropagation MLP to learn the image so it can recognize the correct name for the detected face.

It's a great honor for all experts in stackoverflow to give me some examples how to implement the Image array to be learned with the backpropagation.

Upvotes: 1

Views: 1719

Answers (2)

ffriend
ffriend

Reputation: 28552

It is standard machine learning algorithm. You have a number of arrays of floats (instances in ML or observations in statistics terms) and corresponding names (labels, class tags), one per array. This is enough for use in most ML algorithms. Specifically in ANN, elements of your array (i.e. features) are inputs of the network and labels (names) are its outputs.

If you are looking for theoretical description of backpropagation, take a look at Stanford's ml-class lectures (ANN section). If you need ready implementation, read this question.

You haven't specified what are elements of your arrays. If you use just pixels of original image, this should work, but not very well. If you need production level system (though still with the use of ANN), try to extract more high level features (e.g. Haar-like features, that OpenCV uses itself).

Upvotes: 1

moooeeeep
moooeeeep

Reputation: 32542

Have you tried writing your feature vectors to an arff file and to feed them to weka, just to see if your approach might work at all? Weka has a lot of classifiers integrated, including MLP. As I understood so far, I suspect the features and the classifier you have chosen not to work.

To your original question: Have you made any attempts to implement a neural network on your own? If so, where you got stuck? Note, that this is not the place to request a complete working implementation from the audience.

To provide a general answer on a general question: Usually you have nodes in an MLP. Specifically input nodes, output nodes, and hidden nodes. These nodes are strictly organized in layers. The input layer at the bottom, the output layer on the top, hidden layers in between. The nodes are connected in a simple feed-forward fashion (output connections are allowed to the next higher layer only). Then you go and connect each of your float to a single input node and feed the feature vectors to your network. For your backpropagation you need to supply an error signal that you specify for the output nodes. So if you have n names to distinguish, you may use n output nodes (i.e. one for each name). Make them for example return 1 in case of a match and 0 else. You could very well use one output node and let it return n different values for the names. Probably it would even be best to use n completely different perceptrons, i.e. one for each name, to avoid some side-effects (catastrophic interference).

Note, that the output of each node is a number, not a name. Therefore you need to use some sort of thresholds, to get a number-name relation. Also note, that you need a lot of training data to train a large network (i.e. to obey the curse of dimensionality). It would be interesting to know the size of your float array. Indeed, for a complex decision you may need a larger number of hidden nodes or even hidden layers. Further note, that you may need to do a lot of evaluation (i.e. cross validation) to find the optimal configuration (number of layers, number of nodes per layer), or to find even any working configuration.

Good luck, any way!

Upvotes: 0

Related Questions