This project is my first attempt to run neural networks on STM32 microcontroller. I trained a convolutional neural network using Tensoflow2.0 using MNIST data set for handwritten digit recognition. In this project, handwritten digits are classified on a Micro-controller with 2MB Flash/256+4KB RAM.
Using STM32CUBEMX.AI the network is converted to a C code to be used as a part of the code for STM32. The code including AI and drivers is compiled using SystemWorkbench IDE and flashed to STM32F429I-DISC1 . Handwritten digits on the LCD are converted to normalized grayscale pixel values and is fed to the network.
Python code for training: https://github.com/nimaaghli/Mnist_TF2
C code for STM32F429I-DISC1:https://github.com/nimaaghli/STM32AI_MNIST