# 使用主机运行示例应用程序

您可以使用搭载 Windows、Ubuntu 或 Mac 操作系统的主机，在 Qualcomm Dragonwing^™^ RB3 Gen 2 开发套件上运行示例应用程序。

## 前提条件

在运行任何应用程序之前，确保[设置设备](https://docs.qualcomm.com/doc/80-70022-251Y/topic/set_up_the_device.html#set-up-the-device)。

## 运行多媒体示例应用程序

多媒体示例应用程序展示了设备上的摄像头、显示器和视频流的用例。

### 多摄像头流传输或编码（行车记录仪）

**gst-multi-camera-example** 命令行应用程序展示了从 Dragonwing RB3 Gen 2 设备上的两个摄像头传感器同时进行流传输。该应用程序将摄像头传输的流进行并排合成并显示在显示器上，或将视频流进行编码并存储到文件中。

下图展示了 gst-multi-camera-example（行车记录仪）应用程序的工作流，分为两个功能部分：合成和编码。在合成部分，摄像头 0 和摄像头 1 的信号流入合成器，该合成器将输出发送至显示器。在编码部分，每个摄像头流均由 H.264 编码器处理，然后保存到文件中。

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="1024" height="677" version="1.1" viewbox="0 0 1024 677" aria-label="使用 gst-multi-camera-example（行车记录仪）应用程序从两个摄像头进行流传输的工作流。">
  <!-- Generator: Adobe Illustrator 29.5.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 137)  -->
  <defs>
    <style>.svg-1 .st0,.svg-1 .st1,.svg-1 .st2,.svg-1 .st3,.svg-1 .st4 { stroke-miterlimit: 10 }
