# 开发您自己的应用程序

您可以使用以下任一种方法编写 AI/ML 应用程序。

- 使用 Qualcomm IM SDK：您可以利用现有参考应用程序来部署模型或扩展 Qualcomm IM SDK 的功能，以添加对您自己的模型和用例的支持。下一节介绍了更多详细信息。
- 使用 AI SDK API 开发原生 C/C++ 应用程序 - 您可以利用 AI SDK 示例开发原生 AI/ML 应用程序。您需要在 C/C++ 中实现预处理/后处理。

Qualcomm IM SDK 是一个一体化的 SDK，支持无缝部署多媒体和 AI/ML 应用程序。该 SDK 采用开源多媒体框架 GStreamer，并公开了多媒体和 ML 这两个领域的 API 和插件。详细信息，请参见[官方 SDK 文档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-50/overview.html)。

Qualcomm IM SDK 实现了适用于 AI/ML 应用程序的以下插件。关于完整的插件列表，请参见 Qualcomm IM SDK [插件文档](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-50/qim-sdk-plugins.html)。

## 下载源代码以进行开发

需要设置 eSDK (extensible SDK) 才能开发应用程序/插件代码。有关设置 eSDK 以及下载和编译源代码的说明，请参阅[编译应用程序和 Qualcomm IM SDK](https://docs.qualcomm.com/doc/80-70017-15BY/topic/compile-application-qualcomm-im-sdk.html)。

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export develop-own-app-imsdk-plugins.svg develop-own-app -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="11.5052in" height="5.29646in" viewbox="0 0 828.375 381.345" xml:space="preserve" color-interpolation-filters="sRGB" class="st13 svg-1" aria-label="../_images/develop-own-app-imsdk-plugins.svg" svgdefaultwidth="828"><v:documentproperties v:langid="1033" v:viewmarkup="false">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(1):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-1 .st1 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st2 { fill: #2a2aea; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st3 { fill: #ffffff; font-family: Roboto; font-size: 1.16666em }
.svg-1 .st4 { fill: #f5f6f7; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st5 { fill: #000000; font-family: Roboto; font-size: 1.33333em; font-weight: bold }
.svg-1 .st6 { font-size: 1em }
.svg-1 .st7 { fill: #2a2aea; font-family: Roboto; font-size: 1.16666em }
.svg-1 .st8 { fill: #000000; font-family: Roboto; font-size: 1.16666em }
.svg-1 .st9 { marker-end: url("#1-mrkr13-59"); stroke: #843aff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st10 { fill: #843aff; fill-opacity: 1; stroke: #843aff; stroke-opacity: 1; stroke-width: 0.35714285714286 }
.svg-1 .st11 { marker-end: url("#1-mrkr4-65"); stroke: #843aff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st12 { fill: #ffffff; font-family: Roboto; font-size: 1.16666em; letter-spacing: -0.00714292em }
.svg-1 .st13 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend13">		<path d="M 3 1 L 0 0 L 3 -1 L 3 1 " style="stroke:none"></path>	</g>	<marker id="1-mrkr13-59" class="st10" v:arrowtype="13" v:arrowsize="1" v:setback="8.4" refx="-8.4" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend13" transform="scale(-2.8,-2.8) "></use>	</marker>	<g id="lend4">		<path d="M 2 1 L 0 0 L 2 -1 L 2 1 " style="stroke:none"></path>	</g>	<marker id="1-mrkr4-65" class="st10" v:arrowtype="4" v:arrowsize="1" v:setback="5.6" refx="-5.6" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend4" transform="scale(-2.8,-2.8) "></use>	</marker></defs><g v:mid="5" v:index="1" v:groupcontext="foregroundPage">	<title>develop-own-app</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<v:layer v:name="Connector" v:index="0"></v:layer>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(18.375,-18.375)">		<title>Sheet.2</title>		<rect x="0" y="36.75" width="791.625" height="344.595" class="st1"></rect>	</g>	<g id="shape1-3" v:mid="1" v:groupcontext="shape" transform="translate(32.5112,-177.814)">		<title>Sheet.1</title>		<desc>qtimlvconverter</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="63.6127" cy="367.201" width="127.23" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="127.225" height="28.2876" class="st2"></rect>		<text x="15.07" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlvconverter</text>		</g>	<g id="shape3-6" v:mid="3" v:groupcontext="shape" transform="translate(226.883,-72)">		<title>Sheet.3</title>		<desc>ML inference plugin selected based on model type</desc>		<v:textblock v:margins="rect(4,4,4,4)" v:verticalalign="0"></v:textblock>		<v:textrect cx="118.39" cy="241.003" width="236.79" height="280.683"></v:textrect>		<rect x="0" y="100.661" width="236.781" height="280.683" class="st4"></rect>		<text x="14.2" y="119.06" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist><tspan x="43.72" dy="1.2em" class="st6">根据模型类型</tspan>选择的ML<tspan x="43.72" dy="1.2em" class="st6">推理插件</tspan> </text>		</g>	<g id="shape4-10" v:mid="4" v:groupcontext="shape" transform="translate(560.261,-72)">		<title>Sheet.4</title>		<desc>Use cases supported by Qualcomm IM SDK</desc>		<v:textblock v:margins="rect(4,4,4,4)" v:verticalalign="0"></v:textblock>		<v:textrect cx="118.39" cy="241.003" width="236.79" height="280.683"></v:textrect>		<rect x="0" y="100.661" width="236.781" height="280.683" class="st4"></rect>		<text x="43.12" y="119.06" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist><tspan x="43.72" dy="1.2em" class="st6">支持的用例</tspan> <v:lf></v:lf><tspan x="43.72" dy="1.2em" class="st6">来自 Qualcomm IM SDK</tspan></text>		</g>	<g id="shape5-14" v:mid="5" v:groupcontext="shape" transform="translate(252.505,-110.953)">		<title>Sheet.5</title>		<desc>qtimlqnn</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="65.27" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlqnn</text>		</g>	<g id="shape6-17" v:mid="6" v:groupcontext="shape" transform="translate(249.855,-177.814)">		<title>Sheet.6</title>		<desc>qtimlsnpe</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="61.86" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlsnpe</text>		</g>	<g id="shape7-20" v:mid="7" v:groupcontext="shape" transform="translate(249.855,-247.248)">		<title>Sheet.7</title>		<desc>qtimltflite</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="62.86" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimltflite</text>		</g>	<g id="shape8-23" v:mid="8" v:groupcontext="shape" transform="translate(583.963,-164.25)">		<title>Sheet.8</title>		<desc>qtimlvsegmentation</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="30.7" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlvsegmentation</text>		</g>	<g id="shape9-26" v:mid="9" v:groupcontext="shape" transform="translate(584.705,-205.712)">		<title>Sheet.9</title>		<desc>qtimlvdetection</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="44.43" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlvdetection</text>		</g>	<g id="shape10-29" v:mid="10" v:groupcontext="shape" transform="translate(584.705,-247.891)">		<title>Sheet.10</title>		<desc>qtimlvclassification</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="32.05" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlvclassification</text>		</g>	<g id="shape11-32" v:mid="11" v:groupcontext="shape" transform="translate(583.963,-123.106)">		<title>Sheet.11</title>		<desc>qtimlvpose</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="58.34" y="371.4" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimlvpose</text>		</g>	<g id="shape12-35" v:mid="12" v:groupcontext="shape" transform="translate(226.883,-18)">		<title>Sheet.12</title>		<desc>ML inference plugins</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="118.39" cy="361.87" width="236.79" height="38.949"></v:textrect>		<rect x="0" y="342.396" width="236.781" height="38.949" class="st1"></rect>		<text x="53.45" y="366.07" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ML 推理插件</text>		</g>	<g id="shape13-38" v:mid="13" v:groupcontext="shape" transform="translate(561.11,-18.7755)">		<title>Sheet.13</title>		<desc>Qualcomm IM SDK postprocessing plugins</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="118.39" cy="361.87" width="236.79" height="38.949"></v:textrect>		<rect x="0" y="342.396" width="236.781" height="38.949" class="st1"></rect>		<text x="59.67" y="357.67" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Qualcomm IM SDK <v:lf></v:lf><tspan x="59.67" dy="1.2em" class="st6">后处理插件</tspan></text>		</g>	<g id="shape14-42" v:mid="14" v:groupcontext="shape" transform="translate(32.5112,-146.25)">		<title>Sheet.14</title>		<desc>Preprocessing</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="63.6127" cy="367.201" width="127.23" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="127.225" height="28.2876" class="st1"></rect>		<text x="18.75" y="371.4" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>预处理</text>		</g>	<g id="shape15-45" v:mid="15" v:groupcontext="shape" transform="translate(252.505,-87.1062)">		<title>Sheet.15</title>		<desc>Used by BIN models</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st1"></rect>		<text x="30.18" y="371.4" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>由 BIN 模型使用</text>		</g>	<g id="shape16-48" v:mid="16" v:groupcontext="shape" transform="translate(249.855,-153.962)">		<title>Sheet.16</title>		<desc>Used by DLC models</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st1"></rect>		<text x="28.52" y="371.4" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>由 DLC 模型使用</text>		</g>	<g id="shape17-51" v:mid="17" v:groupcontext="shape" transform="translate(249.855,-222.75)">		<title>Sheet.17</title>		<desc>Used by TFLite models</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st1"></rect>		<text x="21.93" y="371.4" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>由 TFLite 模型使用</text>		</g>	<g id="shape24-54" v:mid="24" v:groupcontext="shape" v:layermember="0" transform="translate(159.737,-182.958)">		<title>Dynamic connector</title>		<path d="M0 372.34 L58.75 372.34" class="st9"></path>	</g>	<g id="shape26-60" v:mid="26" v:groupcontext="shape" transform="translate(464.253,-191.958)">		<title>Sheet.26</title>		<path d="M0 381.34 L90.41 381.34" class="st11"></path>	</g>	<g id="shape27-66" v:mid="27" v:groupcontext="shape" transform="translate(583.963,-82.6062)">		<title>Sheet.27</title>		<desc>qtimlvsuperresolution</desc>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="92.7686" cy="367.201" width="185.54" height="28.2876"></v:textrect>		<rect x="0" y="353.057" width="185.537" height="28.2876" class="st2"></rect>		<text x="26.08" y="371.4" class="st12" v:langid="1033"><v:paragraph v:spbefore="2.95" v:horizalign="1" v:bulletsize="0.166667"></v:paragraph><v:tablist></v:tablist>QTimlv 超分辨率</text>		</g></g>
</svg>

Qualcomm IM SDK 提供以下预处理/后处理 ML 插件。开发者可以使用这些插件来开发用户自己的用例。

| **插件** | **功能** |
| --- | --- |
| qtimlvconverter | 将传入视频缓存中的数据转换为神经网络张量，同时执行所需的格式转换和大小调整。 |
| qtimlvclassification | 对分类用例的输出张量进行后处理。 |
| qtimlvdetection | 对检测用例的输出张量进行后处理。 |
| qtimlvsegmentation | 对像素类用例的输出张量进行后处理，例如图像分割、深度图处理等。 |
| qtimlvpose | 对姿势估计用例的输出张量进行后处理。 |
| qtimlvsuperresolution | 对视频超分辨率用例的输出张量进行后处理。 |

Qualcomm IM SDK 支持以下用例和相关模型。

| **Qualcomm IM SDK 支持的用例** | **支持的模型** |
| --- | --- |
| 分类 | Mobilenet 等模型。目前 Qualcomm AI Hub 已支持 11 种分类模型。新的模型将会不断添加到 AI Hub 中。 |
| 检测 | ssd-mobilenet、yolov5、yolo-nas 和 yolov8 等模型 |
| 分割 | deeplabv3\_resnet 和 ffnet 等模型 |
| 姿势检测 | posenet\_mobilenet 等模型 |
| 超分辨率 | QuickSRNet、XLSR 等模型。 |

Note

Qualcomm AI Hub 的已验证模型列表可在[在应用程序中集成 AI Hub 模型](https://docs.qualcomm.com/doc/80-70017-15BY/topic/integrate-ai-hub-models.html)中找到。

您可以使用许多具有类似后处理要求的其他模型，但建议先验证相关 Qualcomm IM SDK 插件是否支持后处理，然后再集成自己的模型。

Last Published: Jan 25, 2026

[Previous Topic
注释](https://docs.qualcomm.com/bundle/publicresource/80-70017-15BY/topics/customize-reference-app.md) [Next Topic
在应用程序中集成自定义模型](https://docs.qualcomm.com/bundle/publicresource/80-70017-15BY/topics/integrate-custom-model.md)