Question

How do you train Neural Network for pattern recognition? For example a face recognition in a picture how would you define the output neurons? (eg. how to detect where is the face exactly, rather than just saying that there is a face in camera). Also, how about detecting multiple faces and different size of faces?

If anyone could give me a pointer it would be really great

Cheers!

Was it helpful?

Solution

Generally speaking I would split the problem into multiple stages e.g.

1 - Is there a face in the picture?

2 - Where is the face in the picture?

3 - Is the face in the picture one that the NN (Neural network) recognises?

In each instance I would suggest you build a separate NN and train it to answer the questions posed.

As for the structure of the NN, that's a bit trickier to answer as it depends on your input data and desired output. For example if you had a 100x100 px image then I suppose its feasible to have 10,000 inputs. You might want to consider doing some preprocessing before hand to say detect ovals that way you could look and see if there are a number of ovals in a predictable outline (1 for the face, 2 for the eyes, and one for the mouth possibly). If you are preprocessing the data then you might have inputs for each oval.

Now for the output... for question one you could just have one output to say how sure the NN is that there is a face in the input data i.e a valuer of 0.0 (defiantly no face) --> 1.0 (defiantly a face). This way you can move onto stages 2 and 3.

I might say at this point that this is a non-trivial problem and you might be better to have a look at some of the frameworks available e.g. OpenCV

Now for the training part, you need to have a stockpile of images available to train the NN. There are a number of ways in which you could train the NN. One potential solution is to use a technique called back propagation 1, 2. In general terms, you use the NN on an image and compare it to a predetermined output. If its wrong tweak the NN to produce the desired output and repeat.

If you want a good book on AI, then I would highly recommend Artificial Intelligence: A Modern Approach by Russell and Norvig. Im sure that there are more appropriate Computer Vision textbooks, but the Russell & Norvig book is an excellent starter.

OTHER TIPS

Dear GantengX, you should prepare your self to the fact that the answer is so large, complex and hard to understand. There is so many approaches to pattern and face recognition. And implementing real-life face recognition system is a huge array of work that one person can never handle. Prepare your self for at least 10 years of life behind books on mathematic and artificial intelligence, I'm not talking about hiring 5 highly payed developers in the end who will understand what you want them to do. And maybe you will end up having your own face recognition system. There are also dozen of other issues that will jump out during the process. So be ready for a life full of stresses and problems.

I'm sorry for telling obvious things, but your question was not specific, complete answer would touch many different scientific spheres and will result as a book with over 1k pages. Regarding your question (the short answer).

There are several principal parts that each face recognition app consists of:

  1. Artificial intelligence algorithm
  2. Optimization algorithm (for AI optimization)
  3. Different filtration algorithms
  4. Effective data set development

Items 1. and 2. are the central part of each system, they do the actual work. Any other preprocessing just makes the input data less complex, making it easier to do a decision for your AI. Don't start 3. and 4. until you will have your first results.

P.S. Using existing solutions is more cost-effective, but if you are studying things then don't loose time like I did, and start your dissertation right away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top