Skip to content

Commit 0beefe6

Browse files
authored
Merge pull request #1037 from EESN-W/dragon-q6a
feat: dragon q6a npu dev demos
2 parents 9c92d5a + 3259306 commit 0beefe6

File tree

58 files changed

+2084
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2084
-38
lines changed

docs/common/radxa-os/build-system/_install_env.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
主要介绍 U-Boot、Kernel、RadxaOS 开发的环境搭建。
1+
主要介绍 {props?.items ?? 'U-Boot、Kernel and Radxa OS'} 开发的环境搭建。
22

33
## 使用前提
44

@@ -10,7 +10,7 @@
1010

1111
## 环境搭建
1212

13-
我们需要在 PC 上安装 Visual Studio Code、Dev Container 拓展插件和 Docker,方便快速构建 U-Boot、Kernel、RadxaOS 的编译和开发环境。
13+
我们需要在 PC 上安装 Visual Studio Code、Dev Container 拓展插件和 Docker,方便快速构建 {props?.items ?? 'U-Boot、Kernel and Radxa OS'} 的编译和开发环境。
1414

1515
### Docker
1616

docs/dragon/q6a/faq.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,29 @@ newgrp dialout
5555
</NewCodeBlock>
5656

5757
3. 检查串口设备是否被其他程序占用
58+
59+
## 为什么 Radxa OS 默认使用 GDM 而不是 SDDM?
60+
61+
Radxa OS 默认使用 GDM(GNOME Display Manager)替代 SDDM(Simple Desktop Display Manager),主要原因如下:
62+
63+
**SDDM 的局限性:**
64+
65+
- 在 HDMI 未连接的 headless 模式下,SDDM 无法正常启动图形界面
66+
- 这会导致用户无法通过远程桌面或 VNC 等方式登录系统
67+
68+
**GDM 的优势:**
69+
70+
- 在各种连接状态下(包括 headless 模式)都能稳定运行
71+
- 提供更好的兼容性和可靠性
72+
73+
如果您希望切换回 SDDM,请按以下步骤操作:
74+
75+
<NewCodeBlock tip="Linux$" type="host">
76+
77+
```bash
78+
sudo dpkg-reconfigure sddm
79+
```
80+
81+
</NewCodeBlock>
82+
83+
在弹出的配置界面中,选择 `sddm` 作为默认显示管理器,然后重启系统即可使更改生效。

docs/dragon/q6a/low-dev/build-system/install-env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import InstallEnv from '../../../../common/radxa-os/build-system/\_install_env.m
66

77
# 环境搭建
88

9-
<InstallEnv />
9+
<InstallEnv items="Kernel and Radxa OS" />

i18n/en/docusaurus-plugin-content-docs/current/common/ai/_aotgan_qai-app-builder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Pytho
1010

1111
:::tip
1212

