I implemented a simple CNN (Convolutional Neural Network) to recognize handwritten numbers!
The original CNN was implemented and trained in Tensorflow/Keras. The weights of the CNN are kept using sprites.
There are still some mistakes, but it will be fun to see how the CNN works (or not).
(The code is messed up, so I'll fix it someday...)
(Edit) Now the mouse input is available!
Left click: draw
Right click: delete
Left + Right click: delete all


I have tried many different ways of fooling the system. As long as it's a big picture, it gets the correct answer every time.
Magnificently done, @muse_energy. Gold star work !


Wow, this is really neat. I have no idea how you did it, but it works so well


@luchak
Actually each color has no special meaning. The code for visualization looks like this:
pset(i+k*30,j+30,7+7*output1[j][i][k])
Initially, I intended that pixels with output value 0 will be white and that the entire color palette roughly corresponds to the interval -1 to 1. I should have made it more like a gradation (for example), but I left it as it is due to my laziness...
@taxicomics
Thank you very much!


Great! It seems to struggle most with 6, being close to 5 and 8.
If you work on the program again a 'thinking' progress indicator would be great, as there is a reasonable delay between drawing and the CNN giving an output.
[Please log in to post a comment]