NOTE: Doesn't work as well as expected! (Read below to find out why) This is a handwritten digit recognition program that uses a basic neural network to classify handwritten digits. The machine learning itself was performed using Python (it makes life much easier) but I transferred the learned weights here. Ideally, you can click the green flag and use the cursor to draw a number which should be matched in the top right - this isn't entirely accurate though. The main problem is the difference in 'handwriting'. The digits in the dataset used were images of numbers scaled up and in rather low resolution. Obviously, using a cursor to draw on a screen is just different (try out the examples in 'Notes and Credits' and you'll see what I mean). On test data from the dataset, this achieves 88% accuracy. Use the GET and SET buttons to export or load digits to the screen. GET will transfer what you've written to the 'Data' list at the bottom, which you can copy and paste to save elsewhere, or share in the comments. Use SET to enter in a string of numbers to load an existing digit, i.e. the examples from the Notes and Credits section below.
Training performed using the keras library and Python 3.5.2. SCRATCH-ONLY NN IN PROGRESS (so ignore the messy code inside) Uses the MNIST handwritten digit dataset. All programming is my own work. --------------------------------------------- EXAMPLE DIGITS (from MNIST): --------------------------------------------- 0: 0.0;0.0;6.0;16.0;13.0;11.0;1.0;0.0;0.0;0.0;16.0;15.0;12.0;16.0;1.0;0.0;0.0;3.0;16.0;7.0;0.0;13.0;6.0;0.0;0.0;4.0;16.0;0.0;0.0;10.0;8.0;0.0;0.0;8.0;16.0;0.0;0.0;14.0;6.0;0.0;0.0;5.0;16.0;7.0;9.0;16.0;5.0;0.0;0.0;1.0;15.0;16.0;16.0;16.0;1.0;0.0;0.0;0.0;6.0;16.0;14.0;6.0;0.0;0.0; 1: 0.0;0.0;0.0;12.0;13.0;5.0;0.0;0.0;0.0;0.0;0.0;11.0;16.0;9.0;0.0;0.0;0.0;0.0;3.0;15.0;16.0;6.0;0.0;0.0;0.0;7.0;15.0;16.0;16.0;2.0;0.0;0.0;0.0;0.0;1.0;16.0;16.0;3.0;0.0;0.0;0.0;0.0;1.0;16.0;16.0;6.0;0.0;0.0;0.0;0.0;1.0;16.0;16.0;6.0;0.0;0.0;0.0;0.0;0.0;11.0;16.0;10.0;0.0;0.0; 2: 0.0;1.0;10.0;13.0;2.0;0.0;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