Handwritten Digit Recognition on MNIST dataset using eIQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Handwritten Digit Recognition on MNIST dataset using eIQ

Handwritten Digit Recognition on MNIST dataset using eIQ

About this demo

This demo shows the usage of a Neural Network (NN) applied for handwritten digit recognition, the NN model runs on the i.MX RT1060 MCU. The main idea of the demonstration is to show the i.MX RT capability to manage a graphical user interface while applying a NN model to recognize handwritten numbers to determine whether a password is correct or wrong. The demonstration is tested by setting a 4-digit password to a 4.3" LCD Panel, then the user must enter the correct password to unlock device; when the password is provided, the digits recognized by the NN are displayed on the screen. A 'Clear' button will erase the previous numbers for the user to try a new password to unlock the device.


Technical Introduction and Acknowledgment

The demo is available using two different approaches for the model creation and inference engines: TensorFlow Lite and CMSIS-NN using Caffe Framework.

 

TensorFlow Lite

The application note AN12603 describes handwritten digit recognition on embedded systems through deep learning. The digit recognition is performed by a TensorFlow Lite model trained with the MINST dataset containing 60,000 handwritten grayscale images and 10,000 testing examples. This application note, deep dives into every step to achieve the application using Tensorflow Lite and build a GUI using Embedded Wizard.

 

CMSIS-NN using Caffee Framework

The application note AN12781 explores the usage of Deep Neural Networks created in Caffe Framework, this framework allows creating a model and convert it to CMSIS-NN functions to be exported to the i.MX RT platform as source files. The model is also trained for the digit recognition using the MNIST dataset. The document describes the procedure to create, train and deploy the model; in the final step the model is exported a C source files using CMSIS-NN functions and weights that are exported to the i.MX RT1060 project.


Video

 

 

Hardware setup

 

Recommended Products
i.MX RT1060 Evaluation Kit | NXP 
4.3" LCD Panel RK043FN02H-CT | NXP 

 

Further Information                                          

The NXP® eIQ software environment enables the use of ML algorithms on NXP MCUs, i.MX RT crossover MCUs, and i.MX family SoCs. eIQ software includes inference engines, neural network compilers and optimized libraries.

Additionally,  the models can be optimized through techniques like quantization and pruning, AN12781 explores the possibility of optimization by creating a new model using Caffe with a quantization to simplify the floating-point data. By reducing the 32-bit floating-point data to an 8-bit and fixed-point format, the memory allocation got reduced and this resulted in a lower-processing power.

 

Transfer Learning

Transfer learning gives machine learning models the ability to apply past experience to quickly and more accurately learn to solve new problems. This technique has become very important in deep learning. AN12892 describes how to perform transfer learning in TensorFlow and a use case example, which aims to improve the performance of the application from AN12603. 

 

Useful Links

 

Links

 AN12603

AN12603 Software
AN12781

AN12781 Software

AN12892

AN12892 Software

eIQ™ for TensorFlow Lite | NXP 
Caffe | Deep Learning Framework 
Embedded Wizard | Simplify Your GUI Development 
What is a Container? | App Containerization | Docker 
Labels (2)
Version history
Revision #:
2 of 2
Last update:
‎10-27-2020 09:48 AM
Updated by:
 
Contributors