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
2 changes: 1 addition & 1 deletion docs/common/ai/_rknn_yolov8_multi_stream.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ git clone https://github.com/ZIFENG278/RK3588-Multi-Stream-YOLOv8-Detection.git
### 安装依赖

:::tip
请在 python [虚拟环境](../venv-usage) 中安装相关依赖
请在 python <a href={props?.venv_usage ?? '../venv-usage'}>虚拟环境</a> 中安装相关依赖
:::

<NewCodeBlock tip="Device" type="device">
Expand Down
2 changes: 1 addition & 1 deletion docs/common/dev/_rkdevtoolV2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RKDevTool 是 Rockchip 为 Windows 平台下进行 USB 烧录所开发的软件

- 选择 Loader (详见上文文件下载部分)
- 点击右键,选择添加项,选择储存介质为 eMMC
- 选择系统镜像(详见上文文件下载部分,下载完后需要解压成 .img 格式)
- 选择系统镜像详见上文文件下载部分;<span style={{color: 'red'}}>下载文件后请解压,最终使用 .img 格式镜像文件</span>)
- 点击执行,开始烧录

<img src={props.rkdevtool_emmc_img} alt="images path" />
Expand Down
2 changes: 1 addition & 1 deletion docs/dragon/q6a/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sidebar_position: 150

### Radxa OS

