Rdk X5 App

运行 RDK X5 /app 目录下的预装示例程序:12 个 Python AI 推理 demo(YOLO/分类/分割/Web展示)、40pin GPIO 示例、C++ 多媒体示例(编解码/RTSP/VIO)、查看 34 个预装 BPU 模型。Use when the user wants to run pre-...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 152 · 1 current installs · 1 all-time installs
byqiaolongli@katherineedwards2475
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the instructions: the SKILL.md only describes running demos under /app and lists python3 and build/run steps. Requesting python3 and referring to system Python is appropriate for device demos.
Instruction Scope
Instructions tell the operator to cd into /app, run Python demos, compile and run C++ demos, start nginx, use sudo for GPIO examples, and run rtsp streams. All are expected for hardware demos, but they involve privileged operations (sudo, apt install) and network I/O (RTSP, web UI). The SKILL.md does not attempt to read unrelated system data or offload data to an external service beyond normal network streams.
Install Mechanism
No install spec and no external downloads—this is an instruction-only skill that relies on existing system binaries, which minimizes install-time risk.
Credentials
The skill declares no environment variables, credentials, or config paths. Example RTSP URL includes sample credentials (admin:password) in documentation only; there are no required secrets declared. This is proportional to the described demo role.
Persistence & Privilege
always is false and the skill does not request persistent system changes. However, the runtime instructions call for privileged actions (sudo, apt install) and starting system services (nginx), which will change system state when followed; exercise usual caution before running those commands.
Assessment
This skill is internally consistent and appears to be what it says: documentation to run pre-installed demos on an RDK X5 device. Before running anything: (1) inspect /app to confirm files come from a trusted source, (2) be aware many commands require sudo or apt and will modify the device (installing packages, starting nginx), (3) demos access hardware (GPIO, camera) and network streams (RTSP), so run them on the intended device and network only, (4) replace example credentials (the docs show admin:password) with secure real credentials or avoid exposing credentials in URLs, and (5) if you want to avoid unintended system changes, run scripts in a controlled environment or review individual commands rather than running broad make/sudo operations blindly.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
demovk976hnbw46brm8zy5c099x1ft582pcjeembeddedvk976hnbw46brm8zy5c099x1ft582pcjelatestvk976hnbw46brm8zy5c099x1ft582pcjemodelsvk976hnbw46brm8zy5c099x1ft582pcjepythonvk976hnbw46brm8zy5c099x1ft582pcjerdk-x5vk976hnbw46brm8zy5c099x1ft582pcjeroboticsvk976hnbw46brm8zy5c099x1ft582pcjesamplesvk976hnbw46brm8zy5c099x1ft582pcjeyolovk976hnbw46brm8zy5c099x1ft582pcje

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

Binspython3

SKILL.md

RDK X5 App — /app 预装示例

目录结构

/app/
├── pydev_demo/         # 12 个 Python AI demo
│   ├── 01_basic_sample/ ~ 12_yolov5s_v6_v7_sample/
│   └── models/          # 34 个 BPU 模型 (.bin)
├── 40pin_samples/       # GPIO/I2C/SPI/PWM/UART 示例
├── cdev_demo/           # 8 个 C++ 多媒体示例
└── multimedia_samples/  # 底层 C 示例

Python AI 示例

图像分类(01_basic_sample)

cd /app/pydev_demo/01_basic_sample
python3 test_mobilenetv1.py     # MobileNetV1
python3 test_resnet18.py        # ResNet18
python3 test_googlenet.py       # GoogleNet

语义分割(04_segment_sample)

cd /app/pydev_demo/04_segment_sample
python3 test_segment.py

Web 摄像头展示(05)

cd /app/pydev_demo/05_web_display_camera_sample
bash start_nginx.sh
python3 mipi_camera_web.py

浏览器 http://<RDK_IP>:8080 查看。

YOLO 系列检测

cd /app/pydev_demo/06_yolov3_sample && python3 test_yolov3.py
cd /app/pydev_demo/07_yolov5_sample && python3 test_yolov5.py
cd /app/pydev_demo/09_yolov5x_sample && python3 test_yolov5x.py
cd /app/pydev_demo/12_yolov5s_v6_v7_sample && python3 test_yolov5s_v6.py

其他检测

cd /app/pydev_demo/10_ssd_mobilenetv1_sample && python3 test_ssd_mobilenetv1.py
cd /app/pydev_demo/11_centernet_sample && python3 test_centernet.py

RTSP 流解码(08)

cd /app/pydev_demo/08_decode_rtsp_stream
python3 test_decode_rtsp.py "rtsp://admin:password@192.168.1.64:554/stream1"

40pin GPIO 示例

cd /app/40pin_samples
sudo python3 simple_out.py          # GPIO 输出
sudo python3 simple_input.py        # GPIO 输入
sudo python3 simple_pwm.py          # PWM
sudo python3 button_event.py        # 按钮事件
sudo python3 button_led.py          # 按钮控 LED
sudo python3 test_i2c.py            # I2C
sudo python3 test_spi.py            # SPI
sudo python3 test_serial.py         # UART

C++ 多媒体示例

编译并运行:

cd /app/cdev_demo/<demo_name>
make && ./<executable>
目录功能可执行文件
bpuBPU C++ 推理bpu_demo
v4l2V4L2 摄像头v4l2_demo
vio2displayVIO 到显示vio2display
vio2encoderVIO 到编码vio2encoder
decode2display解码显示decoder2display
rtsp2displayRTSP 显示rtsp2display
vio_captureVIO 采集capture
vps视频处理见目录

模型库速查

路径:/app/pydev_demo/models/(34 个 .bin 文件)

类别模型
分类mobilenetv1, mobilenetv2, resnet18, googlenet, efficientnasnet_m/s, efficientnet_lite0~4, vargconvnet
检测yolov2, yolov3, yolov5s/5x/5s_v6/v7, yolov8, yolov10, yolov11m, yolov12n, ssd_mobilenetv1, centernet, fcos, fcos_efficientnetb2/b3
分割yolov8_seg, deeplabv3plus (efficientnetb0/m1), fastscnn, mobilenet_unet, stdc

所有模型为 NV12 格式,专为 BPU 优化。

⚠️ 必须使用系统 Python

RDK X5 的 hobot_dnn 等硬件库安装在系统 Python (/usr/bin/python3.10),不在 conda 环境中

# ✅ 正确 — 使用系统 Python
/usr/bin/python3.10 /app/pydev_demo/01_basic_sample/test_resnet18.py

# ❌ 错误 — conda 环境没有 hobot_dnn,会报 ModuleNotFoundError
python /app/pydev_demo/01_basic_sample/test_resnet18.py

排查故障

现象原因解决
ModuleNotFoundError: hobot_dnn使用了 conda 或 venv Python改用 /usr/bin/python3.10 运行
make 编译失败缺少头文件或库sudo apt install libhbm-dev 检查依赖
Web 展示无画面nginx 未启动bash start_nginx.sh
模型文件找不到路径错误确认模型在 /app/pydev_demo/models/

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…