|
1 | | -Arm NN and Arm Compute Library |
2 | | -============================== |
| 1 | +Arm NN |
| 2 | +====== |
3 | 3 |
|
4 | 4 | Introduction |
5 | 5 | ------------- |
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. |
68 | 8 |
|
69 | | -Sample executables using TensorFlow models: |
| 9 | +Arm NN is built on top of Arm Compute Library, leveraging its NEON optimized kernels. |
70 | 10 |
|
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. |
72 | 13 |
|
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/ |
78 | 15 |
|
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. |
80 | 18 |
|
81 | | -:: |
| 19 | +On devices with dedicated AI accelerators, the TensorFlow Lite Delegate can be used |
| 20 | +in conjunction with the TIDL TensorFlow Lite Delegate. |
82 | 21 |
|
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 |
93 | 22 |
|
| 23 | +Supported versions |
| 24 | +------------------ |
94 | 25 |
|
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