# qtimltflite

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimltflite.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimltflite.html)

qtimltflite 插件以 GStreamer 插件的形式展示了 LiteRT 功能（加载并运行 LiteRT 模型）。

此插件执行以下操作：

- 接受由预处理元素（如 qtimlvconverter）准备的张量。
- 生成可通过后处理插件（如 qtimlvclassification、qtimlvdetection、qtimlvsegmentation 和 qtimlvpose）解析的输出张量。
- 使用 LiteRT 库。
- 使用 GstMLBufferPool 自定义缓存类通过 IOCTL 命令分配给内核的 ION/DMA 缓存。

模型和 delegate 的用法如下：

- 如需使用模型，请通过 model 属性提供模型的绝对路径。
    加载后，模型文件将提供输入和输出功能：

    - 张量数
    - 维数
    - 类型
- 如果未指定 delegate，则插件将在 CPU 上执行模型操作。
- 如需选择其他 delegate，请相应地设置 delegate 属性。有关详细信息，请参阅 [Table : qtimltflite 的元素属性](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimltflite.html#qtimltflite__table_txf_2k4_myb)。

Figure : 使用 qtimltflite 的 GstBuffer 工作流
            
            <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<!-- Generated by Microsoft Visio, SVG Export gstbuffer_workflow_qtimltflite.svg gstbuffer_workflow_qtimltflite -->
<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.5976in" height="6.24237in" viewbox="0 0 835.026 449.45" xml:space="preserve" color-interpolation-filters="sRGB" class="st25"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-1 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st3 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st4 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-1 .st5 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st6 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-1 .st7 { font-family: SimHei; font-size: 1em; font-weight: normal }
.svg-1 .st8 { font-size: 1em }
.svg-1 .st9 { font-family: Calibri; font-size: 1em }
.svg-1 .st10 { font-size: 1em; font-weight: normal }
.svg-1 .st11 { font-family: Calibri; font-size: 1em; font-weight: normal }
.svg-1 .st12 { stroke: #b3b7bf; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st13 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st14 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st15 { font-family: SimHei; font-size: 1em }
.svg-1 .st16 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st17 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st18 { fill: #000000; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st19 { fill: none }
.svg-1 .st20 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-1 .st21 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-1 .st22 { fill: #000000; font-family: SimHei; font-size: 1.00001em }
.svg-1 .st23 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-1 .st24 { fill: none; stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st25 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>gstbuffer_workflow_qtimltflite</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="shape3-1" v:mid="3" v:groupcontext="shape" transform="translate(0.374886,-0.374863)">		<title>Sheet.3</title>		<path d="M0 443.83 A5.62513 5.62513 -180 0 0 5.63 449.45 L828.65 449.45 A5.62513 5.62513 -180 0 0 834.28 443.83 L834.28					 6.37 A5.62513 5.62513 -180 0 0 828.65 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 443.83 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M829.03 0.75 C831.92 0.75 834.28 3.11 834.28 6 L834.28 443.45 C834.28 446.35 831.92 448.7 829.03 448.7 L6 448.7					 C3.11 448.7 0.75 446.35 0.75 443.45 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L829.03 0.75 ZM829.03 0 L6 0 C2.69					 0 0 2.69 0 6 L0 443.45 C0 446.76 2.69 449.45 6 449.45 L829.03 449.45 C832.34 449.45 835.03 446.76 835.03					 443.45 L835.03 6 C835.03 2.69 832.34 0 829.03 0 Z" class="st2"></path>	</g>	<g id="shape5-5" v:mid="5" v:groupcontext="shape" transform="translate(375.513,-422.198)">		<title>Sheet.5</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="42" cy="442.25" width="84.01" height="14.4"></v:textrect>		<rect x="0" y="435.05" width="84" height="14.4" class="st3"></rect>		<text x="19.2" y="445.85" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape7-8" v:mid="7" v:groupcontext="shape" transform="translate(282.071,-251.448)">		<title>Sheet.7</title>		<desc>GstBuffer</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="135.442" cy="369.099" width="270.89" height="160.703"></v:textrect>		<path d="M0 446.45 A3.00007 3.00007 -180 0 0 3 449.45 L267.88 449.45 A3.00007 3.00007 -180 0 0 270.88 446.45 L270.88					 291.75 A3.00007 3.00007 -180 0 0 267.88 288.75 L3 288.75 A3.00007 3.00007 -180 0 0 0 291.75 L0 446.45 Z" class="st5"></path>		<text x="109.32" y="306.75" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GstBuffer</text>		</g>	<g id="shape9-11" v:mid="9" v:groupcontext="shape" transform="translate(291.884,-313.676)">		<title>Sheet.9</title>		<desc>+ GstMemory: 包含单个张量 示例1x513x513x3 + GstMemory: 下一个张量等… + ...</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="130.808" cy="416.733" width="261.62" height="65.4342"></v:textrect>		<rect x="0" y="384.016" width="261.616" height="65.4342" class="st3"></rect>		<text x="0" y="396" class="st6" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstMemory:<v:tabchar></v:tabchar><tspan dx="2.675em" class="st7">包含单个张量<v:newlinechar></v:newlinechar><v:paragraph v:indentleft="79.2"></v:paragraph><v:tabchar></v:tabchar></tspan><tspan x="108" dy="1.331em" class="st7">示例</tspan><tspan class="st7">：1</tspan><tspan class="st7">x513x513x3<v:newlinechar></v:newlinechar><v:paragraph></v:paragraph></tspan><tspan x="0" dy="1.331em" class="st8">+ GstMemory:<v:tabchar></v:tabchar></tspan><tspan dx="2.675em" class="st7">下一个张量等</tspan><tspan class="st7">…<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.233em" class="st9">+ ...</tspan></text>		</g>	<g id="shape11-22" v:mid="11" v:groupcontext="shape" transform="translate(291.884,-264.176)">		<title>Sheet.11</title>		<desc>+ GstVideoMeta: 描述 raw 数据单个张量的 + GstVideoMeta: 下一个张量条目的 meta</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="130.834" cy="430.666" width="261.67" height="37.5685"></v:textrect>		<rect x="0" y="411.882" width="261.668" height="37.5685" class="st3"></rect>		<text x="0" y="423.86" class="st6" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstVideoMeta:<v:tabchar></v:tabchar><tspan dx="1.511em" class="st7">描述</tspan><tspan class="st10"> </tspan><tspan class="st10">raw </tspan><tspan class="st7">数据单个张量的<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.331em" class="st8">+ GstVideoMeta:<v:tabchar></v:tabchar></tspan><tspan dx="1.511em" class="st7">下一个张量条目的</tspan><tspan class="st11"> </tspan><tspan class="st10">meta</tspan></text>		</g>	<g id="shape14-33" v:mid="14" v:groupcontext="shape" transform="translate(282.071,-383.824)">		<title>Sheet.14</title>		<path d="M0 449.45 L270.88 449.45" class="st12"></path>	</g>	<g id="shape15-36" v:mid="15" v:groupcontext="shape" transform="translate(282.071,-310.017)">		<title>Sheet.15</title>		<path d="M0 449.45 L270.88 449.45" class="st12"></path>	</g>	<g id="shape16-39" v:mid="16" v:groupcontext="shape" transform="translate(-31.9375,210.078) rotate(-90)">		<title>Sheet.16</title>		<path d="M0 449.45 L12.08 449.45" class="st13"></path>	</g>	<g id="shape26-42" v:mid="26" v:groupcontext="shape" transform="translate(15.0001,-190.219)">		<title>Sheet.26</title>		<desc>ML 预处理插件</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="67.5" cy="430.7" width="135.01" height="37.5"></v:textrect>		<path d="M0 446.45 A3.00007 3.00007 -180 0 0 3 449.45 L132 449.45 A3.00007 3.00007 -180 0 0 135 446.45 L135 414.95 A3.00007					 3.00007 -180 0 0 132 411.95 L3 411.95 A3.00007 3.00007 -180 0 0 0 414.95 L0 446.45 Z" class="st5"></path>		<text x="27.55" y="434.69" class="st14" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ML <tspan class="st15">预处理插件</tspan></text>		</g>	<g id="group28-46" transform="translate(150.375,-205.977)" v:mid="28" v:groupcontext="group">		<title>Sheet.28</title>		<g id="shape29-47" v:mid="29" v:groupcontext="shape" transform="translate(0,-2.99181)">			<title>Sheet.29</title>			<path d="M0 449.45 L194.46 449.45" class="st13"></path>		</g>		<g id="shape30-50" v:mid="30" v:groupcontext="shape" transform="translate(193.589,0)">			<title>Sheet.30</title>			<path d="M0 449.45 L5.18 446.46 L0 443.47 L0 449.45 Z" class="st16"></path>		</g>	</g>	<g id="group31-52" transform="translate(487.263,-205.977)" v:mid="31" v:groupcontext="group">		<title>Sheet.31</title>		<g id="shape32-53" v:mid="32" v:groupcontext="shape" transform="translate(0,-2.99181)">			<title>Sheet.32</title>			<path d="M0 449.45 L191.58 449.45" class="st13"></path>		</g>		<g id="shape33-56" v:mid="33" v:groupcontext="shape" transform="translate(190.707,0)">			<title>Sheet.33</title>			<path d="M0 449.45 L5.18 446.46 L0 443.47 L0 449.45 Z" class="st16"></path>		</g>	</g>	<g id="shape35-58" v:mid="35" v:groupcontext="shape" transform="translate(350.013,-190.219)">		<title>Sheet.35</title>		<desc>qtimltflite</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="67.5" cy="430.7" width="135" height="37.5"></v:textrect>		<path d="M0 446.45 A3.00007 3.00007 -180 0 0 3 449.45 L132 449.45 A3.00007 3.00007 -180 0 0 135 446.45 L135 414.95 A3.00007					 3.00007 -180 0 0 132 411.95 L3 411.95 A3.00007 3.00007 -180 0 0 0 414.95 L0 446.45 Z" class="st17"></path>		<text x="41.86" y="434.3" class="st14" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtimltflite</text>		</g>	<g id="shape37-61" v:mid="37" v:groupcontext="shape" transform="translate(178.281,-189.919)">		<title>Sheet.37</title>		<desc>neural-network/tensors</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="71.4792" cy="442.25" width="142.96" height="14.4"></v:textrect>		<rect x="0" y="435.05" width="142.958" height="14.4" class="st3"></rect>		<text x="9.26" y="445.85" class="st18" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>neural-network/tensors</text>		</g>	<g id="shape38-64" v:mid="38" v:groupcontext="shape" transform="translate(514.734,-189.919)">		<title>Sheet.38</title>		<desc>neural-network/tensors</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="70.4726" cy="442.25" width="140.95" height="14.4"></v:textrect>		<rect x="0" y="435.05" width="140.945" height="14.4" class="st3"></rect>		<text x="8.26" y="445.85" class="st18" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>neural-network/tensors</text>		</g>	<g id="group50-67" transform="translate(235.654,-210.315)" v:mid="50" v:groupcontext="group">		<title>Sheet.50</title>		<g id="shape51-68" v:mid="51" v:groupcontext="shape" transform="translate(2.9918,-4.30575)">			<title>Sheet.51</title>			<path d="M357.73 449.45 L357.73 424.7 L0 424.7 L0 449.45 L357.73 449.45 Z" class="st19"></path>			<path d="M357.73 449.45 L357.73 424.7 L0 424.7 L0 449.45" class="st13"></path>		</g>		<g id="shape52-71" v:mid="52" v:groupcontext="shape" transform="translate(357.735,1.13687E-13)">			<title>Sheet.52</title>			<path d="M5.98 444.27 L2.99 449.45 L0 444.27 L5.98 444.27 Z" class="st16"></path>		</g>		<g id="shape53-73" v:mid="53" v:groupcontext="shape">			<title>Sheet.53</title>			<path d="M0 444.27 L2.99 449.45 L5.98 444.27 L0 444.27 Z" class="st16"></path>		</g>	</g>	<g id="shape54-75" v:mid="54" v:groupcontext="shape" transform="translate(866.963,280.227) rotate(90)">		<title>Sheet.54</title>		<path d="M0 449.45 L13.58 449.45" class="st13"></path>	</g>	<g id="group55-78" transform="translate(235.654,-169.223)" v:mid="55" v:groupcontext="group">		<title>Sheet.55</title>		<g id="shape56-79" v:mid="56" v:groupcontext="shape" transform="translate(2.9918,1.13687E-13)">			<title>Sheet.56</title>			<path d="M357.73 433.7 L357.73 449.45 L0 449.45 L0 433.7 L357.73 433.7 Z" class="st19"></path>			<path d="M357.73 433.7 L357.73 449.45 L0 449.45 L0 433.7" class="st13"></path>		</g>		<g id="shape57-82" v:mid="57" v:groupcontext="shape" transform="translate(357.735,-14.8764)">			<title>Sheet.57</title>			<path d="M0 449.45 L2.99 444.27 L5.98 449.45 L0 449.45 Z" class="st16"></path>		</g>		<g id="shape58-84" v:mid="58" v:groupcontext="shape" transform="translate(-1.4988E-15,-14.8764)">			<title>Sheet.58</title>			<path d="M5.98 449.45 L2.99 444.27 L0 449.45 L5.98 449.45 Z" class="st16"></path>		</g>	</g>	<g id="group65-86" transform="translate(709.901,-14.7814)" v:mid="65" v:groupcontext="group">		<title>Sheet.65</title>		<g id="shape19-87" v:mid="19" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.19</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="26.8036" cy="443.15" width="53.61" height="12.6"></v:textrect>			<rect x="0" y="436.85" width="53.6071" height="12.6" class="st3"></rect>			<text x="-0" y="446.3" class="st20" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape20-90" v:mid="20" v:groupcontext="shape" transform="translate(1.26898E-13,-0.218607)">			<title>Sheet.20</title>			<path d="M0 447.95 A1.50003 1.50003 -180 0 0 1.5 449.45 L10.5 449.45 A1.50003 1.50003 -180 0 0 12 447.95 L12 438.95						 A1.50003 1.50003 -180 0 0 10.5 437.45 L1.5 437.45 A1.50003 1.50003 -180 0 0 0 438.95 L0 447.95 Z" class="st17"></path>		</g>		<g id="shape22-92" v:mid="22" v:groupcontext="shape" transform="translate(89.1246,0)">			<title>Sheet.22</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="443.15" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="436.85" width="21" height="12.6" class="st3"></rect>			<text x="0" y="446.3" class="st21" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape23-95" v:mid="23" v:groupcontext="shape" transform="translate(73.9363,-0.218607)">			<title>Sheet.23</title>			<path d="M0 447.95 A1.50003 1.50003 -180 0 0 1.5 449.45 L10.5 449.45 A1.50003 1.50003 -180 0 0 12 447.95 L12 438.95						 A1.50003 1.50003 -180 0 0 10.5 437.45 L1.5 437.45 A1.50003 1.50003 -180 0 0 0 438.95 L0 447.95 Z" class="st5"></path>		</g>	</g>	<g id="group67-97" transform="translate(108.893,-42.2573)" v:mid="67" v:groupcontext="group">		<title>Sheet.67</title>		<g id="shape40-98" v:mid="40" v:groupcontext="shape">			<title>Sheet.40</title>			<desc>neural-network/tensors 具有以下共同规则 维度GstArray- 格式为张量维度值以‘,’分隔并用分...</desc>			<v:textblock v:margins="rect(0,0,0,6)"></v:textblock>			<v:textrect cx="308.62" cy="392.755" width="617.24" height="113.39"></v:textrect>			<path d="M0 446.45 A3.5508 3.00007 -180 0 0 3.55 449.45 L613.69 449.45 A3.5508 3.00007 -180 0 0 617.24 446.45 L617.24						 339.06 A3.5508 3.00007 -180 0 0 613.69 336.06 L3.55 336.06 A3.5508 3.00007 -180 0 0 0 339.06 L0 446.45						 Z" class="st2"></path>			<text x="13.2" y="353.58" class="st4" v:langid="1033"><v:paragraph v:indentleft="7.2" v:spline="-1.4"></v:paragraph><v:tablist></v:tablist>neural-network/tensors<tspan class="st10"> </tspan><tspan class="st7">具有以下共同规则</tspan><tspan class="st7">：<v:newlinechar></v:newlinechar></tspan><tspan x="13.2" dy="1.553em" class="st15">维度</tspan><tspan class="st15">：</tspan><tspan class="st7">（</tspan><tspan class="st10">GstArray</tspan><tspan class="st7">）</tspan><tspan class="st7">-</tspan><tspan class="st7"> </tspan><tspan class="st7">格式为张量维度值</tspan><tspan class="st7">，</tspan><tspan class="st7">以</tspan><tspan class="st7">‘,’</tspan><tspan class="st7">分隔</tspan><tspan class="st7">，</tspan><tspan class="st7">并用分隔符标记</tspan><tspan class="st7">，</tspan><tspan class="st7">以</tspan><tspan class="st7">‘&lt;’</tspan><tspan class="st7">开头</tspan><tspan class="st7">，</tspan><tspan class="st7">以</tspan><tspan class="st7">‘&gt;’ </tspan><tspan class="st7">结尾</tspan><tspan class="st7">。<v:newlinechar></v:newlinechar></tspan><tspan x="13.2" dy="1.438em" class="st7">#</tspan><tspan class="st7">示例</tspan><tspan class="st7">-</tspan><tspan class="st7">&gt;  &lt; &lt;5, 300, 300, 1&gt;、&lt;1, 1, 1000, 1&gt; &gt;<v:newlinechar></v:newlinechar></tspan><tspan x="13.2" dy="1.4em" class="st7">#<v:newlinechar></v:newlinechar></tspan><tspan x="13.2" dy="1.4em" class="st7">#<v:newlinechar></v:newlinechar></tspan><tspan x="13.2" dy="1.515em" class="st15">类型</tspan><tspan class="st15">：</tspan><tspan class="st7">（</tspan><tspan class="st7">字符串</tspan><tspan class="st7">）</tspan><tspan class="st10">{UINT8, INT8, UINT16, INT16, UINT32, INT32, UINT64, INT64, FLOAT32, FLOAT64}</tspan> </text>			</g>		<g id="group42-139" transform="translate(119.248,-38.2218)" v:mid="42" v:groupcontext="group">			<title>Sheet.42</title>			<g id="shape43-140" v:mid="43" v:groupcontext="shape" transform="translate(452.442,431.83) rotate(90)">				<title>Sheet.43</title>				<path d="M0 449.45 L13.32 449.45" class="st13"></path>			</g>			<g id="shape44-143" v:mid="44" v:groupcontext="shape">				<title>Sheet.44</title>				<path d="M0 444.27 L2.99 449.45 L5.98 444.27 L0 444.27 Z" class="st16"></path>			</g>		</g>		<g id="group45-145" transform="translate(218.248,-38.2218)" v:mid="45" v:groupcontext="group">			<title>Sheet.45</title>			<g id="shape46-146" v:mid="46" v:groupcontext="shape" transform="translate(452.442,431.83) rotate(90)">				<title>Sheet.46</title>				<path d="M0 449.45 L13.32 449.45" class="st13"></path>			</g>			<g id="shape47-149" v:mid="47" v:groupcontext="shape">				<title>Sheet.47</title>				<path d="M0 444.27 L2.99 449.45 L5.98 444.27 L0 444.27 Z" class="st16"></path>			</g>		</g>		<g id="shape48-151" v:mid="48" v:groupcontext="shape" transform="translate(92.2394,-21.6427)">			<title>Sheet.48</title>			<desc>第一张量</desc>			<v:textblock v:margins="rect(0,0,0,6)" v:verticalalign="0"></v:textblock>			<v:textrect cx="30" cy="442.25" width="60" height="14.4"></v:textrect>			<rect x="0" y="435.05" width="60" height="14.4" class="st3"></rect>			<text x="9" y="445.85" class="st22" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>第一张量</text>			</g>		<g id="shape49-154" v:mid="49" v:groupcontext="shape" transform="translate(183.739,-22.5427)">			<title>Sheet.49</title>			<desc>第二张量</desc>			<v:textblock v:margins="rect(0,0,0,6)" v:verticalalign="0"></v:textblock>			<v:textrect cx="37.5" cy="442.7" width="75" height="13.5"></v:textrect>			<rect x="0" y="435.95" width="75" height="13.5" class="st3"></rect>			<text x="16.5" y="446.75" class="st22" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>第二张量</text>			</g>	</g>	<g id="group70-157" transform="translate(685.026,-179.721)" v:mid="70" v:groupcontext="group">		<title>Sheet.70</title>		<g id="shape59-158" v:mid="59" v:groupcontext="shape" transform="translate(19.5726,-5.61557)">			<title>Sheet.59</title>			<desc>子模块</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="47.9274" cy="438.44" width="95.86" height="22.0216"></v:textrect>			<path d="M-0 446.45 A3.00007 3.00007 -180 0 0 3 449.45 L92.85 449.45 A3.00007 3.00007 -180 0 0 95.85 446.45 L95.85						 430.43 A3.00007 3.00007 -180 0 0 92.85 427.43 L3 427.43 A3.00007 3.00007 -180 0 0 -0 430.43 L0 446.45						 Z" class="st5"></path>			<text x="29.93" y="442.43" class="st23" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>子模块</text>			</g>		<g id="shape61-161" v:mid="61" v:groupcontext="shape">			<title>Sheet.61</title>			<desc>后处理插件</desc>			<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="67.5" cy="420.203" width="135.01" height="58.4959"></v:textrect>			<path d="M0 446.45 A3.00007 3.00007 -180 0 0 3 449.45 L132 449.45 A3.00007 3.00007 -180 0 0 135 446.45 L135 393.95						 A3.00007 3.00007 -180 0 0 132 390.95 L3 390.95 A3.00007 3.00007 -180 0 0 -0 393.95 L0 446.45 Z" class="st24"></path>			<text x="37.5" y="408.95" class="st22" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>后处理插件</text>			</g>	</g></g>
</svg>

## 继承链

[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → [GstBaseTransform](https://gstreamer.freedesktop.org/documentation/base/gstbasetransform.html?gi-language=c) → GstMLTFLite

下表提供了有关 qtimltflite 的端口模板和元素属性的信息。有关用例信息，请参见 [LiteRT 用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/tensorflow-lite-use-cases.html)。

## 端口配置

| 端口名称 | 功能 | 功能 | 功能 |
| --- | --- | --- | --- |
| SINK 模板：'sink'<br><ul class="ul" id="qtimltflite__ul_ccv_n4v_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收</li><br><br>                                </ul> | neural-network/tensors | type： | { (string)UINT8, (string)INT32, (string)FLOAT32 } |
| SRC 模板：'src'<br><ul class="ul" id="qtimltflite__ul_s51_44v_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | neural-network/tensors | type： | { (string)UINT8, (string)INT32, (string)FLOAT32 } |

##  元素配置

Table : qtimltflite 的元素属性

| 属性 | 说明 |
| --- | --- |
| name | 对象名称<ul class="ul" id="qtimltflite__ul_uxf_2k4_myb"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">字符串。默认：“mlTFLite0”</li><br><br>                                </ul> |
| parent | 对象的父级<ul class="ul" id="qtimltflite__ul_vxf_2k4_myb"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">"GstObject" 类型的对象</li><br><br>                                </ul> |
| model | 模型文件名。<ul class="ul" id="qtimltflite__ul_xxf_2k4_myb"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">字符串。默认值：null</li><br><br>                                </ul> |
| delegate | 将部分或全部图执行委托给另一个执行程序。<ul class="ul" id="qtimltflite__ul_yxf_2k4_myb"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">枚举 “GstMLTFLiteDelegate” 默认：0，“none”<ul class="ul" id="qtimltflite__ul_kxb_fk4_myb"><br>                                            <li class="li">（0）：none - 无 delegate，CPU 用于所有操作</li><br><br>                                            <li class="li">（1）：nnapi-dsp - 通过 NN API 在 DSP 上运行处理。不支持的操作依赖于 NPU、GPU 或 CPU</li><br><br>                                            <li class="li">（2）：nnapi-gpu - 通过 NN API 在 GPU 上运行处理。不支持的操作依赖于 DSP、NPU 或 CPU</li><br><br>                                            <li class="li">（3）：nnapi-npu - 通过 NN API 在 NPU 上运行处理。不支持的操作依赖于 DSP、GPU 或 CPU</li><br><br>                                            <li class="li">（4）：hexagon - 直接在 Hexagon DSP 上运行处理</li><br><br>                                            <li class="li">（5）：gpu - 直接在 GPU 上运行处理</li><br><br>                                            <li class="li">（6）：xnnpack - 使用 xnnpack cpu runtime 运行推理</li><br><br>                                        </ul><br></li><br><br>                                </ul> |
| threads | 在 CPU delegate 上运行操作时的线程数。<ul class="ul" id="qtimltflite__ul_zxf_2k4_myb"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">无符号整型。范围：1 - 4 默认：1</li><br><br>                                </ul> |

**Parent Topic:** [配置 ML 插件](https://docs.qualcomm.com/doc/80-70022-50SC/topic/inferencing-plugins.html)

Last Published: Nov 05, 2025

[Previous Topic
qtimlsnpe](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/qtimlsnpe.md) [Next Topic
qtimlqnn](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/qtimlqnn.md)