|author||Kshitij Sisodia <email@example.com>||Fri Jul 23 17:43:54 2021 +0100|
|committer||Kshitij Sisodia <firstname.lastname@example.org>||Fri Jul 23 17:43:54 2021 +0100|
Generating bin files for simple_platform. Breaking down the elf(axf) file into bin blobs for the simple_platform target too. Change-Id: Ie909508433ef03f8b4a32e04bc69353aed0d0849
This repository is for building and deploying Machine Learning (ML) applications targeted for Arm® Cortex®-M and Arm® Ethos™-U NPU. To run evaluations using this software, we suggest using an MPS3 board or a fixed virtual platform (FVP) that supports Ethos-U55 software fast model. Both environments run a combination of the new Arm® Cortex™-M55 processor and the Arm® Ethos™-U55 NPU.
The purpose of this evaluation kit is to allow users to develop software and test the performance of the Ethos-U55 NPU and Cortex-M55 CPU. The Ethos-U55 NPU is a new class of machine learning(ML) processor, specifically designed to accelerate computation for ML workloads in constrained embedded and IoT devices. The product is optimized to execute mathematical operations efficiently that are commonly used in ML algorithms, such as convolutions or activation functions.
The evaluation kit adds value by providing ready to use ML applications for the embedded stack. As a result, you can experiment with the already developed software use cases and create your own applications for Cortex-M CPU and Ethos-U NPU. The example application at your disposal and the utilized models are listed in the table below.
|ML application||Description||Neural Network Model|
|Image classification||Recognize the presence of objects in a given image||Mobilenet V2|
|Keyword spotting(KWS)||Recognize the presence of a key word in a recording||DS-CNN-L|
|Automated Speech Recognition(ASR)||Transcribe words in a recording||Wav2Letter|
|KWS and ASR||Utilise Cortex-M and Ethos-U to transcribe words in a recording after a keyword was spotted||DS-CNN-L Wav2Letter|
|Anomaly Detection||Detecting abnormal behavior based on a sound recording of a machine||Anomaly Detection|
|Generic inference runner||Code block allowing you to develop your own use case for Ethos-U55 NPU||Your custom model|
The above use cases implement end-to-end ML flow including data pre-processing and post-processing. They will allow you to investigate embedded software stack, evaluate performance of the networks running on Cortex-M55 CPU and Ethos-U55 NPU by displaying different performance metrics such as inference cycle count estimation and results of the network execution.
The evaluation kit is based on the Arm® Corstone™-300 reference package. Arm® Corstone™-300 helps you build SoCs quickly on the Arm® Cortex™-M55 and Arm® Ethos™-U55 designs. Arm® Corstone™-300 design implementation is publicly available on an Arm MPS3 FPGA board, or as a Fixed Virtual Platform of the MPS3 development board.
The Ethos-U NPU software stack is described here.
All ML use cases, albeit illustrating a different application, have common code such as initializing the Hardware Abstraction Layer (HAL). The application common code can be run on x86 or Arm Cortex-M architecture thanks to the HAL. For the ML application-specific part, Google® TensorFlow™ Lite for Microcontrollers inference engine is used to schedule the neural networks models executions. TensorFlow Lite for Microcontrollers is integrated with the Ethos-U55 driver and delegates execution of certain operators to the NPU or, if the neural network model operators are not supported on NPU, to the CPU. CMSIS-NN is used to optimise CPU workload execution with int8 data type. Common ML application functions will help you to focus on implementing logic of your custom ML use case: you can modify only the use case code and leave all other components unchanged. Supplied build system will discover new ML application code and automatically include it into compilation flow.
To run an ML application on the Cortex-M and Ethos-U55 NPU, please, follow these steps:
To get familiar with these steps, you can follow the quick start guide.
For more details see full documentation:
Contributions are only accepted under the following conditions:
The contribution have certified origin and give us your permission. To manage this process we use Developer Certificate of Origin (DCO) V1.1. To indicate that contributors agree to the the terms of the DCO, it's neccessary "sign off" the contribution by adding a line with name and e-mail address to every git commit message:
Signed-off-by: John Doe <email@example.com>
This can be done automatically by adding the
-s option to your
git commit command. You must use your real name, no pseudonyms or anonymous contributions are accepted.
You give permission according to the Apache License 2.0.
In each source file, include the following copyright notice:
/* * Copyright (c) <years additions were made to project> <your name>, Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
This repository follows a set of guidelines, best practices, programming styles and conventions, see:
Contributions must go through code review. Code reviews are performed through the mlplatform.org Gerrit server. Contributors need to signup to this Gerrit server with their GitHub account credentials. In order to be merged a patch needs to:
Prior to submitting a patch for review please make sure that all build variants works and unit tests pass. Contributions go through testing at the continuous integration system. All builds, tests and checks must pass before a contribution gets merged to the master branch.
Please, if you want to start public discussion, raise any issues or questions related to this repository, use https://discuss.mlplatform.org/c/ml-embedded-evaluation-kit forum.
The ML Embedded applications samples are provided under the Apache 2.0 license, see License Apache 2.0.
Application input data sample files are provided under their original license:
|Automatic Speech Recognition Samples||Creative Commons Attribution 4.0 International Public License||http://www.openslr.org/12/|
|Image Classification Samples||Creative Commons Attribution 1.0||https://www.pexels.com|
|Keyword Spotting Samples||Creative Commons Attribution 4.0 International Public License||http://download.tensorflow.org/data/speech_commands_v0.02.tar.gz|
|Keyword Spotting and Automatic Speech Recognition Samples||Creative Commons Attribution 4.0 International Public License||http://download.tensorflow.org/data/speech_commands_v0.02.tar.gz|