A major insight into how a neural network can learn to classify something as complex as image data given just examples and correct answers came to me while studying the work of Professor Kunihiko Fukushima on the neocognitrion in the 1980's. Instead of just showing his network a bunch of images, and using back-propagation to let it figure things on it's own, he took a different approach and trained his network layer by layer, and even node by node. He analyzed the performance and operation of each individual node of the network and intentionally modified those parts to make them respond in intended ways.
For instance, he knew he wanted the network to be able to recognize lines, so he trained specific layers and nodes to recognize three pixel horizontal lines, 3 pixel vertical lines and specific variations of diagonal lines at all angles. By doing this, he knew exactly which parts of the network could be counted on to fire when the desired patterns existed. Then, since each layer is highly connected, the entire neocognitron as a whole could identify each of the composite parts present in the image no matter where they physically existed. So when a specific line segment existed somewhere in the image, there would always be a specific node that would fire.
Keeping this picture ever present, consider linear regression which is simply finding a formula ( or a line) via sum of squared error, that passes most closely through your data, that's easy enough to understand. To find curved "lines" we can do the same sum of products calculation, except now we add a few parameters of x^2 or x^3 or even higher order polynomials. Now you have a logistic regression classifier. This classifier can find relationships that are not linear in nature. In fact logistic regression can express relationships that are arbitrarily complex, but you still need to manually choose the correct number of power features to do a good job at predicting the data.
One way to think of the neural network is to consider the last layer as a logistic regression classifier, and then the hidden layers can be thought of as automatic "feature selectors". This eliminates the work of manually choosing the correct number of, and power of, the input features. Thus, the NN becomes an automatic power feature selector and can find any linear or non-linear relationship or serve as a classifier of arbitrarily complex sets** (this, assumes only, that there are enough hidden layers and connections to represent the complexity of the model it needs to learn). In the end, a well functioning NN is expected to learn not just "the relationship" between the input and outputs, but instead we strive for an abstraction or a model that generalizes well.
As a rule of thumb, the neural network can not learn anything a reasonably intelligent human could not theoretically learn given enough time from the same data, however,
- it may be able to learn somethings no one has figured out yet
- for large problems a bank of computers processing neural networks can find really good solutions much faster than a team of people (at a much lower cost)
- once trained NNs will produce consitsent results with the inputs they've been trained on and should generalize well if tweaked properly
- NN's never get bored or distracted
When people train a model using a dataset, they split the data into several parts and do cross-validation: http://en.wikipedia.org/wiki/Cross-validation_(statistics)
If you scientifically want to find out the exact test performance of the model, you see on which portion of the data it is trained on, and test on the remaining.
Best Answer
First you have sample images data that should be given as a training to your neural network.
Then for your input images try to d-sample them in some fixed small array size and then give d-sampled image as input to your neural network.
Learn from the example of OCR Click here find the code here
In above image you can see it try to match d-sampled image array with stored character images.
For your definition make small d-sampled images for objects and then give them as training data for example, plane image, car image.
Increase the size of the matrix for d-sampling. Because in my program i was just d-sampling characters. You will need bigger matrix to properly store objects.
You need some algorithm to d-sample properly and try to convert image in black and white. and also try algorithm to detect and crop object from an image to d-sampled one.
Try learning encog framework image processing examples with various neural networks.