# qtimlonnx
The mlonnx plugin provides ONNX (Open Neural Network Exchange) model inference capabilities within GStreamer pipelines. It leverages ONNX Runtime with support for multiple execution providers including CPU and Qualcomm QNN (Qualcomm Neural Network) hardware acceleration.
This plugin does the following:
- Accepts a tensor prepared by the preprocessing elements such as qtimlvconverter.
- Produces output tensor that's parsed by the postprocessing plugins such as qtimlvclassification, qtimlvdetection, qtimlvsegmentation, and qtimlvpose.
- Uses the Qualcomm Neural Network (QNN) backend library.
- Uses the ION/DMA buffers allocated by the GstMLBufferPool custom buffer pool class through IOCTL commands to the kernel.
The model and delegate usage is as follows:
- To use a model, provide the absolute path of the model through the model property.
After it's loaded, the model file provides the input and output capabilities:
- Number of tensors
- Dimensions
- Type
- If the execution-provider is not specified then default is CPU.
## Inheritance chain
[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)→ GstMLOnnx
The following tables provide information on pad templates and element properties of qtimlonnx.
## Pad configuration
| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| SINK template: 'sink'
Availability: Always
Direction: sink
Availability: Always
Direction: source
flags: readable, writable
String. Default: "mlonnx0"
flags: readable, writable
Object of type "GstObject"
flags: readable, writable
String. Default: null
flags: readable, writable
Enum "GstMLOnnxOptimizationLevel" Default: 2, "enable-extended"
(0): disable-all - Disable all optimizations
(1): enable-basic - Enable basic optimizations
(2): enable-extended - Enable extended optimizations
(3): enable-all - Enable all optimizations
flags: readable, writable
Enum "GstMLOnnxExecutionProvider" Default: 0, "cpu"
(0): cpu - CPU execution provider
(1): qnn - Qualcomm QNN execution provider
flags: readable, writable
String. Default: null
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Unsigned Integer. Range: 1 - 16, Default: 1