13-
1. Please install QAI AppBuilder according to the [**QAI AppBuilder Installation Guide**](../qai-appbuilder).
13+
1. Please install QAI AppBuilder according to [**QAI AppBuilder Installation Guide**](../qai-appbuilder#installation-methods).
1414

15-
2. Configure QAIRT environment variables as described in [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
15+
2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
1616
:::
1717

1818
## Run the Example

i18n/en/docusaurus-plugin-content-docs/current/common/ai/_beit_qai-app-builder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Pytho
1010

1111
:::tip
1212

13-
1. Please install QAI AppBuilder according to the [**QAI AppBuilder Installation Guide**](../qai-appbuilder).
13+
1. Please install QAI AppBuilder according to [**QAI AppBuilder Installation Guide**](../qai-appbuilder#installation-methods).
1414

15-
2. Configure QAIRT environment variables as described in [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
15+
2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
1616
:::
1717

1818
## Run the Example
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
This document describes using the [QAI AppBuilder](../qai-appbuilder) Python API to perform inference with the [ConvNext-Base](https://aihub.qualcomm.com/models/convnext_base)
2+
target recognition model using Qualcomm® Hexagon™ Processor (NPU).
3+
4+
**Supported Devices**
5+
6+
| Device | SoC |
7+
| ---------- | ------- |
8+
| Dragon Q6A | QCS6490 |
9+
10+
## Install QAI AppBuilder
11+
12+
:::tip
13+
14+
1. Please install QAI AppBuilder according to [**QAI AppBuilder Installation Guide**](../qai-appbuilder#installation-methods).
15+
16+
2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
17+
:::
18+
19+
## Run Example
20+
21+
### Install Dependencies
22+
23+
<NewCodeBlock tip="Device" type="device">
24+
25+
```bash
26+
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
27+
```
28+
29+
</NewCodeBlock>
30+
31+
### Run Script
32+
33+
- Navigate to the example directory
34+
35+
<Tabs>
36+
37+
<TabItem value="QCS6490">
38+
39+
<NewCodeBlock tip="Device" type="device">
40+
41+
```bash
42+
cd ai-engine-direct-helper/samples/linux/python
43+
```
44+
45+
</NewCodeBlock>
46+
47+
</TabItem>
48+
49+
</Tabs>
50+
51+
- Prepare input image, using the following image as input example
52+
53+
{" "}
54+
55+
<div style={{ textAlign: "center" }}>
56+
<img src="/en/img/dragon/q6a/test_image.webp" style={{ width: "65%" }} />
57+
input image
58+
</div>
59+
60+
- Execute inference
61+
62+
<NewCodeBlock tip="Device" type="device">
63+
64+
```bash
65+
python3 convnext_base/convnext_base.py
66+
```
67+
68+
</NewCodeBlock>
69+
70+
```bash
71+
$ python3 convnext_base/convnext_base.py
72+
Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/convnext_base
73+
0.0ms [WARNING] <W> Initializing HtpProvider
74+
75+
/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
76+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
77+
78+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
79+
80+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
81+
82+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
83+
84+
193.9ms [WARNING] Time: Read model file to memory. 71.69
85+
86+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
87+
88+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
89+
90+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
91+
92+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
93+
94+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
95+
96+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
97+
98+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
99+
100+
269.5ms [WARNING] Time: contextCreateFromBinary. 75.47
101+
102+
269.5ms [WARNING] Time: UnmapViewOfFile. 0.00
103+
104+
270.9ms [WARNING] Time: model_initialize convnext_base 270.85
105+
106+
348.3ms [WARNING] Time: model_inference convnext_base 30.17
107+
108+
Top 5 predictions for image:
109+
110+
Samoyed 0.8726790547
111+
Pomeranian 0.0192712061
112+
keeshond 0.0150661934
113+
Japanese spaniel 0.0032834315
114+
Eskimo dog 0.0020474677
115+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
116+
117+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
118+
119+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
120+
121+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
122+
123+
/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
124+
365.5ms [WARNING] Time: model_destroy convnext_base 14.44
125+
```
126+
127+
The printed results show that `Samoyed` has the highest confidence, which matches the input image content.
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
This document describes using the [QAI AppBuilder](../qai-appbuilder) Python API to perform inference with the [ConvNext-Tiny](https://aihub.qualcomm.com/models/convnext_tiny)
2+
target recognition model using Qualcomm® Hexagon™ Processor (NPU).
3+
4+
**Supported Devices**
5+
6+
| Device | SoC |
7+
| ---------- | ------- |
8+
| Dragon Q6A | QCS6490 |
9+
10+
## Install QAI AppBuilder
11+
12+
:::tip
13+
14+
1. Please install QAI AppBuilder according to [**QAI AppBuilder Installation Guide**](../qai-appbuilder).
15+
16+
2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder).
17+
:::
18+
19+
## Run Example
20+
21+
### Install Dependencies
22+
23+
<NewCodeBlock tip="Device" type="device">
24+
25+
```bash
26+
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
27+
```
28+
29+
</NewCodeBlock>
30+
31+
### Run Script
32+
33+
- Navigate to the example directory
34+
35+
<Tabs>
36+
37+
<TabItem value="QCS6490">
38+
39+
<NewCodeBlock tip="Device" type="device">
40+
41+
```bash
42+
cd ai-engine-direct-helper/samples/linux/python
43+
```
44+
45+
</NewCodeBlock>
46+
47+
</TabItem>
48+
49+
</Tabs>
50+
51+
- Prepare input image, using the following image as input example
52+
53+
{" "}
54+
55+
<div style={{ textAlign: "center" }}>
56+
<img src="/en/img/dragon/q6a/test_image.webp" style={{ width: "65%" }} />
57+
input image
58+
</div>
59+
60+
- Execute inference
61+
62+
<NewCodeBlock tip="Device" type="device">
63+
64+
```bash
65+
python3 convnext_tiny/convnext_tiny.py
66+
```
67+
68+
</NewCodeBlock>
69+
70+
```bash
71+
$ python3 convnext_tiny/convnext_tiny.py
72+
Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/convnext_tiny
73+
0.0ms [WARNING] <W> Initializing HtpProvider
74+
75+
/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
76+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
77+
78+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
79+
80+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
81+
82+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
83+
84+
132.1ms [WARNING] Time: Read model file to memory. 15.88
85+
86+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
87+
88+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
89+
90+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
91+
92+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
93+
94+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
95+
96+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
97+
98+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
99+
100+
176.1ms [WARNING] Time: contextCreateFromBinary. 44.01
101+
102+
176.2ms [WARNING] Time: UnmapViewOfFile. 0.00
103+
104+
176.6ms [WARNING] Time: model_initialize convnext_tiny 176.53
105+
106+
245.2ms [WARNING] Time: model_inference convnext_tiny 11.95
107+
108+
Top 5 predictions for image:
109+
110+
Samoyed 0.637629509
111+
Pomeranian 0.1382825226
112+
keeshond 0.0217001885
113+
Arctic fox 0.0138142202
114+
white wolf 0.0115938596
115+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
116+
117+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
118+
119+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
120+
121+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
122+
123+
/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
124+
263.1ms [WARNING] Time: model_destroy convnext_tiny 15.29
125+
```
126+
127+
The printed results show that `Samoyed` has the highest confidence, which matches the input image content.
128+
129+
---

i18n/en/docusaurus-plugin-content-docs/current/common/ai/_depth_anything_qai-app-builder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Pytho
1010

1111
:::tip
1212

13-
1. Please install QAI AppBuilder according to the [**QAI AppBuilder Installation Guide**](../qai-appbuilder).
13+
1. Please install QAI AppBuilder according to [**QAI AppBuilder Installation Guide**](../qai-appbuilder#installation-methods).
1414

15-
2. Configure QAIRT environment variables as described in [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
15+
2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
1616
:::
1717

1818
## Run the Example

0 commit comments

Comments
 (0)