Skip to content

Commit 8db942b

Browse files
glneopraneethbajjuri
authored andcommitted
feat(linux): Update Machine Learning section for SDK 11.0
Much of the Machine Learning section is from many SDKs ago, some frameworks no longer exist in the SDK and others have been completely re-worked. Do some initial house keeping by removing sections we do not have anymore and beginning the new and re-worked sections. Signed-off-by: Andrew Davis <[email protected]>
1 parent 4b15503 commit 8db942b

File tree

17 files changed

+335
-2267
lines changed

17 files changed

+335
-2267
lines changed

configs/AM335X/AM335X_linux_toc.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ linux/Foundational_Components_Machine_Learning
9494
linux/Foundational_Components/Machine_Learning/armnn
9595
linux/Foundational_Components/Machine_Learning/tidl
9696
linux/Foundational_Components/Machine_Learning/tflite
97-
linux/Foundational_Components/Machine_Learning/neo
9897
linux/Foundational_Components/Machine_Learning/tvm
9998

10099
linux/Foundational_Components_Graphics

configs/AM437X/AM437X_linux_toc.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ linux/Foundational_Components_Machine_Learning
9595
linux/Foundational_Components/Machine_Learning/armnn
9696
linux/Foundational_Components/Machine_Learning/tidl
9797
linux/Foundational_Components/Machine_Learning/tflite
98-
linux/Foundational_Components/Machine_Learning/neo
9998
linux/Foundational_Components/Machine_Learning/tvm
10099

101100
linux/Foundational_Components_Graphics

configs/AM62X/AM62X_linux_toc.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,15 @@ linux/Foundational_Components/Tools/Flash_via_Fastboot
115115
linux/Foundational_Components/Tools/Flash_via_Ethernet
116116
linux/Foundational_Components/Tools/Flash_via_UART
117117
linux/Foundational_Components_IPC62x
118+
118119
linux/Foundational_Components_Machine_Learning
120+
linux/Foundational_Components/Machine_Learning/arm_compute_library
121+
linux/Foundational_Components/Machine_Learning/armnn
122+
linux/Foundational_Components/Machine_Learning/nnstreamer
123+
linux/Foundational_Components/Machine_Learning/onnxrt
124+
linux/Foundational_Components/Machine_Learning/tflite
125+
linux/Foundational_Components/Machine_Learning/tflite_j7
126+
119127
linux/Foundational_Components_OPTEE
120128
linux/Foundational_Components_ATF
121129
linux/Foundational_Components_Virtualization

configs/GEN/GEN_linux_toc.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ linux/Foundational_Components_Machine_Learning
116116
linux/Foundational_Components/Machine_Learning/tidl
117117
linux/Foundational_Components/Machine_Learning/armnn
118118
linux/Foundational_Components/Machine_Learning/tflite
119-
linux/Foundational_Components/Machine_Learning/neo
120119
linux/Foundational_Components/Machine_Learning/tvm
121120
linux/Foundational_Components_OPTEE
122121
linux/Foundational_Components_ATF

source/linux/Examples_and_Demos/Application_Demos/Additional_Application_Demo_Links.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,3 @@ TIDL Demo
4040

4141
Refer to various TI DeepLearning demos documented at
4242
:ref:`TIDL Examples and Demos <tidl-examples-and-demos>`.
43-
44-
Arm NN Classification Demo
45-
==========================
46-
47-
Refer to :ref:`arm-nn-mobilenet-demo`.
48-

