Handwritten digit recognition using Neural networks; How to configure for 2-D input?

15 views (last 30 days)
My objective is to train a NN to recognize handwritten digits (Black/White bit pattern). The neural net seems to expect each input (training/test instance) as a column in a matrix/cell.
I do not wish for a full connection between the input and the immediate NN layer. I want to specify a more localized mapping between the input bits and the hidden neurons. In essence a mapping best descried if both the layer and the input can treated as 2 dimensional.
When my training instances are specified as columns, they loose a part of adjacency information.
How can I feed the NN an 2-D input?
I've crawled through much of the tutorial style documentation and couldn't find much that helped. Being rather new to matlab, it's a bit overwhelming. Links to relevant documentation are also welcome.
Also, what more information would be useful to answer this question?

Accepted Answer

Jonathan LeSage
Jonathan LeSage on 15 Oct 2013
Edited: Jonathan LeSage on 15 Oct 2013
Specifying an image as a column vector does not eliminate the adjacency information. As the column of pixels repeats at a regular interval, the patterns are still detectable when you train your neural network.
Here are some simple examples of classification which you could follow to get more familiar with the MATLAB environment:
MATLAB can only accept matrix training data when you are training a nonlinear-autoregressive (NAR) network. The third dimension in the cell array is the time. For more information, you can consult the documentation for the train function:
Hope this helps!
  3 Comments
Jinal
Jinal on 3 Nov 2013
Greg, could you tell more about how could I use matrix training data? That would be very helpful. Cheers
Greg Heath
Greg Heath on 3 Nov 2013
Any property you want to present should have each instance in column vector form. Therefore, if you want to present properties of a rectangular region, it should be columnized using the colon operatator.
The drawback is that each region must have the same size.
In some instances this is accomplished via overlapping rectangular regions.

Sign in to comment.

More Answers (0)

Categories

Find more on Image Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!