It was one of my first machine learning course’s (Complete Keras and Tensorflow 2 Deep Learning Bootcamp) Python program that impressed me. So, I plan to run this classic hand written number recognition “party trick” using the 60,000 digit sample MNIST training database on our upcoming I.MX8PLUS industrial gateway device.

Edge Compute device : Our development IMX8PLUS gateway board with 2GB RAM
Another goal of the project is also to test Google’s Coral Edge TPU M.2 module to determine the performance gains. Since my USB camera is still on the way here via Aust Post, today, we will just do a benchmark on a CNN training and inference cycle using simulated user input.
In my Python script with Tensorflow and Keras, I setup a simple Sequential CNN model with early stopping based on minimum validation loss.

Next, we check the model summary and then run the training.

Then, we run the training on the I.MX8PLUS gateway itself, just for the fun of it.

Yes, with Tensorflow 2.0, the ARM Cortex-A53 4-Core does take a bit of hit to iterate thru all the sequential model to build the neural network. On my Intel i7-1260P laptop, each iteration took about 22-25s. or now, the model was able to predict our simulated digits pretty spot-on. We can’t wait to do a test with our external USB web cam next .. back soon.

So, we ran some inference using the MNIST trained model on some user sample images below. Prediction was pretty “spot on”, we are bunch of old EEE guys so lack the Data Science lingo


So, next we want to work on getting Tensorflow Lite integrated into our scripts and see how much faster we can improve prediction/inference before we try the Coral “Google” M.2 Edge TPU card (when it does arrive). Posting results soon ….
Related posts
Latest posts
- Complete Step by Step : Image Classification with TensorFlow and CNN
- Voice recognition using Tensorflow Lite in nRFS52840 development board
- Tested Bard vs ChatGPT to write a Python script for MNIST digit prediction!
- Edge TPU vs CPU for OpenCV Object Detection on IMX8
- Tensorflow Lite CPU vs TPU. Take Two!