Important alert: (current site time 7/16/2013 3:13:48 AM EDT)
 

winzip icon

Teaching Computers To Read Part 3

Email
Submitted on: 5/4/2001 5:00:44 AM
By: BigCalm  
Level: Advanced
User Rating: By 37 Users
Compatibility: VB 5.0, VB 6.0
Views: 67721
author picture
(About the author)
 
     An Optical Character Recognition (OCR) program. The goal of this ongoing experimental project is to build a neural net capable of recognising zipcodes or text within bitmaps. Part 3 includes a much faster net (array based, rather than Class/Collection based), simulated annealing, and Nguyen-Widrow initialisation. Other keywords: AI, Artificial Intelligence, Perceptron, Feed-Forward, BackPropogation

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 15 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/4/2001 6:25:13 AMVictor Stefanescu

You should contact MIT for a lifetime contract. Congratulations!
(If this comment was disrespectful, please report it.)

 
5/4/2001 7:44:56 PMEric G

simply amazing! Great work. Excellent from me.
(If this comment was disrespectful, please report it.)

 
5/5/2001 7:09:12 AMBcwan

it's a great work man, Good luck with my vote, very good.
(If this comment was disrespectful, please report it.)

 
5/21/2001 10:02:00 PM#uberGeek

One question..... why isnt this the NUMBER 1 peice of code on PSC????? Great work man.
(If this comment was disrespectful, please report it.)

 
5/24/2001 12:50:08 PMSean Street, MCP

Excellent app. Too bad I got caught messing with it at work. I was wondering, how difficult would it be to indicate whether the computer correctly identified the glyph? And based on that, adjust accordingly. For example, it did have some difficulty identifying the number 8. I picked 8 because it's obviously the most difficult to identify. Great app just the same though.
(If this comment was disrespectful, please report it.)

 
5/25/2001 4:22:15 PMAndreas Laubscher

An impressive piece of code. I'm quite looking forward to seeing how it... develops.
(If this comment was disrespectful, please report it.)

 
5/29/2001 5:20:17 AMBigCalm

Ack Sean, the project is still very experimental, but it's slowly getting there I think - in this submitted version it should be 98% accurate on typewriter fonts, but pretty poor on other types such as script and hand-drawn glyphs - I'd estimate at about 60-70%. This will improve with more fonts, more neurons in the hidden layers, and more training.
There's a reasonably high possibility that I'll shift languages for Part 4 (Java). Watch this space.
(If this comment was disrespectful, please report it.)

 
6/22/2001 8:24:00 AMMark Robert Strange

Big Calm, this project is outstanding. My final exam in a C++ course was to design a very similar program, and I know that this was not easy. 5 Globes all the way, you'd get more if I could give them! =)
(If this comment was disrespectful, please report it.)

 
6/23/2001 7:38:38 AMBigCalm

You must open the NNGroup GROUP rather than the individual projects for this to compile ok ;0p
(If this comment was disrespectful, please report it.)

 
6/23/2001 2:44:28 PMShawn

Terminator 3 in the making...
(If this comment was disrespectful, please report it.)

 
6/25/2001 3:39:20 PMBenjy

this is really cool! thought about using the whole alphabet and symbols?
(If this comment was disrespectful, please report it.)

 
6/28/2001 8:45:47 PMcharles

wont compile i started with the group to it says invalid type
(If this comment was disrespectful, please report it.)

 
11/2/2001 8:06:50 AMAlpha

Wonderful! Fantastic!
(If this comment was disrespectful, please report it.)

 
6/12/2002 10:26:15 PMChris

i have made a program that can read somewhat well check it out at:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=35774&lng WId=1

that
program uses the image and looks at pixels. I just created a program that looks at the mouse movements instead. Its a lot faster but the problem is its not as accurate.

(If this comment was disrespectful, please report it.)

 
6/13/2002 12:50:12 PMChris

here is the new program its many times faster!

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=35799 &lngWId=1

(If this comment was disrespectful, please report it.)

 
7/18/2002 1:07:45 PMgnatz

Great work BigCalm! Thanks for sharing.

There is a small bug in the tracking of the dendrite count in the CalculateOutput and AdjustWeights Subs.

For k = Layers(i).StartDendrite + ((j - Layers(i).StartNeuron) * _
Layers(i - 1).NeuronCount) To Layers(i).StartDendrite + _
((j - Layers(i).StartNeuron) * Layers(i - 1).NeuronCount) + _
Layers(i - 1).NeuronCount - 1
'Bug found! The original code missed the last -1, causing extra input in
'neuron value computation.

Neurons(j).Value = Neurons(j).Value + (Neurons(PrevNLayerPtr).Value * Dendrites(k).TransferWeight)
PrevNLayerPtr = PrevNLayerPtr + 1
Next k

Anothe comment: adding a momentum term in the weight update improves the learning quite a bit, at least for the XOR text problem.

(If this comment was disrespectful, please report it.)

 
9/4/2002 3:53:07 PMgridrun

this is, one of the most elite (yes, ELITE =P) pieces of code around on pscode.com. BiiiiiiiiiiiiiiiiiiG thanks to BigCalm for sharing this, I do apperciate this very very very much!!
(If this comment was disrespectful, please report it.)

 
9/21/2002 7:59:02 AM

great stuffman .
I am working on signature verification system and i 'll be using your code .
(If this comment was disrespectful, please report it.)

 
11/23/2003 4:26:04 AM

WOW! I loved this one.
I noticed it had trouble distinguishing between "4" and "9", but none the less this was amazing! 5 globes from me.
(If this comment was disrespectful, please report it.)

 
11/22/2004 6:19:42 AM

I am going to express in French
Vraiment excellent, c'est un vrais travail professionnels, je suis dans un projet de réalisation d'un module de reconnaissance de chiffre et j'utilise ton code. Merci de l'avoir partagé. 5 globs vraiment mérités
(If this comment was disrespectful, please report it.)

 
2/7/2005 7:35:20 AMSPY-3

Great program 5 globes! theres only 1 problem with it i put a 9 and it says its 0 i put a 8 same thing same with 6 but only if i draw them carfully will it identify the right one. but great code!
(If this comment was disrespectful, please report it.)

 
2/19/2005 1:54:15 AMParesh N Naik

Awesome Program.Will this program detect letters(text) from a scanned bmp or jpg image??
(If this comment was disrespectful, please report it.)

 
3/8/2005 11:50:39 PMenmity

I was wondering how this project is going on? Anybody make it work with letter or even expand it be more robust?
(If this comment was disrespectful, please report it.)

 
3/9/2005 9:19:55 PMDario Mindoro

Great code! five from me, can you also post a perception NN, I'm working on face recognition system and eigens algorithm is not enough so I planned to use NN, I am beginner of this NN yet.
(If this comment was disrespectful, please report it.)

 
3/9/2006 3:18:34 AMsonal

well i want that the ocr should read the text on mouse over like if my mouse is on the windows start button it should read start if i am on programs it should tell me that my mouse is on programs ex in shoort it should tell me where my mouse poister is
(If this comment was disrespectful, please report it.)

 
12/12/2009 11:07:21 AMPeter Gransden

Should be in an overpriced book; but its here for all to learn!

Also works good if you add capital letters; see "GlyphGlobals(base).PopulateTrainingFonts" and "frmGlyph(form).btCreate_Click"
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.