2

I have an image of a character. I wanted to make a neural network so that it takes the linear array of pixels as input and generate the Unicode of character so that i can compare it with the actual Unicode of that character. I tried it using pybrain but not able to write a code which can generate a Unicode. These are the parameters which i will be using for neural network:

• Learning rate = 150

• Sigmoid Slope = 0.026

• Weight bias = 30

• Number of Epochs = 300 ( Maximum)

• Mean error threshold value = 0.0002

I am thinking of following algo:

  1. Form network according to the specified topology parameters
  2. Initialize weights with random values within the specified ± weight bias value.[7]
  3. load trainer set files (both input image and desired output text)
  4. analyze input image and map all detected symbols into linear arrays
  5. read desired output text from file and convert each character to a binary Unicode value to store separately
  6. for each character : a. calculate the output of the feed forward network b. compare with the desired output corresponding to the symbol and compute error c. back propagate error across each link to adjust the weights
  7. move to the next character and repeat step 6 until all characters are visited
  8. compute the average error of all characters
  9. repeat steps 6 and 8 until the specified number of epochs a. Is error threshold reached? If so abort iteration b. If not continue iteration

I am not able to generate unicode as output from neural network at step 6. Please help

user1593134
  • 19
  • 1
  • 4
  • [what have you tried?](http://whathaveyoutried.com/) – Andy Hayden Sep 13 '12 at 10:25
  • i generated the pixels of my image and then created a network like this: net = buildNetwork(154, 250, 16) trainer = BackpropTrainer(net, ds, learningrate= 0.1, momentum = 0., ) trainer.trainEpochs(300) should i take 'ds' as supervised training set? If yes then what should be the samples? Or should i go for unsupervised learning. In unsupervised learning how would i set the weight bias, sigmoid slope etc mentioned above? – user1593134 Sep 13 '12 at 10:32
  • What is your training data? Independently of whether you use supervised or unsupervised learning you will need lots of training data (images of unicode characters) for this. Also, when using unsupervised learning, your NN will only be able to tell apart characters, but not to tell which character an image shows. – tobias_k Sep 13 '12 at 10:51
  • My training data constitutes of an image of character and a text file in which that character is written. I am thinking of above mentioned algo(plz see in the question. i have edited it). – user1593134 Sep 13 '12 at 11:18

0 Answers0