This might've been done before, but nonetheless, this is my attempt to make a functional neural network to recognize handwritten digits in pico8, using the MNIST database. The training is all done in Python using NumPy, I then use post-training quantization to convert the parameters into 8 bit integers which are then imported into the cartridge via the spritesheet.
It's pretty stupid (I think mainly due to the fact I do zero post processing on it, other than scaling it down with Lanczos resampling), but I find that if you try to only draw in the middle like I did in the label, it works alright.
You just draw with the mouse within the blue rectangle, then x to predict the value, and z to clear it.
Please feel free to check out, and perhaps contribute to, the project on Github where the Python file for all the training lives!
[Please log in to post a comment]