# qtimlvdetection
The qtimlvdetection plugin processes output tensors of an object detection model from the ML inference plugin (such as qtimltflite, qtimlsnpe, and qtimlqnn) into result of predictions.
Note
This plugin is going to be deprecated.
**Figure : GstBuffer workflow with qtimlvdetection**
## Postprocessing
**Figure : Postprocessing for object detection architecture**
The negotiated [GstCaps](https://gstreamer.freedesktop.org/documentation/gstreamer/gstcaps.html) determines the processed output. The output can be either of the following:
- An image overlay mask (GstCaps: video/x-raw), which are applied over the original image using qtivcomposer.
- The element uses the CPU-based [Cairo](https://www.cairographics.org) 2D graphics library to draw the prediction results in ION/DMA buffers.
- The GstImageBufferPool custom buffer pool class allocates the ION/DMA buffers through IOCTL commands to the kernel.
- The GStreamer-formatted text (GstCaps: text/x-raw) containing the prediction results.
The prediction results are parsed into GStreamer-formatted string inside buffers allocated using regular system memory.
The module and labels properties of the plugin determine the method for the postprocessing operations.
- The module property specifies the postprocessing module. It's populated dynamically at runtime with the libraries available in `/usr/lib/gstreamer-1.0/ml/modules/` containing the prefix "`ml-vdetection`-".
- The labels property is a customized text file different for each machine learning detection model that you must provide for the prediction labels.
Optional properties are available for adjusting the prediction results.
- Use the results property to control the number of results that are displayed
- Use the threshold property to set a confidence threshold for prediction. The results with low confidence aren't displayed.
## 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) → GstMLVideoDetection
The following tables provide information on pad templates and element properties of qtimlvdetection. For use cases, see the detection use cases in [LiteRT use cases](https://docs.qualcomm.com/doc/80-70029-50/topic/tensorflow-lite-use-cases.html) and [Qualcomm Neural Processing SDK use cases](https://docs.qualcomm.com/doc/80-70029-50/topic/qualcomm-neural-processing-sdk-use-cases.html).
## Pad configuration
| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| SINK template: 'sink'
Availability: On request
Direction: sink
Availability: Always
Direction: source
Availability: Always
Direction: source
Availability: Always
Direction: source
flags: readable, writable
String. Default: "mlvideodetection0"
flags: readable, writable
Object of type "GstObject"
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Enum "GstMLVideoDetectionModules" Default: 0, "none"
(0): none - No module, default invalid mode
(1): face-detect - ml-vdetection-face-detect
(2): ssd-mobilenet - ml-vdetection-ssd-MobileNet
(3): YOLOv5m - ml-vdetection-yolov5m
(4): YOLOv5s - ml-vdetection-yolov5s
flags: readable, writable
String. Default: null
flags: readable, writable
Unsigned Integer. Range: 0 - 10 Default: 5
flags: readable, writable
Double Range: 10.0 - 100.0 Default: 10.0