Log In  

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

Cart #mnist_pico8-1 | 2022-03-11 | Code ▽ | Embed ▽ | Forks ▽ | License: CC4-BY-NC-SA

P#108398 2022-03-10 19:00 ( Edited 2022-03-11 11:35)

:: luchak

Really nice! I love the visualizations of the layer activations. One UI suggestion might be to allow drawing using the mouse instead of d-pad, it's hard to get natural-looking digits this way.

P#108403 2022-03-10 21:21
:: dw817

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 !

P#108417 2022-03-11 02:24

Thanks for your suggestion! I haven't noticed that I can use mouse input.
It will be very useful and I'd like to implement it!

Thank you very much, I'm glad to hear that! It is quite fun to try to fool it.

P#108422 2022-03-11 06:52
:: luchak

Drawing is much better with the mouse, thanks for adding that! I had one other question - what's the color scale on the activation visualizations?

P#108455 2022-03-11 18:01

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

P#108459 2022-03-11 20:07

Actually each color has no special meaning. The code for visualization looks like this:
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...

Thank you very much!

P#108498 2022-03-12 16:30 ( Edited 2022-03-12 16:31)

uhhh ok

P#109217 2022-03-26 21:44

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.

P#115167 2022-08-02 18:31 ( Edited 2022-08-02 18:44)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-10-05 21:12:42 | 0.055s | Q:32