| ||||||||||||||
| ||||||||||||||
|
||||||||||||||
Optical Number Recognizor (ONR)Download here (28K).
To look at the data it will learn and test, use the spin buttons under the "Training" and "Classify" buttons to browse through the testing buttons. Now, to train the perceptrons to recognize the data, merely click on "Train" and the learning process will start. With the data set I provide with the program, the iterations should not really get much higher than 20. As a safe-guard, the program will time-out after 500 iterations, so feel free to change the data files. When learning has finished, the "Classify" button will enable. To then test what has been learnt, use the spin buttons under the "Classify" button to select a data entry that you would like to test. Press "Classify", and the program will write what it thinks the number is underneath. Note: I supplied a test set that produces very good results - with one exception. Try testing the '3' a few times, and you will find the perceptron will occasionally think it's an eight. The program is VERY easy to expand if you want too (even without understand the code). All you will need to do is change the NN_NUMBERS define clause (in OCRDlg.h) and change the data tests. You might also want to edit the "GetText" function to return the necessary results. For example, if you want to add the letter "A" to the data set, add: 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1To learn.dat, and a 'noisy' version to the test set. Then, change OCRDlg.h to read "#define NN_NUMBERS 10", and add another switch to the GetText function: case 9: str = "Letter 'A'"; break;Then recompile, and it should work! Have fun...
v1.11It seems like certain optimization compiler flags in the Microsoft C++ compilers would cause ONR to fail. I've used #pragma directives around the perceptron code to stop the compiler optimizing it - it all works again.
Last Updated: 07/05/2001 Article content copyright © James Matthews, 2001.
|
|
|||||||||||||
All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -