© 2020 NXP B.V.
NXP eIQMachine Learning Software
Development Environment for i.MX
Applications Processors
1. Introduction
Machine Learning (ML) is a computer science domain
that has its roots in the 1960s. ML provides algorithms
capable of finding patterns and rules in data. ML is a
category of algorithm that allows software applications
to become more accurate in predicting outcomes
without being explicitly programmed. The basic
premise of ML is to build algorithms that can receive
input data and use statistical analysis to predict an
output while updating outputs as new data becomes
available.
In 2010, the so-called deep learning started. It is a
fast-growing subdomain of ML, based on Neural
Networks (NN). Inspired by the human brain, deep
learning achieved state-of-the-art results in various
tasks; for example, Computer Vision (CV) and Natural
Language Processing (NLP). Neural networks are
capable of learning complex patterns from millions of
examples. A huge adaptation is expected in the
embedded world, where NXP is the leader. NXP
created eIQ machine learning software for i.MX
applications processors, a set of ML tools which allows
developing and deploying ML applications on the
i.MX 8 family of devices.
NXP Semiconductors
Document Number:
UM11226
User Manual
Rev.
4
,
05/2020
Contents
1. Introduction ....................................................................... 1
2. NXP eIQ software introduction ......................................... 2
3. Yocto installation guide ..................................................... 3
3.1. Prerequisites............................................................ 4
3.2. Building NXP eIQ software support using Yocto
Project tools .......................................................................... 4
4. OpenCV getting started guide ............................................ 8
4.1. OpenCV DNN demos ............................................. 8
4.2. OpenCV standard machine learning demos ...........15
5. Arm Compute Library getting started guide .................... 19
5.1. Running DNN with random weight and inputs ......19
5.2. Running AlexNet using graph API ........................20
6. TensorFlow getting started guide ..................................... 20
6.1. Running benchmark application ............................21
7. TensorFlow Lite getting started guide ............................. 22
7.1. Running benchmark application ............................22
7.2. Running image classification example ..................23
8. Arm NN getting started guide .......................................... 25
8.1. Running Arm NN tests ..........................................25
8.2. Using Arm NN in a custom C/C++ application .....33
9. ONNX Runtime getting started guide .............................. 34
9.1. Running ONNX Runtime test ................................35
10. Security for machine learning .......................................... 35
10.1. Adversarial examples .............................................36
10.2. Model cloning ........................................................38
10.3. Model Inversion .....................................................40
10.4. Library Usage ........................................................41
11. References ....................................................................... 42
12. Revision history ............................................................... 43
NXP eIQ software introduction
NXP eIQ™ Machine Learning Software Development Environment for i.MX Applications Processors, Rev. 4, 05/2020
2 NXP Semiconductors
This document provides guidance for the supported ML software for the i.MX family. The document is
divided into separate sections, starting with the NXP eIQ introduction, the Yocto installation guide, and
the step-by step guide for running all supported DNN and non-DNN examples.
NOTE
This document describes the eIQ Machine Learning Software for the NXP
L4.14 BSP release. Beginning with the L4.19 BSP, the eIQ software is
pre-integrated in the BSP release and this document is no longer necessary
or being maintained. For more information on the eIQ software in these
releases (L4.19, L5.4, and so on), see the NXP eIQ Machine Learning
chapter in the Linux user’s guide for that specific release. Be sure to join
the eIQ Machine Learning Software Community
(https://community.nxp.com/community/eiq), where you will find many
new demos and sample applications (in addition to great community
support).
2. NXP eIQ software introduction
The NXP eIQ machine learning software development environment provides a set of libraries and
development tools for machine learning applications targeted at NXP MCUs and application processors.
The NXP eIQ software is concerned only with neural networks inference and standard machine-learning
algorithms, leaving neural network training to other specialized software tools and dedicated hardware.
The NXP eIQ is continuously expanding to include data-acquisition and curation tools and model
conversion for a wide range of NN frameworks and inference engines, such as TensorFlow, TensorFlow
Lite, Arm
®
NN, and Arm Compute Library.
The current version of NXP eIQ software of i.MX processors delivers advanced and highly optimized
machine learning enablement by providing ML support in Linux OS BSPs for the i.MX 8 family of
devices. The NXP eIQ software contains these main Yocto recipes:
OpenCV 4.0.1
Arm Compute Library 19.02
Arm NN 19.02
ONNX runtime 0.3.0
TensorFlow 1.12
TensorFlow Lite 1.12
For more details about the i.MX 8 family of application processors, see the fact sheet
[1]
.
For up-to-date information about NXP machine learning solutions, see the official NXP web page
[2]
for
machine learning and artificial intelligence.