source/linux/Examples_and_Demos/Application_Demos/PdM_Anomaly_Detection.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _PdM_Anomaly_Detection:
2+
13
Predictive Maintenance Demo
24
===========================
35

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
Arm Compute Library
2+
===================
3+
4+
Introduction
5+
-------------
6+
Arm Compute Library is a set of libraries that accelerate Machine Learning on Arm CPUs, optimized for NEON SIMD architecture.
7+
8+
Exact list of functions can be found at https://www.arm.com/products/development-tools/embedded-and-software/compute-library.
9+
10+
Supported versions
11+
------------------
12+
13+
- ARM Compute Library 24.12
14+
15+
Arm Compute Library Testing
16+
---------------------------
17+
18+
Arm Compute Libraries, tests, and sample executables are included in the SDK filesystem.
19+
20+
.. code-block:: console
21+
22+
root@am62xx-evm:~# LD_LIBRARY_PATH=/usr/lib/tests/ /usr/lib/tests/arm_compute_validation
23+
Version = 32bcced2af7feea6969dd1d22e58d0718dc488e3
24+
CommandLine = /usr/lib/tests/arm_compute_validation
25+
Seed = 3778037091
26+
cpu_has_sve = false
27+
cpu_has_sve2 = false
28+
cpu_has_svef32mm = false
29+
cpu_has_svei8mm = false
30+
cpu_has_svebf16 = false
31+
cpu_has_sme = false
32+
cpu_has_sme2 = false
33+
cpu_has_fp16 = false
34+
cpu_has_bf16 = false
35+
cpu_has_dotprod = false
36+
cpu_has_i8mm = false
37+
CPU0 = A53
38+
CPU1 = A53
39+
CPU2 = A53
40+
CPU3 = A53
41+
Iterations = 1
42+
Threads = 1
43+
Dataset mode = PRECOMMIT
44+
Running [0] 'UNIT/CPPScheduler/RethrowException'
45+
Wall clock/Wall clock time: AVG=3466.0000 us
46+
47+
48+
.. code-block:: console
49+
50+
root@am62xx-evm:~# /usr/bin/arm-compute-library-24.12/examples/graph_alexnet
51+
52+
/usr/bin/arm-compute-library-24.12/examples/graph_alexnet
53+
54+
Threads : 1
55+
Target : Neon
56+
Data type : F32
57+
Data layout : NHWC
58+
Tuner enabled? : false
59+
Cache enabled? : false
60+
Tuner mode : Normal
61+
Tuner file :
62+
MLGO file :
63+
Fast math enabled? : false
64+
65+
Test passed
66+
67+
68+
Sample NN related executables (using Arm Compute Library only):
69+
70+
.. code-block:: console
71+
72+
root@am62xx-evm:~# ls /usr/bin/arm-compute-library-24.12/examples/graph_*
73+
graph_alexnet graph_inception_v4 graph_resnext50 graph_vgg19
74+
graph_deepspeech_v0_4_1 graph_lenet graph_shufflenet graph_vgg_vdsr
75+
graph_edsr graph_mobilenet graph_squeezenet graph_yolov3
76+
graph_googlenet graph_mobilenet_v2 graph_squeezenet_v1_1
77+
graph_inception_resnet_v1 graph_resnet12 graph_srcnn955
78+
graph_inception_resnet_v2 graph_resnet50 graph_ssd_mobilenet
79+
graph_inception_v3 graph_resnet_v2_50 graph_vgg16
80+
81+
.. code-block:: console
82+
83+
root@am62xx-evm:~# ls /usr/bin/arm-compute-library-24.12/examples/neon_*
84+
neon_cnn neon_copy_objects neon_gemm_qasymm8 neon_gemm_s8_f32 neon_permute neon_scale neon_sgemm
Lines changed: 15 additions & 210 deletions
Original file line numberDiff line numberDiff line change
@@ -1,221 +1,26 @@
1-
Arm NN and Arm Compute Library
2-
==============================
1+
Arm NN
2+
======
33

44
Introduction
55
-------------
6-
Arm NN and Arm Compute Library, as a set of machine learning software, tools and libraries, enable Machine Learning on Arm.
7-
8-
For Sitara devices without accelerators like C66x or EVE (AM3/4/6), one can use Arm provided libraries created for supporting inference only tasks on Arm CPUs.
9-
Arm NN and Arm Compute Library can also be used on AM57xx devices as well, as complementary approach to TIDL-API.
10-
11-
Supported versions
12-
------------------
13-
14-
- ARMNN 19.08
15-
- ARM Compute Library 19.08
16-
17-
Arm Compute Library
18-
-------------------
19-
20-
Arm Compute Library is a software library for computer vision and machine learning, optimized for NEON SIMD architecture (Mali GPU OpenCL is not applicable to TI devices).
21-
Exact list of functions can be found at https://developer.arm.com/technologies/compute-library. Arm Compute Libraries and sample executables are included in SDK filesystem.
22-
AM3/4/5/6 devices can utilize this library to unleash full potential of Arm CPUs.
23-
24-
Sample NN related executables (using Arm Compute Library only):
25-
26-
::
27-
28-
/usr/bin/graph2tree
29-
/usr/bin/graph_alexnet
30-
/usr/bin/graph_googlenet
31-
/usr/bin/graph_inception_v3
32-
/usr/bin/graph_inception_v4
33-
/usr/bin/graph_lenet
34-
/usr/bin/graph_mobilenet
35-
/usr/bin/graph_mobilenet_qasymm8
36-
/usr/bin/graph_resnet50
37-
/usr/bin/graph_resnext50
38-
/usr/bin/graph_squeezenet
39-
/usr/bin/graph_squeezenet_v1_1
40-
/usr/bin/graph_vgg16
41-
/usr/bin/graph_vgg19
42-
43-
44-
Arm NN
45-
------
46-
47-
Arm NN is library built on top of Arm Compute Library leveraging its NEON optimized kernels. Importing of Caffe, ONNX, TensorFlow, and TensorFlow Lite inference models is significantly simplified.
48-
Library and executables are part of AM3/4/5/6 target filesystem. More information can be found at: https://developer.arm.com/products/processors/machine-learning/arm-nn
49-
50-
Sample Arm NN executables using Caffe models:
51-
52-
::
53-
54-
/usr/bin/CaffeAlexNet-Armnn
55-
/usr/bin/CaffeCifar10AcrossChannels-Armnn
56-
/usr/bin/CaffeInception_BN-Armnn
57-
/usr/bin/CaffeMnist-Armnn
58-
/usr/bin/CaffeResNet-Armnn
59-
/usr/bin/CaffeVGG-Armnn
60-
/usr/bin/CaffeYolo-Armnn
61-
62-
Sample executables using ONNX models:
63-
64-
::
65-
66-
/usr/bin/OnnxMnist-Armnn
67-
/usr/bin/OnnxMobileNet-Armnn
6+
Arm NN is an open source machine learning inference engine which bridges the gap between existing
7+
neural network frameworks and power-efficient Arm Cortex-A CPUs.
688

