diff --git a/docs/common/ai/qualcomm/_aotgan_qai-app-builder.mdx b/docs/common/ai/qualcomm/_aotgan_qai-app-builder.mdx
index f1efc1b11..e586c1800 100644
--- a/docs/common/ai/qualcomm/_aotgan_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_aotgan_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,134 +20,71 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+- 进入上游示例目录
-
+
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
+ ```bash
+ cd qai-appbuilder/samples
+ ```
- {" "}
+
-
-

- input image
-
+- 准备输入数据(示例自带输入文件时可直接运行;也可按脚本参数指定)
-
-

- mask image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 aotgan/aotgan.py
+ python3 ComputerVision/Image_Editing/aotgan/aotgan.py --chipset 9075
```
- ```bash
- $ python3 aotgan/aotgan.py
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 136.6ms [WARNING] Time: Read model file to memory. 21.49
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
+- 运行结果示意
+
+
+

+ mask image
+
+
+

+ output image
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 205.5ms [WARNING] Time: contextCreateFromBinary. 68.83
-
- 205.6ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 207.5ms [WARNING] Time: model_initialize aotgan 207.45
-
- 415.4ms [WARNING] Time: model_inference aotgan 154.66
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /usr/bin/xdg-open: 882: www-browser: not found
- /usr/bin/xdg-open: 882: links2: not found
- /usr/bin/xdg-open: 882: elinks: not found
- /usr/bin/xdg-open: 882: links: not found
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /usr/bin/xdg-open: 882: lynx: not found
- /usr/bin/xdg-open: 882: w3m: not found
- xdg-open: no method available for opening '/tmp/tmpjvwp3wzi.PNG'
- /usr/bin/xdg-open: 882: www-browser: not found
- /usr/bin/xdg-open: 882: links2: not found
- /usr/bin/xdg-open: 882: elinks: not found
- /usr/bin/xdg-open: 882: links: not found
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 801.6ms [WARNING] Time: model_destroy aotgan 67.93
-
- /usr/bin/xdg-open: 882: lynx: not found
- /usr/bin/xdg-open: 882: w3m: not found
- xdg-open: no method available for opening '/tmp/tmp0z61xxdt.PNG'
- ```
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载模型,耗时取决于网络。也可在 `samples` 目录使用启动器:
- {" "}
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model aotgan --args "--chipset 9075"
+```
-
-

- output image
-
+:::
diff --git a/docs/common/ai/qualcomm/_beit_qai-app-builder.mdx b/docs/common/ai/qualcomm/_beit_qai-app-builder.mdx
index 578c8484c..4b9a01239 100644
--- a/docs/common/ai/qualcomm/_beit_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_beit_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,107 +20,51 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+- 进入上游示例目录
-
+
-
-
-
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-- 准备输入图片,这里以以下图片为输入示例
+
- {" "}
+- 准备输入数据(示例自带输入文件时可直接运行;也可按脚本参数指定)
-
-

