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

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

## 前提条件

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

Note

要启用音频，请参阅 [Qualcomm Linux 音频指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-16/enable-audio.html)。

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

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

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

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

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="1002.5" height="659.67" viewbox="0 0 1002.5 659.67" aria-label="../_images/dash-cam-app.svg">
  <defs>
    <style>.svg-1 .cls-1,.svg-1 .cls-2,.svg-1 .cls-3 { fill: #fff }
.svg-1 .cls-1,.svg-1 .cls-2,.svg-1 .cls-3,.svg-1 .cls-4 { font-size: 24px }
.svg-1 .cls-1,.svg-1 .cls-2,.svg-1 .cls-3,.svg-1 .cls-4,.svg-1 .cls-5 { isolation: isolate }
.svg-1 .cls-1,.svg-1 .cls-2,.svg-1 .cls-4 { letter-spacing: .05em }
.svg-1 .cls-1,.svg-1 .cls-3,.svg-1 .cls-6 { font-family: MicrosoftYaHeiUI, "Microsoft YaHei UI" }
.svg-1 .cls-7,.svg-1 .cls-8,.svg-1 .cls-9,.svg-1 .cls-10 { stroke-miterlimit: 10 }
.svg-1 .cls-7,.svg-1 .cls-9 { stroke-width: .75px }
.svg-1 .cls-7,.svg-1 .cls-9,.svg-1 .cls-10 { fill: none; stroke: #000 }
.svg-1 .cls-3 { letter-spacing: .04em }
.svg-1 .cls-4 { font-family: MicrosoftYaHeiUI-Bold, "Microsoft YaHei UI"; font-weight: 700 }
.svg-1 .cls-8 { fill: #fafafa; stroke: #d2d7e1 }
.svg-1 .cls-9 { stroke-dasharray: 5.01 5.01 }
.svg-1 .cls-10 { stroke-width: 2px }
.svg-1 .cls-11 { fill: #6280cc }
.svg-1 .cls-12 { font-family: Roboto-Regular, Roboto }</style>
  </defs>
  <rect class="cls-8" x=".5" y=".5" width="1001.5" height="658.67" rx="8" ry="8"></rect>
  <rect class="cls-11" x="23.25" y="66.87" width="200.3" height="83.93" rx="4" ry="4"></rect>
  <rect class="cls-11" x="379.1" y="66.87" width="222.3" height="229.52" rx="4" ry="4"></rect>
  <rect class="cls-11" x="756.95" y="66.87" width="222.3" height="229.52" rx="4" ry="4"></rect>
  <rect class="cls-11" x="23.25" y="212.46" width="200.3" height="83.93" rx="4" ry="4"></rect>
  <g class="cls-5">
    <text class="cls-2" transform="translate(74.71 115.71)"><tspan class="cls-6" x="0" y="0">摄像头 </tspan><tspan class="cls-12" x="83.9" y="0">0</tspan></text>
  </g>
  <g class="cls-5">
    <g class="cls-5">
      <text class="cls-4" transform="translate(22.72 39.3)"><tspan x="0" y="0">图像合成</tspan></text>
    </g>
  </g>
  <g class="cls-5">
    <g class="cls-5">
      <text class="cls-1" transform="translate(430.77 188.29)"><tspan x="0" y="0">图像合成器</tspan></text>
    </g>
  </g>
  <g class="cls-5">
    <text class="cls-1" transform="translate(830.9 188.51)"><tspan x="0" y="0">显示器</tspan></text>
  </g>
  <g class="cls-5">
    <g class="cls-5">
      <text class="cls-2" transform="translate(74.71 261.3)"><tspan class="cls-6" x="0" y="0">摄像头 </tspan><tspan class="cls-12" x="83.9" y="0">1</tspan></text>
    </g>
  </g>
  <g>
    <line class="cls-10" x1="223.55" y1="108.83" x2="370.49" y2="108.83"></line>
    <polygon points="368.74 114.81 379.1 108.83 368.74 102.85 368.74 114.81"></polygon>
  </g>
  <g>
    <line class="cls-10" x1="601.4" y1="181.63" x2="748.34" y2="181.63"></line>
    <polygon points="746.59 187.61 756.95 181.63 746.59 175.65 746.59 187.61"></polygon>
  </g>
  <g>
    <line class="cls-10" x1="223.55" y1="254.43" x2="370.49" y2="254.43"></line>
    <polygon points="368.74 260.41 379.1 254.43 368.74 248.44 368.74 260.41"></polygon>
  </g>
  <rect class="cls-11" x="23.25" y="405.12" width="200.3" height="83.93" rx="4" ry="4"></rect>
  <rect class="cls-11" x="379.1" y="405.12" width="222.3" height="83.93" rx="4" ry="4"></rect>
  <rect class="cls-11" x="379.1" y="550.71" width="222.3" height="83.93" rx="4" ry="4"></rect>
  <rect class="cls-11" x="23.25" y="550.71" width="200.3" height="83.93" rx="4" ry="4"></rect>
  <g class="cls-5">
    <text class="cls-2" transform="translate(74.71 453.96)"><tspan class="cls-6" x="0" y="0">摄像头 </tspan><tspan class="cls-12" x="83.9" y="0">0</tspan></text>
  </g>
  <g class="cls-5">
    <g class="cls-5">
      <text class="cls-4" transform="translate(23.25 377.55)"><tspan x="0" y="0">编码</tspan></text>
    </g>
  </g>
  <g class="cls-5">
    <g class="cls-5">
      <text class="cls-2" transform="translate(413.97 453.96)"><tspan class="cls-12" x="0" y="0">H.264</tspan><tspan class="cls-6" x="69.86" y="0" xml:space="preserve"> 编码器</tspan></text>
    </g>
  </g>
  <rect class="cls-11" x="756.95" y="405.12" width="222.3" height="83.93" rx="4" ry="4"></rect>
  <g class="cls-5">
    <text class="cls-3" transform="translate(818.66 453.96)"><tspan x="0" y="0">写入文件</tspan></text>
  </g>
  <g class="cls-5">
    <text class="cls-2" transform="translate(413.97 599.55)"><tspan class="cls-12" x="0" y="0">H.264</tspan><tspan class="cls-6" x="69.86" y="0" xml:space="preserve"> 编码器</tspan></text>
  </g>
  <g class="cls-5">
    <text class="cls-2" transform="translate(74.71 599.55)"><tspan class="cls-6" x="0" y="0">摄像头 </tspan><tspan class="cls-12" x="83.9" y="0">1</tspan></text>
  </g>
  <g>
    <line class="cls-10" x1="223.55" y1="447.08" x2="370.49" y2="447.08"></line>
    <polygon points="368.74 453.06 379.1 447.08 368.74 441.1 368.74 453.06"></polygon>
  </g>
  <g>
    <line class="cls-10" x1="601.4" y1="447.08" x2="748.34" y2="447.08"></line>
    <polygon points="746.59 453.06 756.95 447.08 746.59 441.1 746.59 453.06"></polygon>
  </g>
  <rect class="cls-11" x="756.95" y="550.71" width="222.3" height="83.93" rx="4" ry="4"></rect>
  <g class="cls-5">
    <text class="cls-3" transform="translate(818.66 599.55)"><tspan x="0" y="0">写入文件</tspan></text>
  </g>
  <g>
    <line class="cls-10" x1="601.4" y1="592.68" x2="748.34" y2="592.68"></line>
    <polygon points="746.59 598.66 756.95 592.68 746.59 586.69 746.59 598.66"></polygon>
  </g>
  <g>
    <line class="cls-10" x1="223.55" y1="592.68" x2="370.49" y2="592.68"></line>
    <polygon points="368.74 598.66 379.1 592.68 368.74 586.69 368.74 598.66"></polygon>
  </g>
  <g>
    <line class="cls-7" x1=".5" y1="332.06" x2="3" y2="332.06"></line>
    <line class="cls-9" x1="8.01" y1="332.06" x2="997" y2="332.06"></line>
    <line class="cls-7" x1="999.5" y1="332.06" x2="1002" y2="332.06"></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="../_images/dash_cam_app_11-html.svg">
    <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/BJv5wEFt_default/index.html?videoId=6355769127112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Feb 11, 2026</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 文件。

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="1019" height="472.27" viewbox="0 0 1019 472.27" aria-label="../_images/video-wall-app.svg">
  <defs>
    <style>.svg-3 .cls-1 { fill: none; stroke: #000 }
.svg-3 .cls-1,.svg-3 .cls-2 { stroke-miterlimit: 10 }
.svg-3 .cls-3,.svg-3 .cls-4 { font-family: MicrosoftYaHeiUI, "Microsoft YaHei UI" }
.svg-3 .cls-3,.svg-3 .cls-5,.svg-3 .cls-6 { fill: #fff; isolation: isolate }
.svg-3 .cls-3,.svg-3 .cls-6 { font-size: 20.11px; letter-spacing: .05em }
.svg-3 .cls-2 { fill: #fafafa; stroke: #d2d7e1 }
.svg-3 .cls-7 { fill: #6280cc }
.svg-3 .cls-8 { font-family: Roboto-Regular, Roboto }
.svg-3 .cls-5 { font-size: 20.52px; letter-spacing: .05em }</style>
  </defs>
  <rect class="cls-2" x=".5" y=".5" width="1018" height="471.27" rx="8" ry="8"></rect>
  <rect class="cls-7" x="19.12" y="19.12" width="186.08" height="69.95" rx="4" ry="4"></rect>
  <rect class="cls-7" x="284.8" y="19.12" width="185.29" height="69.95" rx="4" ry="4"></rect>
  <rect class="cls-7" x="549.69" y="19.12" width="185.29" height="434.03" rx="4" ry="4"></rect>
  <rect class="cls-7" x="814.59" y="19.12" width="185.29" height="434.03" rx="4" ry="4"></rect>
  <rect class="cls-7" x="284.8" y="140.48" width="185.29" height="69.95" rx="4" ry="4"></rect>
  <rect class="cls-7" x="19.12" y="140.48" width="186.08" height="69.95" rx="4" ry="4"></rect>
  <text class="cls-3" transform="translate(49.32 60.15)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <text class="cls-6" transform="translate(314.02 60.15)"><tspan class="cls-8" x="0" y="0">H.264 </tspan><tspan class="cls-4" x="64.52" y="0">编码器</tspan></text>
  <text class="cls-3" transform="translate(590.05 242.19)"><tspan x="0" y="0">图像合成器</tspan></text>
  <text class="cls-3" transform="translate(876.06 242.19)"><tspan x="0" y="0">显示器</tspan></text>
  <text class="cls-6" transform="translate(314.02 181.51)"><tspan class="cls-8" x="0" y="0">H.264 </tspan><tspan class="cls-4" x="64.52" y="0">编码器</tspan></text>
  <text class="cls-3" transform="translate(49.32 181.51)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="cls-1" x1="205.2" y1="54.1" x2="278.34" y2="54.1"></line>
    <polygon points="277.03 58.59 284.8 54.1 277.03 49.61 277.03 58.59"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="205.2" y1="175.46" x2="278.34" y2="175.46"></line>
    <polygon points="277.03 179.95 284.8 175.46 277.03 170.97 277.03 179.95"></polygon>
  </g>
  <rect class="cls-7" x="284.8" y="261.84" width="185.29" height="69.95" rx="4" ry="4"></rect>
  <rect class="cls-7" x="19.12" y="261.84" width="186.08" height="69.95" rx="4" ry="4"></rect>
  <text class="cls-5" transform="translate(312.72 302.99)"><tspan class="cls-8" x="0" y="0">H.264 </tspan><tspan class="cls-4" x="65.83" y="0">编码器</tspan></text>
  <text class="cls-3" transform="translate(49.32 302.87)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="cls-1" x1="205.2" y1="296.82" x2="278.34" y2="296.82"></line>
    <polygon points="277.03 301.3 284.8 296.82 277.03 292.33 277.03 301.3"></polygon>
  </g>
  <rect class="cls-7" x="284.8" y="383.2" width="185.29" height="69.95" rx="4" ry="4"></rect>
  <rect class="cls-7" x="19.12" y="383.2" width="186.08" height="69.95" rx="4" ry="4"></rect>
  <text class="cls-5" transform="translate(312.72 424.35)"><tspan class="cls-8" x="0" y="0">H.264 </tspan><tspan class="cls-4" x="65.83" y="0">编码器</tspan></text>
  <text class="cls-3" transform="translate(49.32 424.23)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="cls-1" x1="205.2" y1="418.17" x2="278.34" y2="418.17"></line>
    <polygon points="277.03 422.66 284.8 418.17 277.03 413.69 277.03 422.66"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="470.09" y1="54.1" x2="543.23" y2="54.1"></line>
    <polygon points="541.92 58.59 549.69 54.1 541.92 49.61 541.92 58.59"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="470.09" y1="175.46" x2="543.23" y2="175.46"></line>
    <polygon points="541.92 179.95 549.69 175.46 541.92 170.97 541.92 179.95"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="734.98" y1="236.14" x2="808.13" y2="236.14"></line>
    <polygon points="806.81 240.62 814.59 236.14 806.81 231.65 806.81 240.62"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="470.09" y1="296.82" x2="543.23" y2="296.82"></line>
    <polygon points="541.92 301.3 549.69 296.82 541.92 292.33 541.92 301.3"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="470.09" y1="418.17" x2="543.23" y2="418.17"></line>
    <polygon points="541.92 422.66 549.69 418.17 541.92 413.69 541.92 422.66"></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/BJv5wEFt_default/index.html?videoId=6355768068112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Feb 11, 2026</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 个流。
- `-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 设备以及运行示例应用程序。

> 
> 
> <!--?xml version="1.0" encoding="UTF-8"?-->
> <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="987.5" height="113.21" viewbox="0 0 987.5 113.21" aria-label="../_images/running-ai-workflow.svg">
>   <defs>
>     <style>.svg-5 .cls-1 { fill: none; stroke: #000 }
> .svg-5 .cls-1,.svg-5 .cls-2 { stroke-miterlimit: 10 }
> .svg-5 .cls-2 { fill: #fafafa; stroke: #d2d7e1 }
> .svg-5 .cls-3 { fill: #6280cc }
> .svg-5 .cls-4 { letter-spacing: .05em }
> .svg-5 .cls-4,.svg-5 .cls-5 { fill: #fff; font-family: MicrosoftYaHeiUI, "Microsoft YaHei UI"; font-size: 17.49px; isolation: isolate }</style>
>   </defs>
>   <rect class="cls-2" x=".5" y=".5" width="986.5" height="112.21" rx="7.88" ry="7.88"></rect>
>   <rect class="cls-3" x="20.08" y="18.33" width="259.34" height="76.55" rx="4" ry="4"></rect>
>   <text class="cls-4" transform="translate(85.91 61.87)"><tspan x="0" y="0">下载模型和标签</tspan></text>
>   <rect class="cls-3" x="380.39" y="18.33" width="292.8" height="76.55" rx="4" ry="4"></rect>
>   <text class="cls-5" transform="translate(430.59 61.87)"><tspan x="0" y="0">将下载的文件传输到设备</tspan></text>
>   <rect class="cls-3" x="774.17" y="18.33" width="191.02" height="76.55" rx="3.67" ry="3.67"></rect>
>   <text class="cls-4" transform="translate(815.02 61.87)"><tspan x="0" y="0">运行示例应用</tspan></text>
>   <g>
>     <line class="cls-1" x1="279.41" y1="56.61" x2="374.65" y2="56.61"></line>
>     <polygon points="373.48 60.6 380.39 56.61 373.48 52.62 373.48 60.6"></polygon>
>   </g>
>   <g>
>     <line class="cls-1" x1="673.19" y1="56.61" x2="768.43" y2="56.61"></line>
>     <polygon points="767.26 60.6 774.17 56.61 767.26 52.62 767.26 60.6"></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. 下载并运行自动化脚本以获取设备上的模型和标签文件：

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.5-rel -c QCS6490
        Copy to clipboard
3. 更新 JSON 文件中量化 LiteRT 模型的 `q_offset` 和 `q_scale` 常量。有关说明，请参阅[获取模型常量](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-15B/integrate-ai-hub-models.html#get-the-model-constants)。
4. 使用以下命令将下载的模型文件推送到设备上：

scp <model filename> root@<IP addr of the target device>:/etc/models
        Copy to clipboard

    **示例**

scp inception_v3_quantized.tflite root@<IP addr of the target device>:/etc/models/
        Copy to clipboard
5. 使用以下命令为测试视频创建目录：

> 
> 
> ssh root@<ip-addr of the target device>
>         Copy to clipboard
> 
> 
> mount -o remount, rw /usr
>         Copy to clipboard
> 
> 
> mkdir /etc/media/
>         Copy to clipboard
6. 从主机将测试视频文件推送到设备：

> 
> 
> scp <filename>.mp4 root@<IP address of target device>:/etc/media/
>         Copy to clipboard

### AI 目标检测

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

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="1019" height="472.27" viewbox="0 0 1019 472.27" aria-label="../_images/object-detection_app.svg">
  <defs>
    <style>.svg-6 .cls-1,.svg-6 .cls-2 { stroke-miterlimit: 10 }
.svg-6 .cls-1,.svg-6 .cls-3 { fill: none; stroke: #000 }
.svg-6 .cls-4 { letter-spacing: .01em }
.svg-6 .cls-4,.svg-6 .cls-5,.svg-6 .cls-6 { font-family: Roboto-Regular, Roboto }
.svg-6 .cls-7,.svg-6 .cls-5,.svg-6 .cls-8 { letter-spacing: .05em }
.svg-6 .cls-7,.svg-6 .cls-8 { font-family: MicrosoftYaHeiUI, "Microsoft YaHei UI" }
.svg-6 .cls-7,.svg-6 .cls-9,.svg-6 .cls-10 { isolation: isolate }
.svg-6 .cls-7,.svg-6 .cls-10 { fill: #fff; font-size: 16px }
.svg-6 .cls-2 { fill: #fafafa; stroke: #d2d7e1 }
.svg-6 .cls-11 { fill: #6280cc }
.svg-6 .cls-3 { stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5px }
.svg-6 .cls-6 { letter-spacing: .04em }</style>
  </defs>
  <rect class="cls-2" x=".5" y=".5" width="1018" height="471.27" rx="8" ry="8"></rect>
  <rect class="cls-11" x="95.39" y="19.12" width="137.57" height="97.11" rx="4" ry="4"></rect>
  <rect class="cls-11" x="454.46" y="61.7" width="97.1" height="54.44" rx="4" ry="4"></rect>
  <rect class="cls-11" x="625.96" y="19.12" width="119.11" height="434.03" rx="4" ry="4"></rect>
  <rect class="cls-11" x="803.38" y="19.12" width="119.11" height="434.03" rx="4" ry="4"></rect>
  <rect class="cls-11" x="95.39" y="187.58" width="137.57" height="97.11" rx="4" ry="4"></rect>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(115.07 72.58)"><tspan x="0" y="0">从摄像头读取</tspan></text>
    </g>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(656.33 241.15)"><tspan x="0" y="0">合成器</tspan></text>
    </g>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(838.95 241.15)"><tspan x="0" y="0">显示器</tspan></text>
    </g>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(115.6 241.04)"><tspan x="0" y="0">从文件中读取</tspan></text>
    </g>
  </g>
  <g>
    <line class="cls-1" x1="232.92" y1="67.67" x2="285.82" y2="67.67"></line>
    <polygon points="284.51 72.16 292.28 67.67 284.51 63.19 284.51 72.16"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="380.07" y1="46.34" x2="619.5" y2="46.34"></line>
    <polygon points="618.19 50.83 625.96 46.34 618.19 41.85 618.19 50.83"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="380.07" y1="89.01" x2="448" y2="89.01"></line>
    <polygon points="446.69 93.5 454.46 89.01 446.69 84.52 446.69 93.5"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="551.56" y1="89.01" x2="619.72" y2="89.01"></line>
    <polygon points="618.41 93.5 626.18 89.01 618.41 84.52 618.41 93.5"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="380.07" y1="214.8" x2="619.5" y2="214.8"></line>
    <polygon points="618.19 219.29 625.96 214.8 618.19 210.32 618.19 219.29"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="380.07" y1="257.47" x2="448" y2="257.47"></line>
    <polygon points="446.69 261.96 454.46 257.47 446.69 252.98 446.69 261.96"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="380.29" y1="383.27" x2="619.72" y2="383.27"></line>
    <polygon points="618.41 387.75 626.18 383.27 618.41 378.78 618.41 387.75"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="380.29" y1="425.93" x2="448" y2="425.93"></line>
    <polygon points="446.69 430.42 454.46 425.93 446.69 421.44 446.69 430.42"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="232.92" y1="236.14" x2="285.82" y2="236.14"></line>
    <polygon points="284.51 240.62 292.28 236.14 284.51 231.65 284.51 240.62"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="232.92" y1="404.6" x2="285.82" y2="404.6"></line>
    <polygon points="284.51 409.09 292.28 404.6 284.51 400.11 284.51 409.09"></polygon>
  </g>
  <rect class="cls-11" x="95.39" y="356.05" width="137.57" height="97.11" rx="4" ry="4"></rect>
  <rect class="cls-11" x="292.28" y="19.12" width="87.79" height="97.11" rx="4" ry="4"></rect>
  <rect class="cls-11" x="292.28" y="187.58" width="87.79" height="97.11" rx="4" ry="4"></rect>
  <rect class="cls-11" x="292.28" y="356.05" width="87.79" height="97.11" rx="4" ry="4"></rect>
  <g>
    <line class="cls-1" x1="745.07" y1="236.14" x2="796.92" y2="236.14"></line>
    <polygon points="795.61 240.62 803.38 236.14 795.61 231.65 795.61 240.62"></polygon>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(319.78 70.2)"><tspan x="0" y="0">拆分</tspan></text>
    </g>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(469.81 93.55)"><tspan x="0" y="0">目标检测</tspan></text>
    </g>
  </g>
  <rect class="cls-11" x="454.46" y="230.16" width="97.1" height="54.44" rx="4" ry="4"></rect>
  <g>
    <line class="cls-1" x1="551.56" y1="257.47" x2="619.72" y2="257.47"></line>
    <polygon points="618.41 261.96 626.18 257.47 618.41 252.98 618.41 261.96"></polygon>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(469.81 263.01)"><tspan x="0" y="0">目标检测</tspan></text>
    </g>
  </g>
  <rect class="cls-11" x="454.46" y="398.63" width="97.1" height="54.44" rx="4" ry="4"></rect>
  <g>
    <line class="cls-1" x1="551.56" y1="425.93" x2="619.72" y2="425.93"></line>
    <polygon points="618.41 430.42 626.18 425.93 618.41 421.44 618.41 430.42"></polygon>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(469.81 431.47)"><tspan x="0" y="0">目标检测</tspan></text>
    </g>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(318.78 240.24)"><tspan x="0" y="0">拆分</tspan></text>
    </g>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-7" transform="translate(318.78 408.71)"><tspan x="0" y="0">拆分</tspan></text>
    </g>
  </g>
  <g>
    <path class="cls-3" d="M37.95,75.86l-5.51,7.71c-.25.34-.57.62-.95.81-1.28.64-2.84.12-3.48-1.16l-5.28-10.56c-.18-.36-.27-.76-.27-1.16,0-1.43,1.16-2.6,2.59-2.6h9.43"></path>
    <path class="cls-3" d="M58.2,48.91h0c3.74-1.88,8.3-.37,10.18,3.38l3.58,7.24c1.86,3.74.35,8.27-3.38,10.15l-24.65,12.34h0c-1.28.64-2.84.12-3.48-1.16l-8.06-16.13c-.64-1.28-.12-2.84,1.16-3.48,0,0,24.65-12.34,24.65-12.34Z"></path>
    <path class="cls-3" d="M54.59,76.69l3.74,7.53c.89,1.76,2.7,2.87,4.67,2.86h9.76"></path>
    <path class="cls-3" d="M72.76,81.88v10.39"></path>
    <path class="cls-3" d="M59.76,61.11h.03"></path>
  </g>
  <g>
    <path class="cls-3" d="M54.85,211.99h-21.73c-2.67,0-4.83,2.16-4.83,4.83v38.63c0,2.67,2.16,4.83,4.83,4.83h28.98c2.67,0,4.83-2.16,4.83-4.83v-31.39l-12.07-12.07h-.01Z"></path>
    <path class="cls-3" d="M52.43,211.99v9.66c0,2.67,2.16,4.83,4.83,4.83h9.66"></path>
    <path class="cls-3" d="M42.77,228.89h-4.83"></path>
    <path class="cls-3" d="M57.26,238.55h-19.32"></path>
    <path class="cls-3" d="M57.26,248.21h-19.32"></path>
  </g>
  <g>
    <path class="cls-3" d="M47.6,405.12v17.48l-8.74-8.74"></path>
    <path class="cls-3" d="M47.6,422.6l8.74-8.74"></path>
    <path class="cls-3" d="M30.98,410.07c-6.36-5.56-7-15.23-1.44-21.58,5.56-6.36,15.23-7,21.58-1.44,2.17,1.9,3.76,4.38,4.59,7.14h3.91c5.43,0,9.83,4.4,9.83,9.83,0,3.34-1.7,6.46-4.51,8.27"></path>
  </g>
  <g>
    <rect class="cls-3" x="945.08" y="212.97" width="51.48" height="36.04" rx="4" ry="4"></rect>
    <line class="cls-3" x1="960.52" y1="259.3" x2="981.11" y2="259.3"></line>
    <line class="cls-3" x1="970.82" y1="249.01" x2="970.82" y2="259.3"></line>
  </g>
  <g>
    <line class="cls-1" x1="89.65" y1="67.67" x2="71.72" y2="67.67"></line>
    <polygon points="88.48 63.69 95.39 67.67 88.48 71.66 88.48 63.69"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="89.78" y1="238.41" x2="67.78" y2="238.41"></line>
    <polygon points="88.62 234.42 95.53 238.41 88.62 242.4 88.62 234.42"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="89.78" y1="405.12" x2="69.45" y2="405.12"></line>
    <polygon points="88.62 401.13 95.53 405.12 88.62 409.11 88.62 401.13"></polygon>
  </g>
  <g class="cls-9">
    <g class="cls-9">
      <text class="cls-10" transform="translate(104.72 411.07)"><tspan class="cls-8" x="0" y="0">从 </tspan><tspan class="cls-4" x="22.33" y="0">R</tspan><tspan class="cls-6" x="32.36" y="0">T</tspan><tspan class="cls-5" x="42.58" y="0">SP</tspan><tspan class="cls-8" x="63.77" y="0" xml:space="preserve"> 流读取</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="../_images/object_detection_11-html.svg">
    <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/BJv5wEFt_default/index.html?videoId=6355768259112" allowfullscreen="" allow="encrypted-media"></iframe>
    <div class="topic-detail"><div class="topic-updated-date"><span> Last Published: </span>Feb 11, 2026</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-70020-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.labels",
           "constants": "Yolox,q-offsets=<38.0, 0.0, 0.0>,q-scales=<3.6124823093414307, 0.003626860911026597, 1.0>;",
           "threshold": 40,     "runtime": "dsp"
        }
        Copy to clipboard

| 字段 | 值/描述 |
| --- | --- |
| **ml-framework** | **ml-framework** |
| `snpe` | 使用 Qualcomm^®^ Neural Processing SDK 模型. |
| `tflite` | 使用 LiteRT 模型。 |
| `qnn` | 使用 Qualcomm^®^ AI Engine Direct 模型。 |
| **yolo-model-type** | **yolo-model-type** |
| `yolov5` `yolov8` `yolox` `yolonas` | 分别运行 YOLOv5、YOLOv8、YOLOx 和 YOLO-NAS 模型。参见[示例模型和标签文件](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-50/gst-ai-object-detection.html#gst-ai-object-detection__section_hds_vxp_mdc)。 |
| **runtime** | **runtime** |
| `cpu` | 在 CPU 上运行 |
| `gpu` | 在 GPU 上运行 |
| `dsp` | 在数字信号处理器 (DSP) 上运行 |
| **Input source** | **Input source** |
| `camera` | <ul class="simple"><br><li><p>0 – 主摄像头</p></li><br><li><p>1 – 辅助摄像头</p></li><br></ul> |
| `file-path` | 视频文件的目录路径。 |
| `rtsp-ip-port` | RTSP 流的地址，格式为 `rtsp://<ip>:<port>/<stream>` |

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

### 并行 AI 推理

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

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="982.33" height="472.27" viewbox="0 0 982.33 472.27" aria-label="../_images/parallel-inferencing-app.svg">
  <defs>
    <style>.svg-8 .cls-1,.svg-8 .cls-2 { stroke-miterlimit: 10 }
.svg-8 .cls-1,.svg-8 .cls-3 { fill: none; stroke: #000 }
.svg-8 .cls-4 { letter-spacing: .04em }
.svg-8 .cls-4,.svg-8 .cls-5,.svg-8 .cls-6,.svg-8 .cls-7,.svg-8 .cls-8,.svg-8 .cls-9,.svg-8 .cls-10 { isolation: isolate }
.svg-8 .cls-4,.svg-8 .cls-5,.svg-8 .cls-7,.svg-8 .cls-8,.svg-8 .cls-9,.svg-8 .cls-10 { font-size: 18px }
.svg-8 .cls-4,.svg-8 .cls-5,.svg-8 .cls-7,.svg-8 .cls-9,.svg-8 .cls-10 { fill: #fff }
.svg-8 .cls-4,.svg-8 .cls-8,.svg-8 .cls-10 { font-family: MicrosoftYaHeiUI, "Microsoft YaHei UI" }
.svg-8 .cls-5,.svg-8 .cls-7,.svg-8 .cls-9 { font-family: Roboto-Regular, Roboto }
.svg-8 .cls-5,.svg-8 .cls-8,.svg-8 .cls-10 { letter-spacing: .05em }
.svg-8 .cls-2 { fill: #fafafa; stroke: #d2d7e1 }
.svg-8 .cls-11 { fill: #6280cc }
.svg-8 .cls-7 { letter-spacing: .01em }
.svg-8 .cls-3 { stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5px }
.svg-8 .cls-9 { letter-spacing: .02em }</style>
  </defs>
  <rect class="cls-2" x=".5" y=".5" width="981.33" height="471.27" rx="7.85" ry="7.85"></rect>
  <rect class="cls-11" x="95.39" y="19.12" width="137.57" height="97.11" rx="4" ry="4"></rect>
  <rect class="cls-11" x="672.85" y="19.12" width="119.11" height="434.03" rx="4" ry="4"></rect>
  <rect class="cls-11" x="95.39" y="187.58" width="137.57" height="97.11" rx="4" ry="4"></rect>
  <text class="cls-10" transform="translate(107.93 73.09)"><tspan x="0" y="0">从摄像头读取</tspan></text>
  <text class="cls-10" transform="translate(704.51 241.55)"><tspan x="0" y="0">合成器</tspan></text>
  <text class="cls-8" transform="translate(810.12 224.18)"><tspan x="0" y="0">显示渲染</tspan></text>
  <text class="cls-10" transform="translate(107.92 241.55)"><tspan x="0" y="0">从文件中读取</tspan></text>
  <g>
    <line class="cls-1" x1="232.92" y1="67.67" x2="285.82" y2="67.67"></line>
    <polygon points="284.51 72.16 292.28 67.67 284.51 63.19 284.51 72.16"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="232.92" y1="236.14" x2="285.82" y2="236.14"></line>
    <polygon points="284.51 240.62 292.28 236.14 284.51 231.65 284.51 240.62"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="232.92" y1="404.6" x2="285.82" y2="404.6"></line>
    <polygon points="284.51 409.09 292.28 404.6 284.51 400.11 284.51 409.09"></polygon>
  </g>
  <rect class="cls-11" x="95.39" y="356.05" width="137.57" height="97.11" rx="4" ry="4"></rect>
  <rect class="cls-11" x="292.28" y="19.12" width="87.79" height="434.03" rx="4" ry="4"></rect>
  <text class="cls-10" transform="translate(317.72 241.55)"><tspan x="0" y="0">拆分</tspan></text>
  <rect class="cls-11" x="432.07" y="19.12" width="197.81" height="54.44" rx="6" ry="6"></rect>
  <g>
    <line class="cls-1" x1="380.07" y1="46.43" x2="425.92" y2="46.43"></line>
    <polygon points="424.61 50.91 432.38 46.43 424.61 41.94 424.61 50.91"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="629.88" y1="46.43" x2="666.39" y2="46.43"></line>
    <polygon points="665.08 50.91 672.85 46.43 665.08 41.94 665.08 50.91"></polygon>
  </g>
  <text class="cls-10" transform="translate(493.62 51.76)"><tspan x="0" y="0">目标检测</tspan></text>
  <g>
    <line class="cls-1" x1="380.07" y1="172.96" x2="425.92" y2="172.96"></line>
    <polygon points="424.61 177.45 432.38 172.96 424.61 168.47 424.61 177.45"></polygon>
  </g>
  <rect class="cls-11" x="432.07" y="145.65" width="197.81" height="54.44" rx="6" ry="6"></rect>
  <g>
    <line class="cls-1" x1="629.88" y1="172.96" x2="666.39" y2="172.96"></line>
    <polygon points="665.08 177.45 672.85 172.96 665.08 168.47 665.08 177.45"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="791.96" y1="236.14" x2="898.71" y2="236.14"></line>
    <polygon points="897.39 240.62 905.17 236.14 897.39 231.65 897.39 240.62"></polygon>
  </g>
  <text class="cls-10" transform="translate(512.53 178.29)"><tspan x="0" y="0">分类</tspan></text>
  <g>
    <line class="cls-1" x1="380.07" y1="299.49" x2="425.92" y2="299.49"></line>
    <polygon points="424.61 303.98 432.38 299.49 424.61 295 424.61 303.98"></polygon>
  </g>
  <rect class="cls-11" x="432.07" y="272.18" width="197.81" height="54.44" rx="6" ry="6"></rect>
  <g>
    <line class="cls-1" x1="629.88" y1="299.49" x2="666.39" y2="299.49"></line>
    <polygon points="665.08 303.98 672.85 299.49 665.08 295 665.08 303.98"></polygon>
  </g>
  <text class="cls-4" transform="translate(503.27 304.82)"><tspan x="0" y="0">后估计</tspan></text>
  <g>
    <line class="cls-1" x1="380.22" y1="426.02" x2="425.92" y2="426.02"></line>
    <polygon points="424.61 430.51 432.38 426.02 424.61 421.53 424.61 430.51"></polygon>
  </g>
  <rect class="cls-11" x="432.07" y="398.71" width="197.81" height="54.44" rx="6" ry="6"></rect>
  <g>
    <line class="cls-1" x1="629.88" y1="426.02" x2="666.39" y2="426.02"></line>
    <polygon points="665.08 430.51 672.85 426.02 665.08 421.53 665.08 430.51"></polygon>
  </g>
  <text class="cls-10" transform="translate(512.53 431.35)"><tspan x="0" y="0">分割</tspan></text>
  <g>
    <path class="cls-3" d="M37.95,75.86l-5.51,7.71c-.25.34-.57.62-.95.81-1.28.64-2.84.12-3.48-1.16l-5.28-10.56c-.18-.36-.27-.76-.27-1.16,0-1.43,1.16-2.6,2.59-2.6h9.43"></path>
    <path class="cls-3" d="M58.2,48.91h0c3.74-1.88,8.3-.37,10.18,3.38l3.58,7.24c1.86,3.74.35,8.27-3.38,10.15l-24.65,12.34h0c-1.28.64-2.84.12-3.48-1.16l-8.06-16.13c-.64-1.28-.12-2.84,1.16-3.48,0,0,24.65-12.34,24.65-12.34Z"></path>
    <path class="cls-3" d="M54.59,76.69l3.74,7.53c.89,1.76,2.7,2.87,4.67,2.86h9.76"></path>
    <path class="cls-3" d="M72.76,81.88v10.39"></path>
    <path class="cls-3" d="M59.76,61.11h.03"></path>
  </g>
  <g>
    <path class="cls-3" d="M54.85,211.99h-21.73c-2.67,0-4.83,2.16-4.83,4.83v38.63c0,2.67,2.16,4.83,4.83,4.83h28.98c2.67,0,4.83-2.16,4.83-4.83v-31.39l-12.07-12.07h-.01Z"></path>
    <path class="cls-3" d="M52.43,211.99v9.66c0,2.67,2.16,4.83,4.83,4.83h9.66"></path>
    <path class="cls-3" d="M42.77,228.89h-4.83"></path>
    <path class="cls-3" d="M57.26,238.55h-19.32"></path>
    <path class="cls-3" d="M57.26,248.21h-19.32"></path>
  </g>
  <g>
    <path class="cls-3" d="M47.6,405.12v17.48l-8.74-8.74"></path>
    <path class="cls-3" d="M47.6,422.6l8.74-8.74"></path>
    <path class="cls-3" d="M30.98,410.07c-6.36-5.56-7-15.23-1.44-21.58,5.56-6.36,15.23-7,21.58-1.44,2.17,1.9,3.76,4.38,4.59,7.14h3.91c5.43,0,9.83,4.4,9.83,9.83,0,3.34-1.7,6.46-4.51,8.27"></path>
  </g>
  <g>
    <rect class="cls-3" x="909.85" y="212.97" width="51.48" height="36.04" rx="4" ry="4"></rect>
    <line class="cls-3" x1="925.3" y1="259.3" x2="945.89" y2="259.3"></line>
    <line class="cls-3" x1="935.59" y1="249.01" x2="935.59" y2="259.3"></line>
  </g>
  <g>
    <line class="cls-1" x1="89.65" y1="67.67" x2="71.72" y2="67.67"></line>
    <polygon points="88.48 63.69 95.39 67.67 88.48 71.66 88.48 63.69"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="89.78" y1="238.41" x2="67.78" y2="238.41"></line>
    <polygon points="88.62 234.42 95.53 238.41 88.62 242.4 88.62 234.42"></polygon>
  </g>
  <g>
    <line class="cls-1" x1="89.78" y1="405.12" x2="69.45" y2="405.12"></line>
    <polygon points="88.62 401.13 95.53 405.12 88.62 409.11 88.62 401.13"></polygon>
  </g>
  <g class="cls-6">
    <text class="cls-10" transform="translate(101.28 409.88)"><tspan x="0" y="0">从 </tspan></text>
    <text class="cls-7" transform="translate(123.61 409.89)"><tspan x="0" y="0">R</tspan></text>
    <text class="cls-9" transform="translate(133.64 409.89)"><tspan x="0" y="0">T</tspan></text>
    <text class="cls-5" transform="translate(143.86 409.89)"><tspan x="0" y="0">SP</tspan></text>
    <text class="cls-10" transform="translate(165.05 409.89)"><tspan x="0" y="0" xml:space="preserve"> 流读取</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="../_images/parallel_inferencing_11-html.svg">
    <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>Feb 11, 2026</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-70020-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.labels",
         "detection-constants": "Yolox,q-offsets=<38.0, 0.0, 0.0>,q-scales=<3.6124823093414307, 0.003626860911026597, 1.0>;",
         "pose-model": "/etc/models/hrnet_pose_quantized.tflite",     "pose-labels": "/etc/labels/hrnet_pose.labels",
         "pose-constants" : "Posenet,q-offsets=<8.0>,q-scales=<0.0040499246679246426>;",
         "segmentation-model": "/etc/models/deeplabv3_plus_mobilenet_quantized.tflite",
         "segmentation-labels": "/etc/labels/deeplabv3_resnet50.labels",
         "segmentation-constants": "deeplab,q-offsets=<0.0>,q-scales=<1.0>;",
         "classification-model": "/etc/models/inception_v3_quantized.tflite",
         "classification-labels": "/etc/labels/classification.labels",
         "classification-constants": "Inceptionv3,q-offsets=<38.0>,q-scales=<0.17039915919303894>;"
        }
        Copy to clipboard

    下表介绍了用于配置示例应用程序的输入源的配置文件字段。

| **字段** | **值/描述** |
| --- | --- |
| **Input source** | **Input source** |
| camera | <ul class="simple"><br><li><p>0 – 主摄像头</p></li><br><li><p>1 – 辅助摄像头</p></li><br></ul> |
| file-path | 视频文件的目录路径。 |
| rtsp-ip-port | RTSP 流的地址，格式为 `rtsp://<ip>:<port>/<stream>` |

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

    Qualcomm AI Hub 经常使用最新的 SDK 版本更新模型。使用错误的模型常量可能会导致结果不准确。如果您遇到此类问题，请更新配置文件中的模型常量。
- `GST_DEBUG` 环境变量控制 GStreamer 调试输出。设置所需级别以允许记录日志。例如，要记录所有警告，可运行以下命令：

export GST_DEBUG=2
        Copy to clipboard

**已知问题**

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

Note

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

Last Published: Feb 11, 2026

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

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