69-
Sample executables using TensorFlow models:
9+
Arm NN is built on top of Arm Compute Library, leveraging its NEON optimized kernels.
7010

71-
::
11+
Arm NN provides a TensorFlow Lite Delegate and using this delegate from TensorFlow Lite is the
12+
recommended way to use Arm NN.
7213

73-
/usr/bin/TfCifar10-Armnn
74-
/usr/bin/TfInceptionV3-Armnn
75-
/usr/bin/TfMnist-Armnn
76-
/usr/bin/TfMobileNet-Armnn
77-
/usr/bin/TfResNext-Armnn
14+
More information can be found at: https://www.mlplatform.org/
7815

79-
Sample executables using TensorFlow Lite models:
16+
For Sitara devices without dedicated AI accelerators like C7x/MMA, one can use the provided Arm NN
17+
TensorFlow Lite Delegate for supporting inference tasks on Arm CPUs.
8018

81-
::
19+
On devices with dedicated AI accelerators, the TensorFlow Lite Delegate can be used
20+
in conjunction with the TIDL TensorFlow Lite Delegate.
8221

83-
/usr/bin/TfLiteInceptionV3Quantized-Armnn
84-
/usr/bin/TfLiteInceptionV4Quantized-Armnn
85-
/usr/bin/TfLiteMnasNet-Armnn
86-
/usr/bin/TfLiteMobileNetQuantizedSoftmax-Armnn
87-
/usr/bin/TfLiteMobileNetSsd-Armnn
88-
/usr/bin/TfLiteMobilenetQuantized-Armnn
89-
/usr/bin/TfLiteMobilenetV2Quantized-Armnn
90-
/usr/bin/TfLiteResNetV2-50-Quantized-Armnn
91-
/usr/bin/TfLiteResNetV2-Armnn
92-
/usr/bin/TfLiteVGG16Quantized-Armnn
9322

23+
Supported versions
24+
------------------
9425