**说明**:R1 或更高版本的系统镜像时,请使用 20251230 或更新版本的 SPI 启动固件。
**说明**:R1 或更高版本的系统镜像时,请使用 20251230 或更新版本的 [SPI 启动固件](#启动固件)

- [radxa-dragon-q6a_noble_gnome_r2.output_512.img.xz](https://github.com/radxa-build/radxa-dragon-q6a/releases/download/rsdk-r2/radxa-dragon-q6a_noble_gnome_r2.output_512.img.xz):适用于 MicroSD 卡 / U 盘 / eMMC / NVMe 启动系统
- [radxa-dragon-q6a_noble_gnome_r2.output_4096.img.xz](https://github.com/radxa-build/radxa-dragon-q6a/releases/download/rsdk-r2/radxa-dragon-q6a_noble_gnome_r2.output_4096.img.xz):适用于 UFS 启动系统
Expand Down
15 changes: 15 additions & 0 deletions docs/rock5/rock5itx/app-development/yolov8-multi-stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 29
description: 使用 RKNN 进行 YOLOv8 多路识别

doc_kind: wrapper
source_of_truth: common
imports_resolve_to:
- docs/common/ai/_rknn_yolov8_multi_stream.mdx
---

# YOLOv8 多路识别

import RKNNYOLOV8MULTISTREAM from "../../../common/ai/\_rknn_yolov8_multi_stream.mdx";

<RKNNYOLOV8MULTISTREAM venv_usage="./venv_usage"/>
15 changes: 15 additions & 0 deletions docs/rock5/rock5t/app-development/yolov8-multi-stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 29
description: 使用 RKNN 进行 YOLOv8 多路识别

doc_kind: wrapper
source_of_truth: common
imports_resolve_to:
- docs/common/ai/_rknn_yolov8_multi_stream.mdx
---

# YOLOv8 多路识别

import RKNNYOLOV8MULTISTREAM from "../../../common/ai/\_rknn_yolov8_multi_stream.mdx";

<RKNNYOLOV8MULTISTREAM venv_usage="./venv_usage"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
Multi-stream Video Object Detection with YOLOv8 on RK3588 NPU

<div style={{ textAlign: "center" }}>
<img
src="/en/img/general-tutorial/rknn/yolov8-multi-stream.webp"
style={{ width: "85%" }}
/>
</div>

## Features

- **Multi-stream Processing**: Supports 9+ video streams simultaneously
- **3-core NPU Acceleration**: Fully utilizes RK3588's 3 NPU cores
- **Pipeline Architecture**: Decode → NPU Inference → Post-processing → Display
- **Real-time Display**: Grid display with frame rate statistics (video FPS + inference FPS)
- **Letterbox Preprocessing**: Maintains aspect ratio to ensure detection accuracy

## Installation

### Clone Project Repository

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

```bash
git clone https://github.com/ZIFENG278/RK3588-Multi-Stream-YOLOv8-Detection.git
```

</NewCodeBlock>

### Install Dependencies

:::tip
Please install dependencies in a Python <a href={props?.venv_usage ?? '../venv-usage'}>virtual environment</a>
:::

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

```bash
pip3 install rknn-toolkit-lite2 opencv-python
```

</NewCodeBlock>

## Usage

### Basic Run (9 streams, 3 cores)

:::tip
--video-dir: Please specify the folder containing video files
:::

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

```bash
python3 main_rknn_pipeline.py --video-dir ./video
```

</NewCodeBlock>

### No Display Mode (suitable for testing)

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

```bash
python3 main_rknn_pipeline.py --video-dir ./video --no-display --max-frames 100
```

</NewCodeBlock>

### Custom Parameters

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

```bash
python3 main_rknn_pipeline.py \
--num-streams 6 \
--num-cores 3 \
--model yolov8n-i8-3588.rknn \
--video-dir video \
--conf-threshold 0.5 \
--iou-threshold 0.45
```

</NewCodeBlock>

## Command Line Parameters

| Parameter | Default | Description |
| ------------------ | -------------------- | ----------------------- |
| `--num-streams` | 9 | Number of video streams |
| `--num-cores` | 3 | NPU core count (1-3) |
| `--model` | yolov8n-i8-3588.rknn | Model file path |
| `--video-dir` | video | Video directory |
| `--conf-threshold` | 0.4 | Confidence threshold |
| `--iou-threshold` | 0.45 | NMS IoU threshold |
| `--no-display` | False | Disable display |
| `--max-frames` | None | Limit number of frames |

## Performance Reference

### Test Conditions

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

```bash
python main_rknn_pipeline.py \
--num-streams 9 \
--num-cores 3 \
--model yolov8n-i8-3588.rknn \
--video-dir video \
--max-frames 1000
```

</NewCodeBlock>

| Hardware | Memory | Video Count | NPU Cores | Model | Quantization | Frames |
| -------- | ------ | ----------- | --------- | ------- | ------------ | ------ |
| ROCK5B+ | 8GB | 9 | 3 | yolov8n | INT8 | 1000 |

### Test Results

| Stage | Time (avg ms) |
| ------------- | ------------- |
| Decode | 2.24 |
| Preprocess | 2.00 |
| NPU Inference | 25.77 |
| Post-process | 15.66 |
| Draw | 1.43 |
| **Total** | **47.10** |
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If the operation is normal, RKDevTool will prompt `A MASKROM device was found`.

- Select Loader (see File Download section above).
- Right click, select Add item, select eMMC as the storage media.
- Select the system image (see above section on file download, you need to unzip it into .img format after downloading).
- Select the system image (see above section on file download; <span style={{color: 'red'}}>Please unzip the downloaded file. Use the .img format image file</span>).
- Click Execute to start burning

<img src={props.rkdevtool_emmc_img} alt="images path" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This page hosts the latest official and test system images. Test releases begin

### Radxa OS

**Note**: When using R1 or higher version system images, please use SPI boot firmware version 20251230 or newer.
**Note**: When using R1 or higher version system images, please use [SPI boot firmware](#boot-firmware) version 20251230 or newer.

- [radxa-dragon-q6a_noble_gnome_r2.output_512.img.xz](https://github.com/radxa-build/radxa-dragon-q6a/releases/download/rsdk-r2/radxa-dragon-q6a_noble_gnome_r2.output_512.img.xz): For booting from MicroSD card / USB drive / eMMC / NVMe
- [radxa-dragon-q6a_noble_gnome_r2.output_4096.img.xz](https://github.com/radxa-build/radxa-dragon-q6a/releases/download/rsdk-r2/radxa-dragon-q6a_noble_gnome_r2.output_4096.img.xz): For booting from UFS
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 29
description: YOLOv8 multi-stream recognition with RKNN

doc_kind: wrapper
source_of_truth: common
imports_resolve_to:
- docs/common/ai/_rknn_yolov8_multi_stream.mdx
---

# YOLOv8 Multi-stream Recognition

import RKNNYOLOV8MULTISTREAM from "../../../../common/ai/\_rknn_yolov8_multi_stream.mdx";

<RKNNYOLOV8MULTISTREAM />
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 29
description: YOLOv8 multi-stream recognition with RKNN

doc_kind: wrapper
source_of_truth: common
imports_resolve_to:
- docs/common/ai/_rknn_yolov8_multi_stream.mdx
---

# YOLOv8 Multi-stream Recognition

import RKNNYOLOV8MULTISTREAM from "../../../common/ai/\_rknn_yolov8_multi_stream.mdx";

<RKNNYOLOV8MULTISTREAM venv_usage="./venv_usage"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 29
description: YOLOv8 multi-stream recognition with RKNN

doc_kind: wrapper
source_of_truth: common
imports_resolve_to:
- docs/common/ai/_rknn_yolov8_multi_stream.mdx
---

# YOLOv8 Multi-stream Recognition

import RKNNYOLOV8MULTISTREAM from "../../../common/ai/\_rknn_yolov8_multi_stream.mdx";

<RKNNYOLOV8MULTISTREAM venv_usage="./venv_usage"/>