.svg-1 .st0,.svg-1 .st2 { stroke-width: .8px }
.svg-1 .st0,.svg-1 .st2,.svg-1 .st3 { fill: none }
.svg-1 .st0,.svg-1 .st2,.svg-1 .st3,.svg-1 .st4 { stroke: #000 }
.svg-1 .st5,.svg-1 .st6,.svg-1 .st7,.svg-1 .st8,.svg-1 .st4 { isolation: isolate }
.svg-1 .st5,.svg-1 .st6,.svg-1 .st8 { fill: #fff }
.svg-1 .st5,.svg-1 .st6,.svg-1 .st8,.svg-1 .st4 { font-size: 24px }
.svg-1 .st5,.svg-1 .st6,.svg-1 .st4 { letter-spacing: 0em }
.svg-1 .st6,.svg-1 .st8,.svg-1 .st9,.svg-1 .st4 { font-family: SimHei, SimHei }
.svg-1 .st1 { fill: #fafafa; stroke: #d2d7e1 }
.svg-1 .st2 { stroke-dasharray: 5 5 }
.svg-1 .st3 { stroke-width: 2px }
.svg-1 .st10 { fill: #6280cc }
.svg-1 .st8 { letter-spacing: 0em }
.svg-1 .st4 { stroke-width: .4px }
.svg-1 .st11 { font-family: Roboto-Regular, Roboto }</style>
  </defs>
  <rect class="st1" x="11.2" y="9" width="1001.5" height="658.7" rx="8" ry="8"></rect>
  <rect class="st10" x="34" y="75.4" width="200.3" height="83.9" rx="4" ry="4"></rect>
  <rect class="st10" x="389.9" y="75.4" width="222.3" height="229.5" rx="4" ry="4"></rect>
  <rect class="st10" x="767.7" y="75.4" width="222.3" height="229.5" rx="4" ry="4"></rect>
  <rect class="st10" x="34" y="221" width="200.3" height="83.9" rx="4" ry="4"></rect>
  <g class="st7">
    <text class="st5" transform="translate(86 124.3)"><tspan class="st9" x="0" y="0">摄像头</tspan><tspan class="st11" x="75.6" y="0" xml:space="preserve"> 0</tspan></text>
  </g>
  <g class="st7">
    <g class="st7">
      <text class="st4" transform="translate(33.5 47.8)"><tspan x="0" y="0">图像合成</tspan></text>
    </g>
  </g>
  <g class="st7">
    <g class="st7">
      <text class="st6" transform="translate(441.5 196.8)"><tspan x="0" y="0">图像合成器</tspan></text>
    </g>
  </g>
  <g class="st7">
    <text class="st6" transform="translate(841.7 197.1)"><tspan x="0" y="0">显示器</tspan></text>
  </g>
  <g class="st7">
    <g class="st7">
      <text class="st5" transform="translate(86 269.9)"><tspan class="st9" x="0" y="0">摄像头</tspan><tspan class="st11" x="75.6" y="0" xml:space="preserve"> 1</tspan></text>
    </g>
  </g>
  <g>
    <line class="st3" x1="234.3" y1="117.3" x2="381.2" y2="117.3"></line>
    <polygon points="379.5 123.3 389.9 117.3 379.5 111.3 379.5 123.3"></polygon>
  </g>
  <g>
    <line class="st3" x1="612.2" y1="190.1" x2="759.1" y2="190.1"></line>
    <polygon points="757.3 196.1 767.7 190.1 757.3 184.1 757.3 196.1"></polygon>
  </g>
  <g>
    <line class="st3" x1="234.3" y1="262.9" x2="381.2" y2="262.9"></line>
    <polygon points="379.5 268.9 389.9 262.9 379.5 256.9 379.5 268.9"></polygon>
  </g>
  <rect class="st10" x="34" y="413.6" width="200.3" height="83.9" rx="4" ry="4"></rect>
  <rect class="st10" x="389.9" y="413.6" width="222.3" height="83.9" rx="4" ry="4"></rect>
  <rect class="st10" x="389.9" y="559.2" width="222.3" height="83.9" rx="4" ry="4"></rect>
  <rect class="st10" x="34" y="559.2" width="200.3" height="83.9" rx="4" ry="4"></rect>
  <g class="st7">
    <text class="st5" transform="translate(86 462.5)"><tspan class="st9" x="0" y="0">摄像头</tspan><tspan class="st11" x="75.6" y="0" xml:space="preserve"> 0</tspan></text>
  </g>
  <g class="st7">
    <g class="st7">
      <text class="st4" transform="translate(34 386)"><tspan x="0" y="0">编码</tspan></text>
    </g>
  </g>
  <g class="st7">
    <g class="st7">
      <text class="st5" transform="translate(425.3 462.5)"><tspan class="st11" x="0" y="0">H.264 </tspan><tspan class="st9" x="77" y="0">编码器</tspan></text>
    </g>
  </g>
  <rect class="st10" x="767.7" y="413.6" width="222.3" height="83.9" rx="4" ry="4"></rect>
  <g class="st7">
    <text class="st8" transform="translate(829.4 462.5)"><tspan x="0" y="0">写入文件</tspan></text>
  </g>
  <g class="st7">
    <text class="st5" transform="translate(425.3 608.1)"><tspan class="st11" x="0" y="0">H.264 </tspan><tspan class="st9" x="77" y="0">编码器</tspan></text>
  </g>
  <g class="st7">
    <text class="st5" transform="translate(86 608.1)"><tspan class="st9" x="0" y="0">摄像头</tspan><tspan class="st11" x="75.6" y="0" xml:space="preserve"> 1</tspan></text>
  </g>
  <g>
    <line class="st3" x1="234.3" y1="455.6" x2="381.2" y2="455.6"></line>
    <polygon points="379.5 461.6 389.9 455.6 379.5 449.6 379.5 461.6"></polygon>
  </g>
  <g>
    <line class="st3" x1="612.2" y1="455.6" x2="759.1" y2="455.6"></line>
    <polygon points="757.3 461.6 767.7 455.6 757.3 449.6 757.3 461.6"></polygon>
  </g>
  <rect class="st10" x="767.7" y="559.2" width="222.3" height="83.9" rx="4" ry="4"></rect>
  <g class="st7">
    <text class="st8" transform="translate(829.4 608.1)"><tspan x="0" y="0">写入文件</tspan></text>
  </g>
  <g>
    <line class="st3" x1="612.2" y1="601.2" x2="759.1" y2="601.2"></line>
    <polygon points="757.3 607.2 767.7 601.2 757.3 595.2 757.3 607.2"></polygon>
  </g>
  <g>
    <line class="st3" x1="234.3" y1="601.2" x2="381.2" y2="601.2"></line>
    <polygon points="379.5 607.2 389.9 601.2 379.5 595.2 379.5 607.2"></polygon>
  </g>
  <g>
    <line class="st0" x1="11.2" y1="340.6" x2="13.8" y2="340.6"></line>
    <line class="st2" x1="18.8" y1="340.6" x2="1007.8" y2="340.6"></line>
    <line class="st0" x1="1010.2" y1="340.6" x2="1012.8" y2="340.6"></line>
  </g>
</svg>

**图：行车记录仪应用工作流**

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 640 400" width="640" height="400" style="cursor:auto !important" aria-label="">
    <defs>
      <style>@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap");
.svg-2 .bg-fill { fill: var(--color-background) }
.svg-2 .fill-text { color: var(--color-content); fill: var(--color-content) }
.svg-2 .video-hoverbox { transition: opacity 0.15s ease-in-out }
.svg-2 .video-hoverbox:hover { opacity: 0.9 }
 { fill: #000000; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-2 .st2 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-2 .st3 { fill: #ffffff; stroke: none; stroke-linecap: butt; stroke-width: 6.375 }
.svg-2 .st4 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-2 .st5 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
  </defs>

  <foreignobject x="0" y="0" width="640" height="400">
    
        <iframe width="640" height="400" src="https://players.brightcove.net/1414329538001/4JiZQnWhg_default/index.html?videoId=6380737715112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Nov 04, 2025</div><div class="prev-and-next-links"><span class="previous-topic-link"><span aria-hidden="true" class="disabled" data-tip="" data-effect="solid"></span></span></div></div>
    </foreignobject>

</svg>

**视频：多相机应用程序**

**使用示例**

要启动应用程序，请从 SSH 终端运行以下用例：

1. 要在 HDMI 显示器上查看示例应用程序，请运行以下 export 命令：

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
        Copy to clipboard
2. 要查看 `waylandsink` 输出，请运行以下命令：

gst-multi-camera-example -o 0
        Copy to clipboard
3. 要存储编码器输出，请执行以下操作：

    1. 运行以下命令：

gst-multi-camera-example -o 1
            Copy to clipboard

        设备将编码后的文件分别存储在 `/opt/cam1_vid.mp4` 和 `/opt/cam2_vid.mp4` 中，分别用于摄像头 1 和摄像头 2。
    2. 要从主机提取文件，请运行以下命令：

scp root@<IP address of target device>:/opt/cam1_vid.mp4 <destination directory>
            Copy to clipboard

Note

当系统提示输入密码时，输入 `oelinux123`。
    3. 要播放编码器输出，可以使用任何支持 MP4 文件的媒体播放器。

- 要停止用例，请按 <kbd class="kbd docutils literal notranslate">Ctrl</kbd> + <kbd class="kbd docutils literal notranslate">C</kbd>。
- 要显示可用的帮助选项，请运行以下命令：

gst-multi-camera-example --help
        Copy to clipboard
- `GST_DEBUG` 环境变量控制 GStreamer 调试输出。设置所需级别以允许记录日志。例如，要记录所有警告，可运行以下命令：

export GST_DEBUG=2
        Copy to clipboard

### 多通道视频解码与合成（视频墙）

**gst-concurrent-videoplay-composition** 命令行应用程序允许对 AVC 编码的视频进行并发视频解码和播放，并将它们组合在显示器上用于视频墙应用。该应用程序至少需要一个输入视频文件，该文件应为带有 AVC codec 的 MP4 文件。

该图展示了 gst-concurrent-videoplay-composition（视频墙）应用程序的工作流。该工作流展示了如何从文件中读取四个视频流，使用 H.264 编码器进行解码，并合成为单个输出。然后，合成器将组合流发送到显示器进行并发播放。

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="1024" height="478.3" version="1.1" viewbox="0 0 1024 478.3" aria-label="使用 gst-concurrent-videoplay-composition（视频墙）应用程序同时执行视频解码和播放的工作流。">
  <!-- Generator: Adobe Illustrator 29.5.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 137)  -->
  <defs>
    <style>.svg-3 .st0 { fill: none; stroke: #000 }
.svg-3 .st0,.svg-3 .st1 { stroke-miterlimit: 10 }
.svg-3 .st1 { fill: #fafafa; stroke: #d2d7e1 }
.svg-3 .st2 { fill: #6280cc }
.svg-3 .st3,.svg-3 .st4 { font-family: SimHei, SimHei }
.svg-3 .st3,.svg-3 .st5,.svg-3 .st6 { fill: #fff; isolation: isolate }
.svg-3 .st3,.svg-3 .st6 { font-size: 20.1px; letter-spacing: 0em }
.svg-3 .st7 { font-family: Roboto-Regular, Roboto }
.svg-3 .st5 { font-size: 20.5px; letter-spacing: 0em }</style>
  </defs>
  <rect class="st1" x="3" y="3.5" width="1018" height="471.3" rx="8" ry="8"></rect>
  <rect class="st2" x="21.6" y="22.1" width="186.1" height="69.9" rx="4" ry="4"></rect>
  <rect class="st2" x="287.3" y="22.1" width="185.3" height="69.9" rx="4" ry="4"></rect>
  <rect class="st2" x="552.2" y="22.1" width="185.3" height="434" rx="4" ry="4"></rect>
  <rect class="st2" x="817.1" y="22.1" width="185.3" height="434" rx="4" ry="4"></rect>
  <rect class="st2" x="287.3" y="143.5" width="185.3" height="69.9" rx="4" ry="4"></rect>
  <rect class="st2" x="21.6" y="143.5" width="186.1" height="69.9" rx="4" ry="4"></rect>
  <text class="st3" transform="translate(51.8 63.2)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <text class="st6" transform="translate(316.5 63.2)"><tspan class="st7" x="0" y="0">H.264 </tspan><tspan class="st4" x="64.5" y="0">编码器</tspan></text>
  <text class="st3" transform="translate(592.5 245.3)"><tspan x="0" y="0">图像合成器</tspan></text>
  <text class="st3" transform="translate(878.6 245.3)"><tspan x="0" y="0">显示器</tspan></text>
  <text class="st6" transform="translate(316.5 184.6)"><tspan class="st7" x="0" y="0">H.264 </tspan><tspan class="st4" x="64.5" y="0">编码器</tspan></text>
  <text class="st3" transform="translate(51.8 184.6)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="st0" x1="207.7" y1="57.1" x2="280.8" y2="57.1"></line>
    <polygon points="279.5 61.6 287.3 57.1 279.5 52.6 279.5 61.6"></polygon>
  </g>
  <g>
    <line class="st0" x1="207.7" y1="178.5" x2="280.8" y2="178.5"></line>
    <polygon points="279.5 183 287.3 178.5 279.5 174 279.5 183"></polygon>
  </g>
  <rect class="st2" x="287.3" y="264.9" width="185.3" height="70" rx="4" ry="4"></rect>
  <rect class="st2" x="21.6" y="264.9" width="186.1" height="70" rx="4" ry="4"></rect>
  <text class="st5" transform="translate(315.2 306.1)"><tspan class="st7" x="0" y="0">H.264 </tspan><tspan class="st4" x="65.8" y="0">编码器</tspan></text>
  <text class="st3" transform="translate(51.8 305.9)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="st0" x1="207.7" y1="299.9" x2="280.8" y2="299.9"></line>
    <polygon points="279.5 304.3 287.3 299.9 279.5 295.4 279.5 304.3"></polygon>
  </g>
  <rect class="st2" x="287.3" y="386.2" width="185.3" height="69.9" rx="4" ry="4"></rect>
  <rect class="st2" x="21.6" y="386.2" width="186.1" height="69.9" rx="4" ry="4"></rect>
  <text class="st5" transform="translate(315.2 427.4)"><tspan class="st7" x="0" y="0">H.264 </tspan><tspan class="st4" x="65.8" y="0">编码器</tspan></text>
  <text class="st3" transform="translate(51.8 427.3)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="st0" x1="207.7" y1="421.2" x2="280.8" y2="421.2"></line>
    <polygon points="279.5 425.7 287.3 421.2 279.5 416.7 279.5 425.7"></polygon>
  </g>
  <g>
    <line class="st0" x1="472.6" y1="57.1" x2="545.7" y2="57.1"></line>
    <polygon points="544.4 61.6 552.2 57.1 544.4 52.6 544.4 61.6"></polygon>
  </g>
  <g>
    <line class="st0" x1="472.6" y1="178.5" x2="545.7" y2="178.5"></line>
    <polygon points="544.4 183 552.2 178.5 544.4 174 544.4 183"></polygon>
  </g>
  <g>
    <line class="st0" x1="737.5" y1="239.2" x2="810.6" y2="239.2"></line>
    <polygon points="809.3 243.6 817.1 239.2 809.3 234.7 809.3 243.6"></polygon>
  </g>
  <g>
    <line class="st0" x1="472.6" y1="299.9" x2="545.7" y2="299.9"></line>
    <polygon points="544.4 304.3 552.2 299.9 544.4 295.4 544.4 304.3"></polygon>
  </g>
  <g>
    <line class="st0" x1="472.6" y1="421.2" x2="545.7" y2="421.2"></line>
    <polygon points="544.4 425.7 552.2 421.2 544.4 416.7 544.4 425.7"></polygon>
  </g>
</svg>

**图：电视墙应用程序工作流**

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 640 400" width="640" height="400" style="cursor:auto !important" aria-label="../_images/video_wall_11-html.svg">
    <defs>
      <style>@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap");
.svg-4 .bg-fill { fill: var(--color-background) }
.svg-4 .fill-text { color: var(--color-content); fill: var(--color-content) }
.svg-4 .video-hoverbox { transition: opacity 0.15s ease-in-out }
.svg-4 .video-hoverbox:hover { opacity: 0.9 }
 { fill: #000000; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-4 .st2 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-4 .st3 { fill: #ffffff; stroke: none; stroke-linecap: butt; stroke-width: 6.375 }
.svg-4 .st4 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-4 .st5 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
  </defs>

  <foreignobject x="0" y="0" width="640" height="400">
    
        <iframe width="640" height="400" src="https://players.brightcove.net/1414329538001/4JiZQnWhg_default/index.html?videoId=6380739853112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Nov 04, 2025</div><div class="prev-and-next-links"><span class="previous-topic-link"><span aria-hidden="true" class="disabled" data-tip="" data-effect="solid"></span></span></div></div>
    </foreignobject>

</svg>

**视频：多通道解码和显示应用程序**

**使用示例**

1. 要将 AVC 编码的 MP4 (H.264) 格式的预先录制或测试视频（文件名为 `<file_name>`）传输到您的设备，可在主机上运行以下命令：

scp <file_name> root@[DEVICE IP-ADDR]:/opt/
        Copy to clipboard

Note

当系统提示输入密码时，输入 `oelinux123`。
2. 要在 HDMI 显示器上查看示例应用程序，请从 SSH 终端运行以下 export 命令：

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
        Copy to clipboard

> 
> 
> 

3. 要启动四通道并发播放，请运行以下命令：

gst-concurrent-videoplay-composition -c 4 -i /opt/<file_name1>.mp4 -i /opt/<file_name2>.mp4 -i /opt/<file_name3>.mp4 -i /opt/<file_name4>.mp4
        Copy to clipboard

Note

- `-c`：指定要解码以进行合成的流的数量。可以解码 2、4、8、16 或 32 个流。
- `-i`：指定输入视频文件的绝对路径。

- 要停止用例，请按 <kbd class="kbd docutils literal notranslate">CTRL</kbd> + <kbd class="kbd docutils literal notranslate">C</kbd>。
- 要显示可用的帮助选项，请运行以下命令：

gst-concurrent-videoplay-composition --help
        Copy to clipboard
- `GST_DEBUG` 环境变量控制 GStreamer 调试输出。设置所需级别以允许记录日志。例如，要记录所有警告，可运行以下命令：

export GST_DEBUG=2
        Copy to clipboard

## 运行示例应用程序

AI 示例应用程序展示了在 Dragonwing RB3 Gen 2 设备上对来自摄像头、视频文件或实时流传输协议 (RTSP) 流的输入流进行目标检测和并行推理的用例。要运行这些示例应用程序，您必须从 [Qualcomm® AI Hub](https://aihub.qualcomm.com/iot/models) 获取 AI 模型并从 GitHub 获取标签。下图展示了在 Dragonwing RB3 Gen 2 设备上运行 AI 示例应用程序的工作流。该过程包括下载模型和标签、将它们传输到 Dragonwing RB3 Gen 2 设备以及运行示例应用程序。

> 
> 
> <!--?xml version="1.0" encoding="UTF-8"?-->
> <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="994.3" height="119.2" version="1.1" viewbox="0 0 994.3 119.2" aria-label="在 Dragonwing RB3 Gen 2 设备上运行 AI 示例应用程序的工作流">
>   <!-- Generator: Adobe Illustrator 29.5.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 137)  -->
>   <defs>
>     <style>.svg-5 .st0 { fill: none; stroke: #000 }
> .svg-5 .st0,.svg-5 .st1 { stroke-miterlimit: 10 }
> .svg-5 .st2,.svg-5 .st3 { fill: #fff; font-family: SimHei, SimHei; font-size: 17.5px; isolation: isolate }
> .svg-5 .st1 { fill: #fafafa; stroke: #d2d7e1 }
> .svg-5 .st4 { fill: #6280cc }
> .svg-5 .st3 { letter-spacing: 0em }</style>
>   </defs>
>   <rect class="st1" x="3.8" y="3.2" width="986.5" height="112.2" rx="7.9" ry="7.9"></rect>
>   <rect class="st4" x="23.4" y="21.1" width="259.3" height="76.6" rx="4" ry="4"></rect>
>   <text class="st3" transform="translate(89.3 64.6)"><tspan x="0" y="0">下载模型和标签</tspan></text>
>   <rect class="st4" x="383.7" y="21.1" width="292.8" height="76.6" rx="4" ry="4"></rect>
>   <text class="st2" transform="translate(433.9 64.6)"><tspan x="0" y="0">将下载的文件传输到设备</tspan></text>
>   <rect class="st4" x="777.5" y="21.1" width="191" height="76.6" rx="3.7" ry="3.7"></rect>
>   <text class="st3" transform="translate(818.4 64.6)"><tspan x="0" y="0">运行示例应用</tspan></text>
>   <g>
>     <line class="st0" x1="282.8" y1="59.3" x2="378" y2="59.3"></line>
>     <polygon points="376.8 63.3 383.7 59.3 376.8 55.3 376.8 63.3"></polygon>
>   </g>
>   <g>
>     <line class="st0" x1="676.5" y1="59.3" x2="771.8" y2="59.3"></line>
>     <polygon points="770.6 63.3 777.5 59.3 770.6 55.3 770.6 63.3"></polygon>
>   </g>
> </svg>
> 
> 
> **图：运行 AI 示例应用程序的工作流**

**前提条件**

设备上需要有模型和标签文件才能运行 AI 示例应用程序。

**步骤**

1. 您需要以下用于 AI 示例应用程序的模型：

    | 示例应用程序 | 所需模型 |
    | --- | --- |
    | AI 目标检测 | [yolox_quantized.tflite](https://aihub.qualcomm.com/iot/models/yolox?searchTerm=yolo) |
    | 并行 AI 推理 | [yolox_quantized.tflite](https://aihub.qualcomm.com/iot/models/yolox?searchTerm=yolo) |
    | 并行 AI 推理 | [Inception-v3](https://aihub.qualcomm.com/iot/models/inception_v3) |
    | 并行 AI 推理 | [HRNetPose](https://aihub.qualcomm.com/iot/models/hrnet_pose) |
    | 并行 AI 推理 | [DeepLabV3-Plus-MobileNet](https://aihub.qualcomm.com/iot/models/deeplabv3_plus_mobilenet) |
    |  |  |
    |  |  |
    |  |  |
2. 要获取运行示例应用程序所需的模型、标签和视频文件，请在设备中下载并运行 <cite>download_artifacts.sh</cite> 脚本。

curl -L -O https://raw.githubusercontent.com/quic/sample-apps-for-qualcomm-linux/refs/heads/main/download_artifacts.sh
        Copy to clipboard

chmod +x download_artifacts.sh
        Copy to clipboard

./download_artifacts.sh -v GA1.6-rel -c QCS6490
        Copy to clipboard

Note

要使用示例应用程序执行自定义模型或标签，请参阅 [Qualcomm IM SDK 参考](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-50/qimsdk_landing_page.html)。

### AI 目标检测

**gst-ai-object-detection** 示例应用程序展示了对来自摄像头、视频文件或 RTSP 流的输入流执行目标检测的硬件能力。下图展示了目标检测应用程序的工作流。该 pipeline 接收输入流，对其进行预处理，在 AI 硬件上运行推理，并在屏幕上显示结果。

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="1024" height="478.3" version="1.1" viewbox="0 0 1024 478.3" aria-label="使用 Dragonwing RB3 Gen 2 开发套件上的 gst-ai-object-detection 应用程序检测目标的工作流。">
  <!-- Generator: Adobe Illustrator 29.5.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 137)  -->
  <defs>
    <style>.svg-6 .st0,.svg-6 .st1 { stroke-miterlimit: 10 }
.svg-6 .st0,.svg-6 .st2 { fill: none; stroke: #000 }
.svg-6 .st1 { fill: #fafafa; stroke: #d2d7e1 }
.svg-6 .st3,.svg-6 .st4,.svg-6 .st5 { isolation: isolate }
.svg-6 .st6 { fill: #6280cc }
.svg-6 .st4,.svg-6 .st5 { fill: #fff; font-size: 16px; letter-spacing: 0em }
.svg-6 .st2 { stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5px }
.svg-6 .st7,.svg-6 .st5 { font-family: SimHei, SimHei }
.svg-6 .st8 { font-family: Roboto-Regular, Roboto }</style>
  </defs>
  <rect class="st1" x="3" y="3.5" width="1018" height="471.3" rx="8" ry="8"></rect>
  <rect class="st6" x="97.9" y="22.1" width="137.6" height="97.1" rx="4" ry="4"></rect>
  <rect class="st6" x="457" y="64.7" width="97.1" height="54.4" rx="4" ry="4"></rect>
  <rect class="st6" x="628.5" y="22.1" width="119.1" height="434" rx="4" ry="4"></rect>
  <rect class="st6" x="805.9" y="22.1" width="119.1" height="434" rx="4" ry="4"></rect>
  <rect class="st6" x="97.9" y="190.6" width="137.6" height="97.1" rx="4" ry="4"></rect>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(117.6 75.6)"><tspan x="0" y="0">从摄像头读取</tspan></text>
    </g>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(658.8 244.2)"><tspan x="0" y="0">合成器</tspan></text>
    </g>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(841.5 244.2)"><tspan x="0" y="0">显示器</tspan></text>
    </g>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(118.1 244.1)"><tspan x="0" y="0">从文件中读取</tspan></text>
    </g>
  </g>
  <g>
    <line class="st0" x1="235.4" y1="70.7" x2="288.3" y2="70.7"></line>
    <polygon points="287 75.2 294.8 70.7 287 66.2 287 75.2"></polygon>
  </g>
  <g>
    <line class="st0" x1="382.6" y1="49.4" x2="622" y2="49.4"></line>
    <polygon points="620.7 53.9 628.5 49.4 620.7 44.9 620.7 53.9"></polygon>
  </g>
  <g>
    <line class="st0" x1="382.6" y1="92" x2="450.5" y2="92"></line>
    <polygon points="449.2 96.5 457 92 449.2 87.6 449.2 96.5"></polygon>
  </g>
  <g>
    <line class="st0" x1="554.1" y1="92" x2="622.2" y2="92"></line>
    <polygon points="620.9 96.5 628.7 92 620.9 87.6 620.9 96.5"></polygon>
  </g>
  <g>
    <line class="st0" x1="382.6" y1="217.8" x2="622" y2="217.8"></line>
    <polygon points="620.7 222.3 628.5 217.8 620.7 213.4 620.7 222.3"></polygon>
  </g>
  <g>
    <line class="st0" x1="382.6" y1="260.5" x2="450.5" y2="260.5"></line>
    <polygon points="449.2 265 457 260.5 449.2 256 449.2 265"></polygon>
  </g>
  <g>
    <line class="st0" x1="382.8" y1="386.3" x2="622.2" y2="386.3"></line>
    <polygon points="620.9 390.8 628.7 386.3 620.9 381.8 620.9 390.8"></polygon>
  </g>
  <g>
    <line class="st0" x1="382.8" y1="429" x2="450.5" y2="429"></line>
    <polygon points="449.2 433.5 457 429 449.2 424.5 449.2 433.5"></polygon>
  </g>
  <g>
    <line class="st0" x1="235.4" y1="239.2" x2="288.3" y2="239.2"></line>
    <polygon points="287 243.6 294.8 239.2 287 234.7 287 243.6"></polygon>
  </g>
  <g>
    <line class="st0" x1="235.4" y1="407.6" x2="288.3" y2="407.6"></line>
    <polygon points="287 412.1 294.8 407.6 287 403.1 287 412.1"></polygon>
  </g>
  <rect class="st6" x="97.9" y="359.1" width="137.6" height="97.1" rx="4" ry="4"></rect>
  <rect class="st6" x="294.8" y="22.1" width="87.8" height="97.1" rx="4" ry="4"></rect>
  <rect class="st6" x="294.8" y="190.6" width="87.8" height="97.1" rx="4" ry="4"></rect>
  <rect class="st6" x="294.8" y="359.1" width="87.8" height="97.1" rx="4" ry="4"></rect>
  <g>
    <line class="st0" x1="747.6" y1="239.2" x2="799.4" y2="239.2"></line>
    <polygon points="798.1 243.6 805.9 239.2 798.1 234.7 798.1 243.6"></polygon>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(322.3 73.3)"><tspan x="0" y="0">拆分</tspan></text>
    </g>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(472.3 96.6)"><tspan x="0" y="0">目标检测</tspan></text>
    </g>
  </g>
  <rect class="st6" x="457" y="233.2" width="97.1" height="54.4" rx="4" ry="4"></rect>
  <g>
    <line class="st0" x1="554.1" y1="260.5" x2="622.2" y2="260.5"></line>
    <polygon points="620.9 265 628.7 260.5 620.9 256 620.9 265"></polygon>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(472.3 266.1)"><tspan x="0" y="0">目标检测</tspan></text>
    </g>
  </g>
  <rect class="st6" x="457" y="401.7" width="97.1" height="54.4" rx="4" ry="4"></rect>
  <g>
    <line class="st0" x1="554.1" y1="429" x2="622.2" y2="429"></line>
    <polygon points="620.9 433.5 628.7 429 620.9 424.5 620.9 433.5"></polygon>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(472.3 434.5)"><tspan x="0" y="0">目标检测</tspan></text>
    </g>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(321.3 243.3)"><tspan x="0" y="0">拆分</tspan></text>
    </g>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st5" transform="translate(321.3 411.8)"><tspan x="0" y="0">拆分</tspan></text>
    </g>
  </g>
  <g>
    <path class="st2" d="M40.5,78.9l-5.5,7.7c-.2.3-.6.6-1,.8-1.3.6-2.8.1-3.5-1.2l-5.3-10.6c-.2-.4-.3-.8-.3-1.2,0-1.4,1.2-2.6,2.6-2.6h9.4"></path>
    <path class="st2" d="M60.7,51.9h0c3.7-1.9,8.3-.4,10.2,3.4l3.6,7.2c1.9,3.7.3,8.3-3.4,10.2l-24.7,12.3h0c-1.3.6-2.8.1-3.5-1.2l-8.1-16.1c-.6-1.3-.1-2.8,1.2-3.5l24.6-12.3Z"></path>
    <path class="st2" d="M57.1,79.7l3.7,7.5c.9,1.8,2.7,2.9,4.7,2.9h9.8"></path>
    <path class="st2" d="M75.3,84.9v10.4"></path>
    <path class="st2" d="M62.3,64.1h0"></path>
  </g>
  <g>
    <path class="st2" d="M57.3,215h-21.7c-2.7,0-4.8,2.2-4.8,4.8v38.6c0,2.7,2.2,4.8,4.8,4.8h29c2.7,0,4.8-2.2,4.8-4.8v-31.4l-12.1-12.1h0Z"></path>
    <path class="st2" d="M54.9,215v9.7c0,2.7,2.2,4.8,4.8,4.8h9.7"></path>
    <path class="st2" d="M45.3,231.9h-4.8"></path>
    <path class="st2" d="M59.8,241.6h-19.3"></path>
    <path class="st2" d="M59.8,251.2h-19.3"></path>
  </g>
  <g>
    <path class="st2" d="M50.1,408.1v17.5l-8.7-8.7"></path>
    <path class="st2" d="M50.1,425.6l8.7-8.7"></path>
    <path class="st2" d="M33.5,413.1c-6.4-5.6-7-15.2-1.4-21.6,5.6-6.4,15.2-7,21.6-1.4,2.2,1.9,3.8,4.4,4.6,7.1h3.9c5.4,0,9.8,4.4,9.8,9.8s-1.7,6.5-4.5,8.3"></path>
  </g>
  <g>
    <rect class="st2" x="947.6" y="216" width="51.5" height="36" rx="4" ry="4"></rect>
    <line class="st2" x1="963" y1="262.3" x2="983.6" y2="262.3"></line>
    <line class="st2" x1="973.3" y1="252" x2="973.3" y2="262.3"></line>
  </g>
  <g>
    <line class="st0" x1="92.2" y1="70.7" x2="74.2" y2="70.7"></line>
    <polygon points="91 66.7 97.9 70.7 91 74.7 91 66.7"></polygon>
  </g>
  <g>
    <line class="st0" x1="92.3" y1="241.4" x2="70.3" y2="241.4"></line>
    <polygon points="91.1 237.4 98 241.4 91.1 245.4 91.1 237.4"></polygon>
  </g>
  <g>
    <line class="st0" x1="92.3" y1="408.1" x2="71.9" y2="408.1"></line>
    <polygon points="91.1 404.2 98 408.1 91.1 412.1 91.1 404.2"></polygon>
  </g>
  <g class="st3">
    <g class="st3">
      <text class="st4" transform="translate(107.6 414.1)"><tspan class="st7" x="0" y="0">从</tspan><tspan class="st8" x="16.8" y="0" xml:space="preserve"> RTSP </tspan><tspan class="st7" x="68.5" y="0">流读取</tspan></text>
    </g>
  </g>
</svg>

**图：目标检测应用程序工作流**

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 640 400" width="640" height="400" style="cursor:auto !important" aria-label="">
    <defs>
      <style>@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap");
.svg-7 .bg-fill { fill: var(--color-background) }
.svg-7 .fill-text { color: var(--color-content); fill: var(--color-content) }
.svg-7 .video-hoverbox { transition: opacity 0.15s ease-in-out }
.svg-7 .video-hoverbox:hover { opacity: 0.9 }
 { fill: #000000; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-7 .st2 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-7 .st3 { fill: #ffffff; stroke: none; stroke-linecap: butt; stroke-width: 6.375 }
.svg-7 .st4 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-7 .st5 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
  </defs>

  <foreignobject x="0" y="0" width="640" height="400">
    
        <iframe width="640" height="400" src="https://players.brightcove.net/1414329538001/4JiZQnWhg_default/index.html?videoId=6380739279112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Nov 04, 2025</div><div class="prev-and-next-links"><span class="previous-topic-link"><span aria-hidden="true" class="disabled" data-tip="" data-effect="solid"></span></span></div></div>
    </foreignobject>

</svg>

**视频：目标检测应用程序**

**使用示例**

必须将模型和标签文件推送到设备才能运行示例应用程序。有关详细信息，请参阅[程序](https://docs.qualcomm.com/doc/80-70022-251Y/topic/run-apps-manually-on-host.html#procedure-ai)。

1. 开始新的 SSH 会话并启动 HDMI 显示器（如果尚未启动）：

ssh root@<ip-addr of the target device>
        Copy to clipboard
2. 要在 HDMI 显示器上查看示例应用程序，请从 SSH 终端运行以下 export 命令：

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_ DISPLAY=wayland-1
        Copy to clipboard
3. 编辑您设备上的 `/etc/configs/config_detection.json` 文件。

{
           "file-path": "/etc/media/video.mp4",
           "ml-framework": "tflite",
           "yolo-model-type": "yolox",
           "model": "/etc/models/yolox_quantized.tflite",
           "labels": "/etc/labels/yolox.json",
           "threshold": 40,
           "runtime": "dsp"
        }
        Copy to clipboard

有关 <cite>config_detection.json</cite> 文件中字段的更多信息，请参阅[配置 JSON 字段描述](https://docs.qualcomm.com/doc/80-70022-251Y/topic/run-apps-manually-on-host.html#object-detection-config-json-field-description)。

4. 要启动应用程序，请运行以下命令：

gst-ai-object-detection
        Copy to clipboard

- 要停止用例，请按 <kbd class="kbd docutils literal notranslate">Ctrl</kbd> + <kbd class="kbd docutils literal notranslate">C</kbd>。
- 要显示可用的帮助选项，请运行以下命令：

gst-ai-object-detection -h
        Copy to clipboard
- `GST_DEBUG` 环境变量控制 GStreamer 调试输出。设置所需级别以允许记录日志。例如，要记录所有警告，可运行以下命令：

export GST_DEBUG=2
        Copy to clipboard

**Config JSON 字段说明**

| 字段 | 值/描述 |
| --- | --- |
| **ml-framework** | 请使用以下模型之一：<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><code class="docutils literal notranslate"><span class="pre">snpe</span></code>：Qualcomm<sup>®</sup> Neural Processing SDK</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">tflite</span></code>：LiteRT</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">qnn</span></code>：Qualcomm<sup>®</sup> AI Engine direct</p></li><br>> </ul> |
| **yolo-model-type** | 分别运行 `yolov5`、`yolov8`、`yolox` 和 `yolonas` 模型。有关模型和标签的更多信息，请参阅[示例模型和标签文件](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-50/gst-ai-object-detection.html#gst-ai-object-detection__section_hds_vxp_mdc)。 |
| **runtime** | 请使用以下 runtime 之一：<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><code class="docutils literal notranslate"><span class="pre">cpu</span></code></p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">gpu</span></code></p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">dsp</span></code></p></li><br>> </ul> |
| **Input source** | 请使用以下输入源之一：<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><code class="docutils literal notranslate"><span class="pre">camera</span></code>：主摄像头 (0) 或辅助摄像头 (1)</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">file-path</span></code>：视频文件的目录路径</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">rtsp-ip-port</span></code>：<code class="docutils literal notranslate"><span class="pre">rtsp://&lt;ip&gt;:&lt;port&gt;/&lt;stream&gt;</span></code> 格式的 RTSP 流地址</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">enable-usb-camera</span></code>：TRUE 或 FALSE</p></li><br>> </ul> |
| **output-ip-address** | 输出服务器 IP 地址 |
| **port** | 输出服务器端口 |
| **output-type** | 请使用以下输出类型之一：<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><code class="docutils literal notranslate"><span class="pre">waylandsink</span></code>：在 Wayland 上显示输出</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">filesink</span></code>：将输出存储在文件中</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">rtpsink</span></code>：在服务器上流传输输出</p></li><br>> </ul> |
| **USB 摄像头视频格式和分辨率** | 使用以下视频格式之一：<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><code class="docutils literal notranslate"><span class="pre">nv12</span></code></p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">yuy2</span></code></p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">mjpeg</span></code></p></li><br>> </ul><br><br><br><br>使用以下分辨率字段之一：<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><code class="docutils literal notranslate"><span class="pre">width</span></code>：输入 USB 摄像头源分辨率宽度</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">height</span></code>：输入 USB 摄像头源分辨率高度</p></li><br>> <li><p><code class="docutils literal notranslate"><span class="pre">framerate</span></code>：输入 USB 摄像头源帧率</p></li><br>> </ul> |
| **output-file** | 输出文件名。默认文件名为 `output_detection.mp4`。 |

### 并行 AI 推理

**gst-ai-parallel-inference** 命令行应用程序展示了对来自摄像头、视频文件或 RTSP 流的输入流执行四个并行推理的硬件功能。下图展示了并行 AI 推理应用程序的工作流。该 pipeline 检测目标、对目标进行分类、检测姿态、并在输入流上分割图像。屏幕并排显示结果。

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" width="991.7" height="478.3" version="1.1" viewbox="0 0 991.7 478.3" aria-label="使用 Dragonwing RB3 Gen 2 设备上的并行 AI 推理应用程序执行四个并行推理的工作流。">
  <!-- Generator: Adobe Illustrator 29.5.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 137)  -->
  <defs>
    <style>.svg-8 .st0 { letter-spacing: 0em }
.svg-8 .st0,.svg-8 .st1,.svg-8 .st2,.svg-8 .st3,.svg-8 .st4,.svg-8 .st5,.svg-8 .st6,.svg-8 .st7 { isolation: isolate }
.svg-8 .st0,.svg-8 .st1,.svg-8 .st2,.svg-8 .st3,.svg-8 .st5,.svg-8 .st6,.svg-8 .st7 { font-size: 18px }
.svg-8 .st0,.svg-8 .st1,.svg-8 .st2,.svg-8 .st5,.svg-8 .st6,.svg-8 .st7 { fill: #fff }
.svg-8 .st0,.svg-8 .st3,.svg-8 .st8,.svg-8 .st7 { font-family: SimHei, SimHei }
.svg-8 .st9,.svg-8 .st10 { stroke-miterlimit: 10 }
.svg-8 .st9,.svg-8 .st11 { fill: none; stroke: #000 }
.svg-8 .st1 { letter-spacing: 0em }
.svg-8 .st1,.svg-8 .st2,.svg-8 .st6,.svg-8 .st12 { font-family: Roboto-Regular, Roboto }
.svg-8 .st2,.svg-8 .st3,.svg-8 .st5,.svg-8 .st7 { letter-spacing: 0em }
.svg-8 .st10 { fill: #fafafa; stroke: #d2d7e1 }
.svg-8 .st13 { fill: #6280cc }
.svg-8 .st6 { letter-spacing: 0em }
.svg-8 .st11 { stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5px }</style>
  </defs>
  <rect class="st10" x="5" y="3.5" width="981.3" height="471.3" rx="7.9" ry="7.9"></rect>
  <rect class="st13" x="99.9" y="22.1" width="137.6" height="97.1" rx="4" ry="4"></rect>
  <rect class="st13" x="677.3" y="22.1" width="119.1" height="434" rx="4" ry="4"></rect>
  <rect class="st13" x="99.9" y="190.6" width="137.6" height="97.1" rx="4" ry="4"></rect>
  <text class="st7" transform="translate(112.4 76.1)"><tspan x="0" y="0">从摄像头读取</tspan></text>
  <text class="st7" transform="translate(709 244.6)"><tspan x="0" y="0">合成器</tspan></text>
  <text class="st3" transform="translate(814.6 227.2)"><tspan x="0" y="0">显示渲染</tspan></text>
  <text class="st7" transform="translate(112.4 244.6)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="st9" x1="237.4" y1="70.7" x2="290.3" y2="70.7"></line>
    <polygon points="289 75.2 296.8 70.7 289 66.2 289 75.2"></polygon>
  </g>
  <g>
    <line class="st9" x1="237.4" y1="239.2" x2="290.3" y2="239.2"></line>
    <polygon points="289 243.6 296.8 239.2 289 234.7 289 243.6"></polygon>
  </g>
  <g>
    <line class="st9" x1="237.4" y1="407.6" x2="290.3" y2="407.6"></line>
    <polygon points="289 412.1 296.8 407.6 289 403.1 289 412.1"></polygon>
  </g>
  <rect class="st13" x="99.9" y="359.1" width="137.6" height="97.1" rx="4" ry="4"></rect>
  <rect class="st13" x="296.8" y="22.1" width="87.8" height="434" rx="4" ry="4"></rect>
  <text class="st7" transform="translate(322.2 244.6)"><tspan x="0" y="0">拆分</tspan></text>
  <rect class="st13" x="436.6" y="22.1" width="197.8" height="54.4" rx="6" ry="6"></rect>
  <g>
    <line class="st9" x1="384.6" y1="49.5" x2="430.4" y2="49.5"></line>
    <polygon points="429.1 53.9 436.9 49.5 429.1 45 429.1 53.9"></polygon>
  </g>
  <g>
    <line class="st9" x1="634.4" y1="49.5" x2="670.9" y2="49.5"></line>
    <polygon points="669.6 53.9 677.3 49.5 669.6 45 669.6 53.9"></polygon>
  </g>
  <text class="st7" transform="translate(498.1 54.8)"><tspan x="0" y="0">目标检测</tspan></text>
  <g>
    <line class="st9" x1="384.6" y1="176" x2="430.4" y2="176"></line>
    <polygon points="429.1 180.5 436.9 176 429.1 171.5 429.1 180.5"></polygon>
  </g>
  <rect class="st13" x="436.6" y="148.7" width="197.8" height="54.4" rx="6" ry="6"></rect>
  <g>
    <line class="st9" x1="634.4" y1="176" x2="670.9" y2="176"></line>
    <polygon points="669.6 180.5 677.3 176 669.6 171.5 669.6 180.5"></polygon>
  </g>
  <g>
    <line class="st9" x1="796.5" y1="239.2" x2="903.2" y2="239.2"></line>
    <polygon points="901.9 243.6 909.7 239.2 901.9 234.7 901.9 243.6"></polygon>
  </g>
  <text class="st7" transform="translate(517 181.3)"><tspan x="0" y="0">分类</tspan></text>
  <g>
    <line class="st9" x1="384.6" y1="302.5" x2="430.4" y2="302.5"></line>
    <polygon points="429.1 307 436.9 302.5 429.1 298 429.1 307"></polygon>
  </g>
  <rect class="st13" x="436.6" y="275.2" width="197.8" height="54.4" rx="6" ry="6"></rect>
  <g>
    <line class="st9" x1="634.4" y1="302.5" x2="670.9" y2="302.5"></line>
    <polygon points="669.6 307 677.3 302.5 669.6 298 669.6 307"></polygon>
  </g>
  <text class="st0" transform="translate(507.8 307.8)"><tspan x="0" y="0">后估计</tspan></text>
  <g>
    <line class="st9" x1="384.7" y1="429" x2="430.4" y2="429"></line>
    <polygon points="429.1 433.5 436.9 429 429.1 424.6 429.1 433.5"></polygon>
  </g>
  <rect class="st13" x="436.6" y="401.7" width="197.8" height="54.4" rx="6" ry="6"></rect>
  <g>
    <line class="st9" x1="634.4" y1="429" x2="670.9" y2="429"></line>
    <polygon points="669.6 433.5 677.3 429 669.6 424.6 669.6 433.5"></polygon>
  </g>
  <text class="st7" transform="translate(517 434.4)"><tspan x="0" y="0">分割</tspan></text>
  <g>
    <path class="st11" d="M42.5,78.9l-5.5,7.7c-.2.3-.6.6-1,.8-1.3.6-2.8.1-3.5-1.2l-5.3-10.6c-.2-.4-.3-.8-.3-1.2,0-1.4,1.2-2.6,2.6-2.6h9.4"></path>
    <path class="st11" d="M62.7,51.9h0c3.7-1.9,8.3-.4,10.2,3.4l3.6,7.2c1.9,3.7.3,8.3-3.4,10.2l-24.7,12.3h0c-1.3.6-2.8.1-3.5-1.2l-8.1-16.1c-.6-1.3-.1-2.8,1.2-3.5l24.6-12.3Z"></path>
    <path class="st11" d="M59.1,79.7l3.7,7.5c.9,1.8,2.7,2.9,4.7,2.9h9.8"></path>
    <path class="st11" d="M77.3,84.9v10.4"></path>
    <path class="st11" d="M64.3,64.1h0"></path>
  </g>
  <g>
    <path class="st11" d="M59.3,215h-21.7c-2.7,0-4.8,2.2-4.8,4.8v38.6c0,2.7,2.2,4.8,4.8,4.8h29c2.7,0,4.8-2.2,4.8-4.8v-31.4l-12.1-12.1h0Z"></path>
    <path class="st11" d="M56.9,215v9.7c0,2.7,2.2,4.8,4.8,4.8h9.7"></path>
    <path class="st11" d="M47.3,231.9h-4.8"></path>
    <path class="st11" d="M61.8,241.6h-19.3"></path>
    <path class="st11" d="M61.8,251.2h-19.3"></path>
  </g>
  <g>
    <path class="st11" d="M52.1,408.1v17.5l-8.7-8.7"></path>
    <path class="st11" d="M52.1,425.6l8.7-8.7"></path>
    <path class="st11" d="M35.5,413.1c-6.4-5.6-7-15.2-1.4-21.6,5.6-6.4,15.2-7,21.6-1.4,2.2,1.9,3.8,4.4,4.6,7.1h3.9c5.4,0,9.8,4.4,9.8,9.8s-1.7,6.5-4.5,8.3"></path>
  </g>
  <g>
    <rect class="st11" x="914.3" y="216" width="51.5" height="36" rx="4" ry="4"></rect>
    <line class="st11" x1="929.8" y1="262.3" x2="950.4" y2="262.3"></line>
    <line class="st11" x1="940.1" y1="252" x2="940.1" y2="262.3"></line>
  </g>
  <g>
    <line class="st9" x1="94.2" y1="70.7" x2="76.2" y2="70.7"></line>
    <polygon points="93 66.7 99.9 70.7 93 74.7 93 66.7"></polygon>
  </g>
  <g>
    <line class="st9" x1="94.3" y1="241.4" x2="72.3" y2="241.4"></line>
    <polygon points="93.1 237.4 100 241.4 93.1 245.4 93.1 237.4"></polygon>
  </g>
  <g>
    <line class="st9" x1="94.3" y1="408.1" x2="73.9" y2="408.1"></line>
    <polygon points="93.1 404.2 100 408.1 93.1 412.1 93.1 404.2"></polygon>
  </g>
  <g class="st4">
    <text class="st5" transform="translate(105.8 412.9)"><tspan class="st8" x="0" y="0">从</tspan><tspan class="st12" x="18.9" y="0"> </tspan></text>
    <text class="st6" transform="translate(128.1 412.9)"><tspan x="0" y="0">R</tspan></text>
    <text class="st1" transform="translate(138.1 412.9)"><tspan x="0" y="0">T</tspan></text>
    <text class="st2" transform="translate(148.4 412.9)"><tspan x="0" y="0">SP</tspan></text>
    <text class="st5" transform="translate(169.5 412.9)"><tspan class="st12" x="0" y="0"> </tspan><tspan class="st8" x="5.4" y="0">流读取</tspan></text>
  </g>
</svg>

**图：并行推理应用工作流**

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 640 400" width="640" height="400" style="cursor:auto !important" aria-label="">
    <defs>
      <style>@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap");
.svg-9 .bg-fill { fill: var(--color-background) }
.svg-9 .fill-text { color: var(--color-content); fill: var(--color-content) }
.svg-9 .video-hoverbox { transition: opacity 0.15s ease-in-out }
.svg-9 .video-hoverbox:hover { opacity: 0.9 }
 { fill: #000000; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-9 .st2 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-9 .st3 { fill: #ffffff; stroke: none; stroke-linecap: butt; stroke-width: 6.375 }
.svg-9 .st4 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-9 .st5 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
  </defs>

  <foreignobject x="0" y="0" width="640" height="400">
    
        <iframe width="640" height="400" src="https://players.brightcove.net/1414329538001/BJv5wEFt_default/index.html?videoId=6355769124112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Nov 04, 2025</div><div class="prev-and-next-links"><span class="previous-topic-link"><span aria-hidden="true" class="disabled" data-tip="" data-effect="solid"></span></span></div></div>
    </foreignobject>

</svg>

**视频：并行推理应用程序**

**使用示例**

必须将模型和标签文件推送到设备才能运行示例应用程序。有关详细信息，请参阅[程序](https://docs.qualcomm.com/doc/80-70022-251Y/topic/run-apps-manually-on-host.html#procedure-ai)。

1. 开始新的 SSH 会话并启动 HDMI 显示器（如果尚未启动）：

ssh root@<ip-addr of the target device>
        Copy to clipboard
2. 要在 HDMI 显示器上查看示例应用程序，请从 SSH 终端运行以下 export 命令：

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_ DISPLAY=wayland-1
        Copy to clipboard
3. 编辑您设备上的 `/etc/configs/config-parallel-inference.json` 文件。

{
         "file-path": "/etc/media/video.mp4",
         "detection-model": "/etc/models/yolox_quantized.tflite",
         "detection-labels": "/etc/labels/yolox.json",
         "pose-model": "/etc/models/hrnet_pose_quantized.tflite",
         "pose-labels": "/etc/labels/hrnet_pose.json",
         "segmentation-model": "/etc/models/deeplabv3_plus_mobilenet_quantized.tflite",
         "segmentation-labels": "/etc/labels/deeplabv3_resnet50.json",
         "classification-model": "/etc/models/inception_v3_quantized.tflite",
         "classification-labels": "/etc/labels/classification.json"
        }
        Copy to clipboard

有关 <cite>config-parallel-inference.json</cite> 文件中字段的更多信息，请参阅[配置 JSON 字段说明](https://docs.qualcomm.com/doc/80-70022-251Y/topic/run-apps-manually-on-host.html#config-parallel-inference-json-field-description)。

4. 要启动应用程序，请运行以下命令：

gst-ai-parallel-inference
        Copy to clipboard

    - 要停止用例，请按 <kbd class="kbd docutils literal notranslate">Ctrl</kbd> + <kbd class="kbd docutils literal notranslate">C</kbd>。
    - 要显示可用的帮助选项，请运行以下命令：

> 
> 
> gst-ai-parallel-inference -h
>         Copy to clipboard

    - `GST_DEBUG` 环境变量控制 GStreamer 调试输出。设置所需级别以允许记录日志。例如，要记录所有警告，可运行以下命令：

> 
> 
> export GST_DEBUG=2
>         Copy to clipboard

**Config JSON 字段说明**

下表描述了 <cite>config-parallel-inference.json</cite> 文件中用于配置示例应用程序输入源的字段。

| **字段** | **值/描述** |
| --- | --- |
| **Input source** | 请使用以下输入源之一：<br><ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">camera</span></code>：主摄像头 (0) 或辅助摄像头 (1)</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">file-path</span></code>：视频文件的目录路径</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">rtsp-ip-port</span></code>：<code class="docutils literal notranslate"><span class="pre">rtsp://&lt;ip&gt;:&lt;port&gt;/&lt;stream&gt;</span></code> 格式的 RTSP 流地址</p></li><br></ul> |
| **Models and labels** | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">detection-model</span></code>：检测模型的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">detection-labels</span></code>：检测标签的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">pose-model</span></code>：姿态模型的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">pose-labels</span></code>：姿态标签的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">segmentation-model</span></code>：分段模型的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">segmentation-labels</span></code>：分段标签的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">classification-model</span></code>：分类模型的路径。</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">classification-labels</span></code>：分类标签的路径。</p></li><br></ul> |

**已知问题**

在姿态检测中，即使帧中有多个人，模型也只检测一个人。

Note

使用 Inception v3 模型进行图像分类是在 ImageNet 数据集上进行训练的。因此，由于该类不包含在数据集中，因此模型无法检测到人。

Last Published: Nov 04, 2025

[Previous Topic
使用 Qualcomm Visual Studio Code Extension](https://docs.qualcomm.com/bundle/publicresource/80-70022-251Y/topics/run-apps-using-ide.md) [Next Topic
开发应用程序](https://docs.qualcomm.com/bundle/publicresource/80-70022-251Y/topics/develop_application.md)

Source: [https://docs.qualcomm.com/doc/80-70022-251Y/topic/run-apps-manually-on-host.html](https://docs.qualcomm.com/doc/80-70022-251Y/topic/run-apps-manually-on-host.html)