Skip to main content

YOLOv8 Multi-stream Recognition

Multi-stream Video Object Detection with YOLOv8 on RK3588 NPU

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

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

Install Dependencies

tip

Please install dependencies in a Python virtual environment

Device
pip3 install rknn-toolkit-lite2 opencv-python

Usage

Basic Run (9 streams, 3 cores)

tip

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

Device
python3 main_rknn_pipeline.py --video-dir ./video

No Display Mode (suitable for testing)

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

Custom Parameters

Device
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

Command Line Parameters

ParameterDefaultDescription
--num-streams9Number of video streams
--num-cores3NPU core count (1-3)
--modelyolov8n-i8-3588.rknnModel file path
--video-dirvideoVideo directory
--conf-threshold0.4Confidence threshold
--iou-threshold0.45NMS IoU threshold
--no-displayFalseDisable display
--max-framesNoneLimit number of frames

Performance Reference

Test Conditions

Device
python main_rknn_pipeline.py \
--num-streams 9 \
--num-cores 3 \
--model yolov8n-i8-3588.rknn \
--video-dir video \
--max-frames 1000
HardwareMemoryVideo CountNPU CoresModelQuantizationFrames
ROCK5B+8GB93yolov8nINT81000

Test Results

StageTime (avg ms)
Decode2.24
Preprocess2.00
NPU Inference25.77
Post-process15.66
Draw1.43
Total47.10

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0