95-
.. _arm-nn-mobilenet-demo:
96-
97-
Arm NN MobileNet Demo
98-
---------------------
99-
100-
Upon boot, Matrix-GUI is started with multiple icons that can start many out of box demos. Under sub-menu "Machine Learning",
101-
there are two icons to start the Arm NN demos:
102-
103-
* Arm NN MobileNet Real Common Objects
104-
* Arm NN MobileNet Camera Input
105-
106-
These examples demonstrate Deep Learning Imagenet classification (1000 classes) with `MobileNet model <https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.0_224.tgz>`__ on Arm.
107-
One example uses pre-recorded real-world video clip and the other uses live camera input. The pre-recorded video clip (320x320 resolution) and live camera input (default 640x480 resolution)
108-
are scaled down and central-cropped in run-time (using OpenCV API) to 224x224. Result of this
109-
processing is standard Imagenet classification output (1D vector with 1000 elements).
110-
111-
Executable invoked from the Matrix-GUI demos above is /usr/bin/ArmnnExamples, and the TensorFlow Lite parser is used.
112-
113-
Options of ArmnnExamples are listed below:
114-
115-
::
116-
117-
-f [ --model-format ] arg caffe-binary, caffe-text, onnx-binary,
118-
onnx-text, tflite-binary, tensorflow-binary
119-
or tensorflow-text. E.g.: -f
120-
tensorflow-binary
121-
-m [ --model-path ] arg Model Name w/ full path, e.g.of supported
122-
model types: .caffemodel, .prototxt, .tflite,
123-
.onnx. E.g.: -m /usr/share/arm/armnn/models/m
124-
obilenet_v1_1.0_224_frozen.pb
125-
-c [ --compute ] arg The preferred order of devices to run layers
126-
on by default. Possible choices: CpuAcc,
127-
CpuRef, GpuAcc. E.g.: -c CpuAcc
128-
-i [ --input-name ] arg Identifier of the input tensor in the
129-
network. E.g.: -i input
130-
-s [ --input-tensor-shape ] arg The shape of the input tensor in the network
131-
as a flat array of integers separated by
132-
whitespace. This parameter is optional,
133-
depending on the network. E.g.: -s '1 224 224 3'
134-
-d [ --input-tensor-data ] arg Input test file name. It can be image/video
135-
clip file name or use 'camera_live_input' to
136-
select camera input. E.g.: -d
137-
/usr/share/arm/armnn/testvecs/camera_live_input
138-
-o [ --output-name ] arg Identifier of the output tensor in the
139-
network. E.g.: -o MobilenetV1/Predictions/Reshape_1
140-
--number_frame arg (=1) Number of frames to process. E.g.:
141-
--number_frame 100.
142-
143-
Here is an example of classification using live camera input - stop at any time with mouse right-click on output image window.
144-
145-
.. code-block:: shell
146-
147-
ArmnnExamples -f tflite-binary -i input -s '1 224 224 3' -o MobilenetV2/Predictions/Reshape_1 -d /usr/share/arm/armnn/testvecs/camera_live_input -m /usr/share/arm/armnn/models/mobilenet_v2_1.0_224.tflite -c CpuAcc --number_frame 100
148-
149-
Here is an example of classification using video clip - stop at any time with mouse right-click on output image window.
150-
151-
.. code-block:: shell
152-
153-
ArmnnExamples -f tflite-binary -i input -s '1 224 224 3' -o MobilenetV2/Predictions/Reshape_1 -d /usr/share/arm/armnn/testvecs/test2.mp4 -m /usr/share/arm/armnn/models/mobilenet_v2_1.0_224.tflite -c CpuAcc --number_frame 100
154-
155-
Here is an example of classification using JPG image - use "--number_frame" to select the number of runs.
156-
157-
.. code-block:: shell
158-
159-
root@am57xx-evm:/usr/bin# ArmnnExamples -f tflite-binary -i input -s '1 224 224 3' -o MobilenetV2/Predictions/Reshape_1 -d /usr/share/arm/armnn/testvecs/baseball.jpg -m /usr/share/arm/armnn/models/mobilenet_v2_1.0_224.tflite -c CpuAcc --number_frame 10
160-
ArmNN v20190800
161-
162-
Top(1) prediction is 430:baseball with confidence: 69.5592%
163-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
164-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
165-
Top(4) prediction is 884:vase with confidence: 0.196634%
166-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
167-
Performance (FPS): 7.57426
168-
Top(1) prediction is 430:baseball with confidence: 69.5592%
169-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
170-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
171-
Top(4) prediction is 884:vase with confidence: 0.196634%
172-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
173-
Performance (FPS): 9.48181
174-
Top(1) prediction is 430:baseball with confidence: 69.5592%
175-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
176-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
177-
Top(4) prediction is 884:vase with confidence: 0.196634%
178-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
179-
Performance (FPS): 9.46633
180-
Top(1) prediction is 430:baseball with confidence: 69.5592%
181-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
182-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
183-
Top(4) prediction is 884:vase with confidence: 0.196634%
184-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
185-
Performance (FPS): 9.41803
186-
Top(1) prediction is 430:baseball with confidence: 69.5592%
187-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
188-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
189-
Top(4) prediction is 884:vase with confidence: 0.196634%
190-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
191-
Performance (FPS): 9.3029
192-
Top(1) prediction is 430:baseball with confidence: 69.5592%
193-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
194-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
195-
Top(4) prediction is 884:vase with confidence: 0.196634%
196-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
197-
Performance (FPS): 9.45797
198-
Top(1) prediction is 430:baseball with confidence: 69.5592%
199-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
200-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
201-
Top(4) prediction is 884:vase with confidence: 0.196634%
202-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
203-
Performance (FPS): 9.45416
204-
Top(1) prediction is 430:baseball with confidence: 69.5592%
205-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
206-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
207-
Top(4) prediction is 884:vase with confidence: 0.196634%
208-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
209-
Performance (FPS): 9.49093
210-
Top(1) prediction is 430:baseball with confidence: 69.5592%
211-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
212-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
213-
Top(4) prediction is 884:vase with confidence: 0.196634%
214-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
215-
Performance (FPS): 9.33742
216-
Top(1) prediction is 430:baseball with confidence: 69.5592%
217-
Top(2) prediction is 575:golf ball with confidence: 0.307349%
218-
Top(3) prediction is 474:can opener, tin opener with confidence: 0.248897%
219-
Top(4) prediction is 884:vase with confidence: 0.196634%
220-
Top(5) prediction is 130:spoonbill with confidence: 0.191194%
221-
Performance (FPS): 9.4193
26+
- Arm NN 24.11

0 commit comments

Comments
 (0)