Aviran
Aviran

Reputation: 5480

How should I setup my input neurons to recieve my input

I need to be able to determine if a shape was drawn correctly or incorrectly,

I have sample data for the shape, that holds the shape and the order of pixels (denoted by the color of the pixel)

for example, you can see of the downsampled image and color variation

enter image description here

I'm having trouble figuring out the network I need to define that will accept this kind of input for training.

should I convert the sampledown image to a matrix and input it? let's say my image is 64x64, I would need 64x64 input neurons (and that's if I ignore the color of the pixels, I think) is that feasible solution?

If you have any guidance, I could use it :)

Upvotes: 1

Views: 152

Answers (1)

greeness
greeness

Reputation: 16124

I gave you an example as below. It is a binarized 4x4 image of letter c. You can either concatenate the rows or columns. I am concatenating by columns as shown in the figure. Then each pixel is mapped to an input neuron (totally 16 input neurons). In the output layer, I have 26 outputs, the letters a to z.

Note, in the figure, I did not connect all nodes from layer i to layer i+1 for simplicity, which you probably should connect all.

At the output layer, I highlight the node of c to indicate that for this training instance, c is the target label. The expected input and output vector are listed in the bottom of the figure.

If you want to keep the intensity of color, e.g., R/G/B, then you have to triple the number of inputs. Each single pixel is replaced with three neurons.

Hope this helps more. For a further reading, I strongly suggest the deep learning tutorial by Andrew Ng at here - UFLDL. It's the state of art of such image recognition problem. In the exercise with the tutorial, you will be intensively trained to preprocess the images and work with a lot of engineering tricks for image processing, together with the interesting deep learning algorithm end-to-end.

enter image description here

Upvotes: 3

Related Questions