diff --git a/README.md b/README.md index bbdb8bd..8b2fab1 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,46 @@ # Paddle Examples for Arm Virtual Hardware(AVH) ## Arm Virtual Hardware(AVH) -[Arm Virtual Hardware (AVH)](https://www.arm.com/products/development-tools/simulation/virtual-hardware) scales and accelerates IoT software development by virtualising popular IoT development kits, Arm-based processors, and systems in the cloud. It is an evolution of Arm’s modelling technology that removes the wait for hardware and the complexity of building and configuring board farms for testing. It enables modern agile software development practices, such as DevOps and MLOps workflows. -Arm Virtual Hardware is available for [Corstone](https://www.arm.com/products/silicon-ip-subsystems) platforms and [Cortex](https://www.arm.com/products/silicon-ip-cpu) processors via an Amazon Machine Image (AMI) on [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-urbpq7yo5va7g) as well for third-party hardware available via Arm’s [SaaS platform](https://avh.arm.com/). +[Arm Virtual Hardware (AVH)](https://www.arm.com/products/development-tools/simulation/virtual-hardware) scales and +accelerates IoT software development by virtualising popular IoT development kits, Arm-based processors, and systems in +the cloud. It is an evolution of Arm’s modelling technology that removes the wait for hardware and the complexity of +building and configuring board farms for testing. It enables modern agile software development practices, such as DevOps +and MLOps workflows. + +Arm Virtual Hardware is available for [Corstone](https://www.arm.com/products/silicon-ip-subsystems) platforms +and [Cortex](https://www.arm.com/products/silicon-ip-cpu) processors via an Amazon Machine Image (AMI) +on [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-urbpq7yo5va7g) as well for third-party hardware +available via Arm’s [SaaS platform](https://avh.arm.com/). For examples in this repository, we use Arm Virtual Hardware with Corstone platforms and Cortex processors via AWS. ## PaddlePaddle -PaddlePaddle (PArallel Distributed Deep LEarning) is a simple, efficient and extensible deep learning framework developed by Baidu, Inc. As the first independent R&D deep learning platform in China, it has been officially open-sourced to professional communities since 2016. It is an industrial platform with advanced technologies and rich features that cover core deep learning frameworks, basic model libraries, end-to-end development kits, tools & components as well as service platforms. For more details, please refer to [PaddlePaddle Github](https://github.com/PaddlePaddle/Paddle) for details. + +PaddlePaddle (PArallel Distributed Deep LEarning) is a simple, efficient and extensible deep learning framework +developed by Baidu, Inc. As the first independent R&D deep learning platform in China, it has been officially +open-sourced to professional communities since 2016. It is an industrial platform with advanced technologies and rich +features that cover core deep learning frameworks, basic model libraries, end-to-end development kits, tools & +components as well as service platforms. For more details, please refer +to [PaddlePaddle Github](https://github.com/PaddlePaddle/Paddle) for details. + +## Running environment and prerequisites + +If you haven't configured the environment yet, please run the following command to set up the dependencies for this +repository. + +```bash +cd /path/to/Paddle-examples-for-AVH +bash scripts/config_cmsis_toolbox.sh +bash scripts/config_tvm.sh +``` ## Example -We provide 4 use cases in this repository ([ocr](./ocr), [object_classification](./object_classification), [object_detection](./object_detection), [object_segmentation](./object_segmentation)) with various models supported from corresponding Paddle Toolkit. + +We have divided the repository into several sections based on common tasks in the computer vision field. Please refer to +the table below for details. + +| Task | Model | Cortex-M55 | Cortex-M85 | +|-------------------------------------------|-------------|------------|------------| +| [Classification](./object_classification) | MobileNetV3 | ✅ | ✅ | +| [Classification](./object_classification) | PP_LCNet | ✅ | ✅ | diff --git a/object_classification/README.md b/object_classification/README.md new file mode 100644 index 0000000..fd45224 --- /dev/null +++ b/object_classification/README.md @@ -0,0 +1,31 @@ +# Running PaddleClas image classification model using Arm Virtual Hardware + +## Running environment and prerequisites + +If you are running this project for the first time, please go back to [the homepage](../README.md) and follow the +documentation there to install the dependencies. + +## Supported Models List + +For your convenience, we have provided a corresponding table of models currently adapted and the devices that support each of these models. + +| Model | Cortex-M55 | Cortex-M85 | +|-------------|------------|------------| +| MobileNetV3 | ✅ | ✅ | +| PP_LCNet | ✅ | ✅ | + +## Run Classification Model Demo + +We use **run_demo.sh** to build the entire project. The parameters you need to pass are listed in the table below. + +| Arguments | Details | +|-----------|--------------------------------------------------------------------------------------------------------------| +| --model | The '--model' parameter is used to select the desired model. Currently, it supports MobileNetV3/PP_LCNet. | +| --device | The '--device' parameter is used to select the desired device. Currently, it supports cortex-m55/cortex-m85. | + +For example, running the following command can execute the MobileNetV3 model on Cortex-M55: + +```bash +cd /path/to/Paddle-examples-for-AVH/object_classification +bash run_demo.sh --model MobileNetV3 --device cortex-m55 +``` \ No newline at end of file diff --git a/object_classification/run_demo.sh b/object_classification/run_demo.sh index 1962408..4feb2e5 100644 --- a/object_classification/run_demo.sh +++ b/object_classification/run_demo.sh @@ -5,8 +5,8 @@ function show_usage() { cat <&2 + echo 'ERROR: --model requires a non-empty argument' >&2 show_usage >&2 exit 1 fi @@ -81,7 +81,7 @@ elif [ "$MODEL_NAME" == "PP_LCNet" ]; then mv PPLCNet_x0_75_infer "${PWD}/model" MODEL_NAME="PPLCNet" else - echo 'ERROR: --model_name only support MobileNetV3/PP_LCNet' >&2 + echo 'ERROR: --model only support MobileNetV3/PP_LCNet' >&2 exit 1 fi diff --git a/object_detection/run_demo.sh b/object_detection/run_demo.sh index ad5ff45..d9dbbdc 100644 --- a/object_detection/run_demo.sh +++ b/object_detection/run_demo.sh @@ -5,8 +5,8 @@ function show_usage() { cat <&2 + echo 'ERROR: --model requires a non-empty argument' >&2 show_usage >&2 exit 1 fi @@ -74,7 +74,7 @@ if [ "$MODEL_NAME" == "Picodet" ]; then rm -rf picodet_s_320_coco_lcnet_no_nms.tar mv picodet_s_320_coco_lcnet_no_nms model else - echo 'ERROR: --model_name only support Picodet' >&2 + echo 'ERROR: --model only support Picodet' >&2 exit 1 fi diff --git a/object_segmentation/run_demo.sh b/object_segmentation/run_demo.sh index aab68e5..7eb7aad 100644 --- a/object_segmentation/run_demo.sh +++ b/object_segmentation/run_demo.sh @@ -4,8 +4,9 @@ function show_usage() { cat <&2 + echo 'ERROR: --model requires a non-empty argument' >&2 show_usage >&2 exit 1 fi @@ -75,7 +76,7 @@ if [ "$MODEL_NAME" == "PP_HumanSeg" ]; then rm -rf __MACOSX MODEL_NAME="PPHumanSeg" else - echo 'ERROR: --model_name only support PP_HumanSeg' >&2 + echo 'ERROR: --model only support PP_HumanSeg' >&2 exit 1 fi diff --git a/ocr/text_angle_classification/run_demo.sh b/ocr/text_angle_classification/run_demo.sh index 6542e38..3b377a8 100644 --- a/ocr/text_angle_classification/run_demo.sh +++ b/ocr/text_angle_classification/run_demo.sh @@ -4,8 +4,9 @@ function show_usage() { cat <&2 + echo 'ERROR: --model requires a non-empty argument' >&2 show_usage >&2 exit 1 fi @@ -74,7 +75,7 @@ if [ "$MODEL_NAME" == "CH_PPOCRV2_CLS" ]; then mv ch_ppocr_mobile_v2.0_cls_infer model MODEL_NAME="CHPPOCRV2CLS" else - echo 'ERROR: --model_name only support CH_PPOCRV2_CLS' >&2 + echo 'ERROR: --model only support CH_PPOCRV2_CLS' >&2 exit 1 fi diff --git a/ocr/text_recognition/run_demo.sh b/ocr/text_recognition/run_demo.sh index e9dc883..acd27a3 100644 --- a/ocr/text_recognition/run_demo.sh +++ b/ocr/text_recognition/run_demo.sh @@ -4,8 +4,9 @@ function show_usage() { cat <&2 + echo 'ERROR: --model requires a non-empty argument' >&2 show_usage >&2 exit 1 fi @@ -75,7 +76,7 @@ if [ "$MODEL_NAME" == "EN_PPOCRV3_REC" ]; then rm ocr_en.tar MODEL_NAME="ENPPOCRV3REC" else - echo 'ERROR: --model_name only support EN_PPOCRV3_REC' >&2 + echo 'ERROR: --model only support EN_PPOCRV3_REC' >&2 exit 1 fi