跳到主要内容

菊花链检测与分类

gst-ai-daisychain-detection-classification 对视频流执行级联推理:先用 目标检测 定位物体,再对检测到的每个物体执行 图像分类,进一步细化识别结果。

这种级联方式适合需要先定位再细分的场景,例如先检测到"动物",再分类为"金鱼"。

前提条件

步骤

1. 确认模型文件

应用复用检测和分类模型,均由 download_artifacts.sh 自动下载:

ls -l /etc/models/yolox_quantized.tflite /etc/models/inception_v3_quantized.tflite

2. 查看配置

cat /etc/configs/config_daisychain_detection_classification.json

3. 运行

radxa@airbox$
gst-ai-daisychain-detection-classification --config-file=/etc/configs/config_daisychain_detection_classification.json

Ctrl + C 停止。

预期输出

终端输出:

Using DSP delegate with TFLITE for Classification
Using DSP delegate with TFLITE for Detection
VERBOSE: Replacing 329 out of 329 node(s) with delegate (TfLiteQnnDelegate) node
VERBOSE: Replacing 142 out of 142 node(s) with delegate (TfLiteQnnDelegate) node
Pipeline state changed from PAUSED to PLAYING

显示器上播放测试视频,先检测物体位置(边界框),再对每个物体显示细粒度分类标签。

验证

  • 检测模型(YOLOX, 329 节点)和分类模型(InceptionV3, 142 节点)同时在 DSP 上运行
  • Pipeline 进入 PLAYING 状态
  • 显示器同时显示边界框和分类标签

工作原理

Pipeline 分两级:

filesrc → qtdemux → h264parse → v4l2h264dec
↓ ↓
(分流) qtimlvconverter

qtimltflite (YOLOX 检测, DSP)

qtimlvdetection

qtimlvconverter (ROI 裁剪)

qtimltflite (InceptionV3 分类, DSP)

qtimlvclassification

qtivcomposer

waylandsink

与单独的 目标检测图像分类 相比,菊花链方式可以在检测基础上提供更细粒度的分类结果。

    您需要登录 GitHub 才能发表评论。如果您已登录,请忽略此消息。

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