Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/common/radxa-os/build-system/_install_env.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
主要介绍 U-Boot、Kernel、RadxaOS 开发的环境搭建。
主要介绍 {props?.items ?? 'U-Boot、Kernel and Radxa OS'} 开发的环境搭建。

## 使用前提

Expand All @@ -10,7 +10,7 @@

## 环境搭建

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

### Docker

Expand Down
26 changes: 26 additions & 0 deletions docs/dragon/q6a/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,29 @@ newgrp dialout
</NewCodeBlock>

3. 检查串口设备是否被其他程序占用

## 为什么 Radxa OS 默认使用 GDM 而不是 SDDM?

Radxa OS 默认使用 GDM(GNOME Display Manager)替代 SDDM(Simple Desktop Display Manager),主要原因如下:

**SDDM 的局限性:**

- 在 HDMI 未连接的 headless 模式下,SDDM 无法正常启动图形界面
- 这会导致用户无法通过远程桌面或 VNC 等方式登录系统

**GDM 的优势:**

- 在各种连接状态下(包括 headless 模式)都能稳定运行
- 提供更好的兼容性和可靠性

如果您希望切换回 SDDM,请按以下步骤操作:

<NewCodeBlock tip="Linux$" type="host">

```bash
sudo dpkg-reconfigure sddm
```

</NewCodeBlock>

在弹出的配置界面中,选择 `sddm` 作为默认显示管理器,然后重启系统即可使更改生效。
2 changes: 1 addition & 1 deletion docs/dragon/q6a/low-dev/build-system/install-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ import InstallEnv from '../../../../common/radxa-os/build-system/\_install_env.m

# 环境搭建

<InstallEnv />
<InstallEnv items="Kernel and Radxa OS" />
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Pytho

:::tip

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

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

## Run the Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Pytho

:::tip

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

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

## Run the Example
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
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)
target recognition model using Qualcomm® Hexagon™ Processor (NPU).

**Supported Devices**

| Device | SoC |
| ---------- | ------- |
| Dragon Q6A | QCS6490 |

## Install QAI AppBuilder

:::tip

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

2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
:::

## Run Example

### Install Dependencies

<NewCodeBlock tip="Device" type="device">

```bash
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
```

</NewCodeBlock>

### Run Script

- Navigate to the example directory

<Tabs>

<TabItem value="QCS6490">

<NewCodeBlock tip="Device" type="device">

```bash
cd ai-engine-direct-helper/samples/linux/python
```

</NewCodeBlock>

</TabItem>

</Tabs>

- Prepare input image, using the following image as input example

{" "}

<div style={{ textAlign: "center" }}>
<img src="/en/img/dragon/q6a/test_image.webp" style={{ width: "65%" }} />
input image
</div>

- Execute inference

<NewCodeBlock tip="Device" type="device">

```bash
python3 convnext_base/convnext_base.py
```

</NewCodeBlock>

```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] <W> 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] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

193.9ms [WARNING] Time: Read model file to memory. 71.69

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> 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] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> 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
```

The printed results show that `Samoyed` has the highest confidence, which matches the input image content.
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
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)
target recognition model using Qualcomm® Hexagon™ Processor (NPU).

**Supported Devices**

| Device | SoC |
| ---------- | ------- |
| Dragon Q6A | QCS6490 |

## Install QAI AppBuilder

:::tip

1. Please install QAI AppBuilder according to [**QAI AppBuilder Installation Guide**](../qai-appbuilder).

2. Please configure QAIRT environment variables according to [**Configure QAIRT Environment Variables**](../qai-appbuilder).
:::

## Run Example

### Install Dependencies

<NewCodeBlock tip="Device" type="device">

```bash
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
```

</NewCodeBlock>

### Run Script

- Navigate to the example directory

<Tabs>

<TabItem value="QCS6490">

<NewCodeBlock tip="Device" type="device">

```bash
cd ai-engine-direct-helper/samples/linux/python
```

</NewCodeBlock>

</TabItem>

</Tabs>

- Prepare input image, using the following image as input example

{" "}

<div style={{ textAlign: "center" }}>
<img src="/en/img/dragon/q6a/test_image.webp" style={{ width: "65%" }} />
input image
</div>

- Execute inference

<NewCodeBlock tip="Device" type="device">

```bash
python3 convnext_tiny/convnext_tiny.py
```

</NewCodeBlock>

```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] <W> 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] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

132.1ms [WARNING] Time: Read model file to memory. 15.88

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> 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] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> This META does not have Alloc2 Support

0.0ms [WARNING] <W> 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
```

The printed results show that `Samoyed` has the highest confidence, which matches the input image content.

---
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Pytho

:::tip

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

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

## Run the Example
Expand Down
Loading