- input image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 beit/beit.py
+ python3 ComputerVision/Image_Classification/beit/beit.py --chipset 9075
```
- ```bash
- $ python3 beit/beit.py
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 179.0ms [WARNING] Time: Read model file to memory. 60.05
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 284.7ms [WARNING] Time: contextCreateFromBinary. 105.62
-
- 284.8ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 288.1ms [WARNING] Time: model_initialize beit 288.01
-
- 365.3ms [WARNING] Time: model_inference beit 17.72
-
- Top 5 predictions for image:
-
- "Samoyed", 0.6322221756
- "Pomeranian", 0.1098636836
- "Keeshond", 0.0410530604
- "Japanese Chin", 0.0093044275
- "Chow Chow", 0.0058453484
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载模型,耗时取决于网络。也可在 `samples` 目录使用启动器:
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 483.8ms [WARNING] Time: model_destroy beit 113.14
- ```
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model beit --args "--chipset 9075"
+```
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
+:::
diff --git a/docs/common/ai/qualcomm/_convnext_base_qai-app-builder.mdx b/docs/common/ai/qualcomm/_convnext_base_qai-app-builder.mdx
deleted file mode 100644
index 42f562dfb..000000000
--- a/docs/common/ai/qualcomm/_convnext_base_qai-app-builder.mdx
+++ /dev/null
@@ -1,140 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [ConvNext-Base](https://aihub.qualcomm.com/models/convnext_base)
-目标识别模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**配置 QAIRT 环境变量**](../qai-appbuilder#配置-qairt-环境变量) 配置 QAIRT 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 convnext_base/convnext_base.py
- ```
-
-
-
- ```bash
- $ python3 convnext_base/convnext_base.py
- Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/convnext_base
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 193.9ms [WARNING] Time: Read model file to memory. 71.69
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 269.5ms [WARNING] Time: contextCreateFromBinary. 75.47
-
- 269.5ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 270.9ms [WARNING] Time: model_initialize convnext_base 270.85
-
- 348.3ms [WARNING] Time: model_inference convnext_base 30.17
-
- Top 5 predictions for image:
-
- Samoyed 0.8726790547
- Pomeranian 0.0192712061
- keeshond 0.0150661934
- Japanese spaniel 0.0032834315
- Eskimo dog 0.0020474677
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 365.5ms [WARNING] Time: model_destroy convnext_base 14.44
- ```
-
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
diff --git a/docs/common/ai/qualcomm/_convnext_tiny_qai-app-builder.mdx b/docs/common/ai/qualcomm/_convnext_tiny_qai-app-builder.mdx
deleted file mode 100644
index 0a8cb4b20..000000000
--- a/docs/common/ai/qualcomm/_convnext_tiny_qai-app-builder.mdx
+++ /dev/null
@@ -1,140 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [ConvNext-Tiny](https://aihub.qualcomm.com/models/convnext_tiny)
-目标识别模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**配置 QAIRT 环境变量**](../qai-appbuilder#配置-qairt-环境变量) 配置 QAIRT 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 convnext_tiny/convnext_tiny.py
- ```
-
-
-
- ```bash
- $ python3 convnext_tiny/convnext_tiny.py
- Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/convnext_tiny
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 132.1ms [WARNING] Time: Read model file to memory. 15.88
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 176.1ms [WARNING] Time: contextCreateFromBinary. 44.01
-
- 176.2ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 176.6ms [WARNING] Time: model_initialize convnext_tiny 176.53
-
- 245.2ms [WARNING] Time: model_inference convnext_tiny 11.95
-
- Top 5 predictions for image:
-
- Samoyed 0.637629509
- Pomeranian 0.1382825226
- keeshond 0.0217001885
- Arctic fox 0.0138142202
- white wolf 0.0115938596
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 263.1ms [WARNING] Time: model_destroy convnext_tiny 15.29
- ```
-
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
diff --git a/docs/common/ai/qualcomm/_depth_anything_qai-app-builder.mdx b/docs/common/ai/qualcomm/_depth_anything_qai-app-builder.mdx
index 2387a2d08..5faf10b89 100644
--- a/docs/common/ai/qualcomm/_depth_anything_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_depth_anything_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,114 +20,61 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless matplotlib
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
+- 进入上游示例目录
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+
-
-
-
-
-
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-- 准备输入图片,这里以以下图片为输入示例
+
- {" "}
+- 准备输入数据(示例自带输入文件时可直接运行;也可按脚本参数指定)
-
-

- input image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 depth_anything/depth_anything.py
+ python3 ComputerVision/Depth_Estimation/depth_anything/depth_anything.py --chipset 9075
```
- ```bash
- $ python3 depth_anything/depth_anything.py
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 167.0ms [WARNING] Time: Read model file to memory. 37.39
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
+- 运行结果示意
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
+

+ output image
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 329.2ms [WARNING] Time: contextCreateFromBinary. 162.14
-
- 329.3ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 332.1ms [WARNING] Time: model_initialize depth_anything 332.05
-
- 576.7ms [WARNING] Time: model_inference depth_anything 145.90
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /usr/bin/xdg-open: 882: www-browser: not found
- /usr/bin/xdg-open: 882: links2: not found
- /usr/bin/xdg-open: 882: elinks: not found
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 877.6ms [WARNING] Time: model_destroy depth_anything 85.31
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载模型,耗时取决于网络。也可在 `samples` 目录使用启动器:
- /usr/bin/xdg-open: 882: links: not found
- /usr/bin/xdg-open: 882: lynx: not found
- /usr/bin/xdg-open: 882: w3m: not found
- xdg-open: no method available for opening '/tmp/tmp_3i4qa54.PNG'
- ```
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model depth_anything --args "--chipset 9075"
+```
-
-

- output image
-
+:::
diff --git a/docs/common/ai/qualcomm/_easy_ocr_qai-app-builder.mdx b/docs/common/ai/qualcomm/_easy_ocr_qai-app-builder.mdx
index a82d98dd9..11173451a 100644
--- a/docs/common/ai/qualcomm/_easy_ocr_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_easy_ocr_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,93 +20,78 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless easyocr
```
### 运行脚本
-- 进入示例目录
-
-
+- 进入上游示例目录
-
+
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-
+
-
+- 准备输入数据(示例自带 `ch_en.png` / `english.png`;也可通过 `--Image_Path` 指定)
-
+
+

+ input image
+
-- 准备输入图片,这里以以下图片为输入示例
+:::warning
+在 AIRbox Q900(QCS9075)上实测:上游 `easy_ocr.py` 里 `DataLoader(..., num_workers=1)` 会 **fork 子进程**,导致 QNN HTP context 被释放,识别阶段报错:
- {" "}
+```text
+RuntimeError: Cannot perform 'Inference': context 'EasyOCRRecognizer' has been released.
+```
-
-

- input image
-
+运行前请将 `Multimodal/Image_To_Text/easy_ocr/easy_ocr.py` 中所有 `num_workers=int(workers)` 改为 **`num_workers=0`**(或把 `recognizer_get_text` 的 `workers` 默认值改为 `0`)。
+:::
- 执行推理
```bash
- python3 easy_ocr/easy_ocr.py
+ python3 Multimodal/Image_To_Text/easy_ocr/easy_ocr.py --chipset 9075
```
- ```bash
- $ python3 easy_ocr/easy_ocr.py
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- Calling EasyOCR_Detector::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- Calling EasyOCR_Recognizer::Inference on NPU
- 白日依山尽
- 黄河入海流
- 欲穷千里目
- 更上一层楼
- The sun beyond the mountain glows,
- The Yellow River seawards flows_
- You can enjoy a grander sight,
- By climbing to a greater height。
-
- Demo image display is disabled by default for remote servers. To override, set `QAIHM_ALWAYS_DISPLAY_OUTPUT=1` in your environment.
-
- Saving image to /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/samples/python/build/image.png
- Logs will be sent to the system's default channel
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- ```
+成功时终端会打印识别到的中英文文本,例如(默认中英对照输入图):
+
+```text
+白日依山尽
+黄河入海流
+欲穷千里目
+更上一层楼
+The sun beyond the mountain glows,
+The Yellow River seawards flows_
+You can enjoy a grander sight,
+By climbing to a greater height。
+Saving image to .../samples/build/image.png
+```
- 识别结果
+:::tip
+首次运行会通过 Qualcomm® AI Hub 下载 Detector / Recognizer(含中英)模型,体积较大。也可在 `samples` 目录使用启动器(仍需先完成 `num_workers=0` 修改):
- ```bash
- 白日依山尽
- 黄河入海流
- 欲穷千里目
- 更上一层楼
- The sun beyond the mountain glows,
- The Yellow River seawards flows_
- You can enjoy a grander sight,
- By climbing to a greater height。
- ```
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model easy_ocr --args "--chipset 9075"
+```
+
+:::
diff --git a/docs/common/ai/qualcomm/_efficientnet_b0_qai-app-builder.mdx b/docs/common/ai/qualcomm/_efficientnet_b0_qai-app-builder.mdx
deleted file mode 100644
index 57413e03b..000000000
--- a/docs/common/ai/qualcomm/_efficientnet_b0_qai-app-builder.mdx
+++ /dev/null
@@ -1,140 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [EfficientNet-B0](https://aihub.qualcomm.com/models/efficientnet_b0)
-目标识别模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**创建 ADSP 环境变量**](../qai-appbuilder#创建-adsp-环境变量) 配置 ADSP 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 efficientnet_b0/efficientnet_b0.py
- ```
-
-
-
- ```bash
- $ python3 efficientnet_b0/efficientnet_b0.py
- Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/efficientnet_b0
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 122.3ms [WARNING] Time: Read model file to memory. 5.33
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 143.3ms [WARNING] Time: contextCreateFromBinary. 20.87
-
- 143.3ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 143.7ms [WARNING] Time: model_initialize efficientnet_b0 143.64
-
- 214.6ms [WARNING] Time: model_inference efficientnet_b0 6.08
-
- Top 5 predictions for image:
-
- Samoyed 0.6965298057
- Pomeranian 0.1052966565
- keeshond 0.0131986532
- Eskimo dog 0.0075131184
- Arctic fox 0.0056676473
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 235.9ms [WARNING] Time: model_destroy efficientnet_b0 18.66
- ```
-
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
diff --git a/docs/common/ai/qualcomm/_efficientnet_b4_qai-app-builder.mdx b/docs/common/ai/qualcomm/_efficientnet_b4_qai-app-builder.mdx
deleted file mode 100644
index 6389a7721..000000000
--- a/docs/common/ai/qualcomm/_efficientnet_b4_qai-app-builder.mdx
+++ /dev/null
@@ -1,141 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [EfficientNet-B4](https://aihub.qualcomm.com/models/efficientnet_b4)
-目标识别模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**创建 ADSP 环境变量**](../qai-appbuilder#创建-adsp-环境变量) 配置 ADSP 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 efficientnet_b4/efficientnet_b4.py
- ```
-
-
-
- ```bash
- $ python3 efficientnet_b4/efficientnet_b4.py
- Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/efficientnet_b4
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 134.2ms [WARNING] Time: Read model file to memory. 15.52
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 197.4ms [WARNING] Time: contextCreateFromBinary. 63.07
-
- 197.4ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 197.8ms [WARNING] Time: model_initialize efficientnet_b4 197.73
-
- 271.4ms [WARNING] Time: model_inference efficientnet_b4 12.60
-
- Top 5 predictions for image:
-
- Samoyed 0.9568610787
- Pomeranian 0.0066686491
- keeshond 0.0054634647
- chow 0.0010403089
- Eskimo dog 0.0007608762
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 287.8ms [WARNING] Time: model_destroy efficientnet_b4 13.65
-
- ```
-
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
diff --git a/docs/common/ai/qualcomm/_efficientnet_v2s_qai-app-builder.mdx b/docs/common/ai/qualcomm/_efficientnet_v2s_qai-app-builder.mdx
deleted file mode 100644
index b11c0c413..000000000
--- a/docs/common/ai/qualcomm/_efficientnet_v2s_qai-app-builder.mdx
+++ /dev/null
@@ -1,140 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [EfficientNet-V2-s](https://aihub.qualcomm.com/models/efficientnet_v2_s)
-目标识别模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**创建 ADSP 环境变量**](../qai-appbuilder#创建-adsp-环境变量) 配置 ADSP 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 efficientnet_v2_s/efficientnet_v2_s.py
- ```
-
-
-
- ```bash
- $ python3 efficientnet_v2_s/efficientnet_v2_s.py
- Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/efficientnet_v2_s
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 129.0ms [WARNING] Time: Read model file to memory. 11.18
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 158.9ms [WARNING] Time: contextCreateFromBinary. 29.89
-
- 159.0ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 159.4ms [WARNING] Time: model_initialize efficientnet_v2_s 159.34
-
- 227.4ms [WARNING] Time: model_inference efficientnet_v2_s 10.06
-
- Top 5 predictions for image:
-
- Samoyed 0.7607400417
- keeshond 0.0230328161
- Pomeranian 0.0204458293
- white wolf 0.0193288065
- Arctic fox 0.0062915389
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 239.8ms [WARNING] Time: model_destroy efficientnet_v2_s 9.40
- ```
-
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
diff --git a/docs/common/ai/qualcomm/_face_attrib_net_qai-app-builder.mdx b/docs/common/ai/qualcomm/_face_attrib_net_qai-app-builder.mdx
index d87d10c01..337243073 100644
--- a/docs/common/ai/qualcomm/_face_attrib_net_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_face_attrib_net_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,253 +20,54 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+- 进入上游示例目录
-
+
-
-
-
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-- 准备输入图片,这里以以下图片为输入示例
+
- {" "}
+- 准备输入数据(示例自带输入文件时可直接运行;也可按脚本参数指定)
-
-

- input image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 face_attrib_net/face_attrib_net.py --image ./face_attrib_net/test.jpeg
+ python3 ComputerVision/Face_Recognition/face_attrib_net/face_attrib_net.py --chipset 9075
```
- ```bash
- $ python3 face_attrib_net/face_attrib_net.py --image ./face_attrib_net/test.jpeg
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 138.8ms [WARNING] Time: Read model file to memory. 17.12
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 171.9ms [WARNING] Time: contextCreateFromBinary. 33.00
-
- 172.0ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 173.7ms [WARNING] Time: model_initialize face_attrib_net 173.70
-
- 206.7ms [WARNING] Time: model_inference face_attrib_net 2.68
-
- Model outputs are saved at: /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/samples/python/face_attrib_net/build/output.json
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 304.2ms [WARNING] Time: model_destroy face_attrib_net 91.15
- ```
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载模型,耗时取决于网络。也可在 `samples` 目录使用启动器:
-- 识别结果
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model face_attrib_net --args "--chipset 9075"
+```
- ```json
- {
- "id_feature": [
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -110208.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -65472.00390625,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 85824.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -9096.0009765625, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 73472.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -87232.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -109696.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -31408.001953125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -50720.00390625,
- 131008.0078125, 131008.0078125, 95104.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, -68864.0078125, -131008.0078125, -28160.001953125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -629.5000610351562, 131008.0078125,
- -131008.0078125, 131008.0078125, 116608.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -102656.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- -28240.001953125, 131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -39840.00390625, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -40992.00390625, -131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 111232.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 73920.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, -131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, 65184.00390625, -131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -129472.0078125, -131008.0078125, -131008.0078125, -131008.0078125,
- 131008.0078125, -131008.0078125, 131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125,
- 131008.0078125, 131008.0078125, -131008.0078125, -131008.0078125,
- -131008.0078125, 131008.0078125, 131008.0078125, 131008.0078125
- ],
- "liveness_feature": [
- 10344.0009765625, 22816.001953125, -4112.00048828125, -13632.0009765625,
- 8156.00048828125, -15176.0009765625, 7100.00048828125, 19952.001953125,
- 7816.00048828125, 17936.001953125, -2642.000244140625, -3474.000244140625,
- -1823.0001220703125, 4340.00048828125, 8304.0009765625, 6308.00048828125,
- 25936.001953125, -5192.00048828125, 7112.00048828125, 3862.000244140625,
- 12288.0009765625, 2606.000244140625, -11192.0009765625, -8352.0009765625,
- 8132.00048828125, 19664.001953125, -2890.000244140625, 1288.0001220703125,
- -7612.00048828125, -19664.001953125, 2094.000244140625, -10056.0009765625
- ],
- "eye_closeness": [131008.0078125, -131008.0078125],
- "glasses": [76608.0078125, -79488.0078125],
- "mask": [-86208.0078125, 67264.0078125],
- "sunglasses": [0.9985352158546448, 0.0]
- }
- ```
+:::
diff --git a/docs/common/ai/qualcomm/_facemap_3dmm_qai-app-builder.mdx b/docs/common/ai/qualcomm/_facemap_3dmm_qai-app-builder.mdx
index 488820ddf..cc01d1f39 100644
--- a/docs/common/ai/qualcomm/_facemap_3dmm_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_facemap_3dmm_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,122 +20,66 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless scikit-image onnxruntime
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
+- 进入上游示例目录
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+
-
-
-
-
-
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-- 准备输入图片,这里以以下图片为输入示例
+
- {" "}
+- 准备输入数据(示例自带输入文件时可直接运行;也可按脚本参数指定)
-
-

- input image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 facemap_3dmm/facemap_3dmm.py
+ python3 ComputerVision/Face_Recognition/facemap_3dmm/facemap_3dmm.py --chipset 9075
```
- ```bash
- $ python3 facemap_3dmm/facemap_3dmm.py
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 120.2ms [WARNING] Time: Read model file to memory. 9.63
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
+在 AIRbox Q900 上,示例可能优先加载 ONNX float 模型(需 `onnxruntime`),成功后生成 `output.jpg`,并打印类似 `ONNX model inference time: ... ms`。
- 0.0ms [WARNING] This META does not have Alloc2 Support
+- 运行结果示意
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
+

+ output image
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 138.7ms [WARNING] Time: contextCreateFromBinary. 18.41
-
- 138.8ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 140.3ms [WARNING] Time: model_initialize facemap_3dmm 140.23
-
- 182.0ms [WARNING] Time: model_inference facemap_3dmm 1.43
-
- /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/samples/python/facemap_3dmm/facemap_3dmm.py:145: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at /pytorch/torch/csrc/utils/tensor_new.cpp:253.)
- _output = torch.tensor(output)
- Saving image to /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/samples/python/facemap_3dmm/output.jpg
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /usr/bin/xdg-open: 882: www-browser: not found
- /usr/bin/xdg-open: 882: links2: not found
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 706.9ms [WARNING] Time: model_destroy facemap_3dmm 72.10
-
- /usr/bin/xdg-open: 882: elinks: not found
- /usr/bin/xdg-open: 882: links: not found
- /usr/bin/xdg-open: 882: lynx: not found
- /usr/bin/xdg-open: 882: w3m: not found
- xdg-open: no method available for opening '/tmp/tmpkpcumu3y.PNG'
- ```
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载模型,耗时取决于网络。也可在 `samples` 目录使用启动器:
- {" "}
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model facemap_3dmm --args "--chipset 9075"
+```
-
-

- output image
-
+:::
diff --git a/docs/common/ai/qualcomm/_fcn-resnet50_qai-app-builder.mdx b/docs/common/ai/qualcomm/_fcn-resnet50_qai-app-builder.mdx
deleted file mode 100644
index f67e4be3d..000000000
--- a/docs/common/ai/qualcomm/_fcn-resnet50_qai-app-builder.mdx
+++ /dev/null
@@ -1,142 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [FCN-ResNet50](https://aihub.qualcomm.com/compute/models/fcn_resnet50)
-图像分割模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**创建 ADSP 环境变量**](../qai-appbuilder#创建-adsp-环境变量) 配置 ADSP 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 fcn_resnet50/fcn_resnet50.py --image ./input.jpg
- ```
-
-
-
- ```bash
- $ python3 fcn_resnet50/fcn_resnet50.py --image ./input.jpg
- Current file directory: /mnt/ssd/git_clone/ai-engine-direct-helper/samples/linux/python/fcn_resnet50
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 127.2ms [WARNING] Time: Read model file to memory. 12.72
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 185.9ms [WARNING] Time: contextCreateFromBinary. 58.58
-
- 186.0ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 187.1ms [WARNING] Time: model_initialize fcn_resnet50 187.09
-
- 385.4ms [WARNING] Time: model_inference fcn_resnet50 112.79
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 463.2ms [WARNING] Time: model_destroy fcn_resnet50 10.20
- ```
-
-- 输出结果
-
-
-

- output image
-
diff --git a/docs/common/ai/qualcomm/_googlenet_qai-app-builder.mdx b/docs/common/ai/qualcomm/_googlenet_qai-app-builder.mdx
index 49ff3fabc..29a5766c3 100644
--- a/docs/common/ai/qualcomm/_googlenet_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_googlenet_qai-app-builder.mdx
@@ -3,11 +3,11 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
-| Dragon Q6A | QCS6490 |
+| 设备 | SoC |
+| -------------------- | -------- |
+| Dragon Q6A | QCS6490 |
| Dragon Q8B | SC8280XP |
-| Fogwise® AIRbox Q900 | QCS9075 |
+| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -22,133 +22,95 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
+- 进入上游示例目录
-- 执行推理
-
-
+
```bash
- python3 googlenet/googlenet.py
+ cd qai-appbuilder/samples
```
-
-
- ```bash
- $ python3 googlenet/googlenet.py
- 0.0ms [WARNING] Initializing HtpProvider
+
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
+执行推理(Linux 需指定 `--chipset`;首次运行会自动下载测试图 `dog.jpg`、标签与模型)
- 0.0ms [WARNING] This META does not have Alloc2 Support
+:::tip
+若自动下载的 `dog.jpg` 为空或损坏,可用本地有效图片覆盖,或通过 `--image /path/to/image.jpg` 指定输入。
+:::
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 157.6ms [WARNING] Time: Read model file to memory. 8.91
+```bash
+python3 ComputerVision/Image_Classification/googlenet/googlenet.py --chipset 6490
+```
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+:::tip
+SC8280XP 与 QCS6490 同为 Hexagon V68,下载模型时使用 `--chipset 6490`。
+:::
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+```bash
+python3 ComputerVision/Image_Classification/googlenet/googlenet.py --chipset 6490
+```
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
+
- 180.6ms [WARNING] Time: contextCreateFromBinary. 22.97
+
- 180.7ms [WARNING] Time: UnmapViewOfFile. 0.00
+```bash
+python3 ComputerVision/Image_Classification/googlenet/googlenet.py --chipset 9075
+```
- 181.6ms [WARNING] Time: model_initialize googlenet 181.55
+
- 255.7ms [WARNING] Time: model_inference googlenet 2.67
+
+
- Top 5 predictions for image:
+### 预期结果
- Samoyed 0.948613584
- West Highland White Terrier 0.0060515446
- Alaskan tundra wolf 0.0052576731
- Pomeranian 0.0047871661
- Chow Chow 0.0035575195
- 0.0ms [WARNING] This META does not have Alloc2 Support
+在 Dragon Q6A(`--chipset 6490`)上,默认测试图输出类似:
- 0.0ms [WARNING] This META does not have Alloc2 Support
+```text
+Top 5 predictions for image:
- 0.0ms [WARNING] This META does not have Alloc2 Support
+Samoyed 0.9282982349
+West Highland White Terrier 0.0102122389
+Pomeranian 0.0064557223
+Pyrenean Mountain Dog 0.0059806537
+Chow Chow 0.0051328284
+```
- 0.0ms [WARNING] This META does not have Alloc2 Support
+日志中可能出现 HTP / FastRPC 相关 WARNING,推理成功时可忽略。
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 353.7ms [WARNING] Time: model_destroy googlenet 93.43
+:::tip
+也可使用启动器:
- ```
+```bash
+python3 run_inference.py --model googlenet --args "--chipset 6490"
+```
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
+:::
diff --git a/docs/common/ai/qualcomm/_inception_v3_qai-app-builder.mdx b/docs/common/ai/qualcomm/_inception_v3_qai-app-builder.mdx
index ebfc1059b..3521fcb7c 100644
--- a/docs/common/ai/qualcomm/_inception_v3_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_inception_v3_qai-app-builder.mdx
@@ -3,11 +3,11 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
-| Dragon Q6A | QCS6490 |
+| 设备 | SoC |
+| -------------------- | -------- |
+| Dragon Q6A | QCS6490 |
| Dragon Q8B | SC8280XP |
-| Fogwise® AIRbox Q900 | QCS9075 |
+| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -22,132 +22,101 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
+- 进入上游示例目录
-
+
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
+ ```bash
+ cd qai-appbuilder/samples
+ ```
- {" "}
+
-
-

- input image
-
+执行推理(Linux 需指定 `--chipset`;可选用示例自带 `input.jpg`)
-- 执行推理
+
-
+
- ```bash
- python3 inception_v3/inception_v3.py --image ./inception_v3/input.jpg
- ```
+
-
+```bash
+python3 ComputerVision/Image_Classification/inception_v3/inception_v3.py --chipset 6490
+```
- ```bash
- $ python3 inception_v3/inception_v3.py --image ./inception_v3/input.jpg
- 0.0ms [WARNING] Initializing HtpProvider
+
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+:::tip
+SC8280XP 与 QCS6490 同为 Hexagon V68,下载模型时使用 `--chipset 6490`。
+:::
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 221.6ms [WARNING] Time: Read model file to memory. 17.28
+```bash
+python3 ComputerVision/Image_Classification/inception_v3/inception_v3.py --chipset 6490
+```
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+```bash
+python3 ComputerVision/Image_Classification/inception_v3/inception_v3.py --chipset 9075
+```
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
+
- 258.5ms [WARNING] Time: contextCreateFromBinary. 36.82
+
- 258.5ms [WARNING] Time: UnmapViewOfFile. 0.00
+可选指定图片:
- 260.2ms [WARNING] Time: model_initialize inceptionV3 260.14
+```bash
+python3 ComputerVision/Image_Classification/inception_v3/inception_v3.py --chipset 6490 --image ComputerVision/Image_Classification/inception_v3/input.jpg
+```
- 332.1ms [WARNING] Time: model_inference inceptionV3 3.50
+### 预期结果
- Top 5 predictions for image:
+在 Dragon Q6A(`--chipset 6490`)上,默认输入图输出类似:
- Samoyed 0.9998983145
- Arctic fox 0.000054331
- white wolf 0.0000345349
- Eskimo dog 0.0000035142
- Pomeranian 0.0000030651
- 0.0ms [WARNING] This META does not have Alloc2 Support
+```text
+Top 5 predictions for image:
- 0.0ms [WARNING] This META does not have Alloc2 Support
+Samoyed 0.999714911
+white wolf 0.0001396882
+Arctic fox 0.0001165446
+Pomeranian 0.000006424
+Great Pyrenees 0.000006424
+```
- 0.0ms [WARNING] This META does not have Alloc2 Support
+日志中可能出现 HTP / FastRPC 相关 WARNING,推理成功时可忽略。
- 0.0ms [WARNING] This META does not have Alloc2 Support
+:::tip
+也可使用启动器:
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 443.3ms [WARNING] Time: model_destroy inceptionV3 105.74
- ```
+```bash
+python3 run_inference.py --model inception_v3 --args "--chipset 6490"
+```
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
+:::
diff --git a/docs/common/ai/qualcomm/_lama_dilated_qai-app-builder.mdx b/docs/common/ai/qualcomm/_lama_dilated_qai-app-builder.mdx
index 0020996bd..1e949af3b 100644
--- a/docs/common/ai/qualcomm/_lama_dilated_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_lama_dilated_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,133 +20,71 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+- 进入上游示例目录
-
+
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
+ ```bash
+ cd qai-appbuilder/samples
+ ```
- {" "}
+
-
-

- input image
-
+- 准备输入数据(示例自带输入文件时可直接运行;也可按脚本参数指定)
-
-

- mask image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 lama_dilated/lama_dilated.py
+ python3 ComputerVision/Image_Editing/lama_dilated/lama_dilated.py --chipset 9075
```
- ```bash
- $ python3 lama_dilated/lama_dilated.py
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 167.7ms [WARNING] Time: Read model file to memory. 39.91
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
+- 运行结果示意
+
+
+

+ mask image
+
+
+

+ output image
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 255.5ms [WARNING] Time: contextCreateFromBinary. 87.63
-
- 255.5ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 257.3ms [WARNING] Time: model_initialize lamadilated 257.28
-
- 406.4ms [WARNING] Time: model_inference lamadilated 103.83
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /usr/bin/xdg-open: 882: www-browser: not found
- /usr/bin/xdg-open: 882: links2: not found
- /usr/bin/xdg-open: 882: elinks: not found
- /usr/bin/xdg-open: 882: links: not found
- /usr/bin/xdg-open: 882: lynx: not found
- /usr/bin/xdg-open: 882: w3m: not found
- xdg-open: no method available for opening '/tmp/tmp0t30nvk9.PNG'
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /usr/bin/xdg-open: 882: www-browser: not found
- /usr/bin/xdg-open: 882: links2: not found
- /usr/bin/xdg-open: 882: elinks: not found
- /usr/bin/xdg-open: 882: links: not found
- /usr/bin/xdg-open: 882: lynx: not found
- /usr/bin/xdg-open: 882: w3m: not found
- xdg-open: no method available for opening '/tmp/tmpd98hfol8.PNG'
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 978.3ms [WARNING] Time: model_destroy lamadilated 103.66
- ```
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载模型,耗时取决于网络。也可在 `samples` 目录使用启动器:
- {" "}
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model lama_dilated --args "--chipset 9075"
+```
-
-

- output image
-
+:::
diff --git a/docs/common/ai/qualcomm/_levit_qai-app-builder.mdx b/docs/common/ai/qualcomm/_levit_qai-app-builder.mdx
deleted file mode 100644
index 6badd8593..000000000
--- a/docs/common/ai/qualcomm/_levit_qai-app-builder.mdx
+++ /dev/null
@@ -1,140 +0,0 @@
-此文档讲述使用 [QAI AppBuilder](../qai-appbuilder) Python API 利用 Qualcomm® Hexagon™ Processor (NPU) 推理 [EfficientNet-V2-s](https://aihub.qualcomm.com/models/efficientnet_v2_s)
-目标识别模型。
-
-**示例支持设备**
-
-| 设备 | SoC |
-| ---------- | ----- |
-| Dragon Q6A | QCS6490 |
-| Dragon Q8B | SC8280XP |
-
-## 安装 QAI AppBuilder
-
-:::tip
-
-1. 请根据 [**QAI AppBuilder 安装方法**](../qai-appbuilder) 安装 QAI AppBuilder。
-
-2. 请根据 [**创建 ADSP 环境变量**](../qai-appbuilder#创建-adsp-环境变量) 配置 ADSP 环境变量。
- :::
-
-## 运行示例
-
-### 安装依赖
-
-
-
-```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
-```
-
-
-
-### 运行脚本
-
-- 进入示例目录
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-
-
- ```bash
- cd ai-engine-direct-helper/samples/linux/python
- ```
-
-
-
-
-
-
-
-- 准备输入图片,这里以以下图片为输入示例
-
- {" "}
-
-
-

- input image
-
-
-- 执行推理
-
-
-
- ```bash
- python3 levit/levit.py
- ```
-
-
-
- ```bash
- $ python3 levit/levit.py
- Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/levit
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 120.8ms [WARNING] Time: Read model file to memory. 4.10
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 147.6ms [WARNING] Time: contextCreateFromBinary. 26.69
-
- 147.6ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 148.5ms [WARNING] Time: model_initialize levit 148.48
-
- 226.3ms [WARNING] Time: model_inference levit 5.23
-
- Top 5 predictions for image:
-
- Samoyed 0.6532489061
- Pomeranian 0.0412057079
- acorn 0.013004588
- wallaby 0.007310994
- keeshond 0.0034880731
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 239.0ms [WARNING] Time: model_destroy levit 10.01
- ```
-
- 打印结果可以看到 `Samoyed` 置信度最高,这与输入图片内容吻合。
diff --git a/docs/common/ai/qualcomm/_mediapipe_hand_qai-app-builder.mdx b/docs/common/ai/qualcomm/_mediapipe_hand_qai-app-builder.mdx
index 2deb98ef3..bd23d734b 100644
--- a/docs/common/ai/qualcomm/_mediapipe_hand_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_mediapipe_hand_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,153 +20,79 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models pygame
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless pygame
```
-### 运行脚本
-
-- 进入示例目录
+脚本还会在 `~/.qaihm` 下查找 [MediaPipePyTorch](https://github.com/zmurez/MediaPipePyTorch)(提供 `blazepalm` 等模块)。若缺失可:
-
+
-
+```bash
+mkdir -p ~/.qaihm
+git clone --depth 1 https://github.com/zmurez/MediaPipePyTorch.git ~/.qaihm/MediaPipePyTorch
+```
-
+
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+### 运行脚本
-
+- 进入上游示例目录
-
+
-
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-- 准备输入图片,这里以以下图片为输入示例
+
- {" "}
+- 准备输入数据(无摄像头界面时需 GUI;无界面环境请用静态图片)
-
-

- input image
-
+
+

+ input image
+
- 执行推理
```bash
- python3 mediapipe_hand/mediapipe_hand.py --imagefile ./mediapipe_hand/hand.jpg
+ python3 ComputerVision/Pose_Estimation/mediapipe_hand/mediapipe_hand.py \
+ --chipset 9075 \
+ --imagefile /path/to/hand_image.png \
+ --displayPredict False \
+ --DemoMode False
```
- ```bash
- $ python3 mediapipe_hand/mediapipe_hand.py --imagefile ./mediapipe_hand/hand.jpg
- /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/.venv/lib/python3.12/site-packages/pygame/pkgdata.py:25: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
- from pkg_resources import resource_stream, resource_exists
- pygame 2.6.1 (SDL 2.28.4, Python 3.12.3)
- Hello from the pygame community. https://www.pygame.org/contribute.html
- Press ESC key to exit if you are opening camera app.
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 110.2ms [WARNING] Time: Read model file to memory. 2.70
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 133.4ms [WARNING] Time: contextCreateFromBinary. 23.04
-
- 133.4ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 133.9ms [WARNING] Time: model_initialize hand_detector 133.82
+- 运行结果示意:目录下生成 `output.jpg`
- 191.3ms [WARNING] Time: Read model file to memory. 3.24
+
+

+ output image
+
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 204.0ms [WARNING] Time: contextCreateFromBinary. 12.63
-
- 204.1ms [WARNING] Time: UnmapViewOfFile. 0.00
-
- 205.1ms [WARNING] Time: model_initialize landmark_detector 17.40
-
- 242.5ms [WARNING] Time: model_inference hand_detector 2.86
-
- 255.1ms [WARNING] Time: model_inference landmark_detector 2.10
-
- /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/samples/python/mediapipe_hand/mediapipe_hand.py:906: DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
- out_image = Image.fromarray(pred_image[0], "RGB")
-
- Demo image display is disabled by default for remote servers. To override, set `QAIHM_ALWAYS_DISPLAY_OUTPUT=1` in your environment.
-
- Saving image to /mnt/ssd/qualcomm/702/zzf_fork/test/ai-engine-direct-helper/samples/python/build/image.png
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 314.1ms [WARNING] Time: model_destroy hand_detector 11.84
-
- Logs will be sent to the system's default channel
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
- 389.4ms [WARNING] Time: model_destroy landmark_detector 75.05
- ```
+:::tip
+首次运行会通过 Qualcomm® AI Hub 自动下载 `handdetector` 与 `landmarkdetector` 模型。无界面时请使用 `--imagefile`,并推荐安装 `opencv-python-headless` 以避免 Qt 插件初始化失败。
- {" "}
+```bash
+python3 run_inference.py --list
+python3 run_inference.py --model mediapipe_hand --args "--chipset 9075 --imagefile /path/to/hand_image.png --displayPredict False --DemoMode False"
+```
-
-

- output image
-
+:::
diff --git a/docs/common/ai/qualcomm/_nomic_embed_text_qai-app-builder.mdx b/docs/common/ai/qualcomm/_nomic_embed_text_qai-app-builder.mdx
index 5409de135..5dfe77097 100644
--- a/docs/common/ai/qualcomm/_nomic_embed_text_qai-app-builder.mdx
+++ b/docs/common/ai/qualcomm/_nomic_embed_text_qai-app-builder.mdx
@@ -3,8 +3,8 @@
**示例支持设备**
-| 设备 | SoC |
-| -------------------- | ----- |
+| 设备 | SoC |
+| -------------------- | ------- |
| Fogwise® AIRbox Q900 | QCS9075 |
## 安装 QAI AppBuilder
@@ -20,219 +20,46 @@
### 安装依赖
+在已激活的虚拟环境中安装示例依赖:
+
```bash
-pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models transformers
+pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless transformers
```
### 运行脚本
-- 进入示例目录
-
-
-
-
-
-
+- 进入上游示例目录
- ```bash
- cd ai-engine-direct-helper/samples/python
- ```
+
-
-
-
+ ```bash
+ cd qai-appbuilder/samples
+ ```
-
+
- 执行推理
```bash
- python3 nomic_embed_text/nomic_embed_text.py
+ python3 Multimodal/Text_Generation/nomic_embed_text/nomic_embed_text.py --chipset 9075
```
- ```bash
- $ python3 nomic_embed_text/nomic_embed_text.py
- 0.0ms [WARNING] Initializing HtpProvider
-
- /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 226.8ms [WARNING] Time: Read model file to memory. 107.40
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING] This META does not have Alloc2 Support
-
- 0.0ms [WARNING]