qtimlesnpe

The QTI's qtimlesnpe GStreamer element exposes Qualcomm Neural Processing SDK capabilities to GStreamer. It can load and execute AI models. It supports preprocessing and post processing functionality. The preprocessing supports downscale, color convert, mean subtraction and padding. The postprocessing supports the most popular model types as classification, detection, and segmentation. The postprocessing result is attached as machine learning metadata (MLMeta) to GST buffer. The QTI's qtimlesnpe GStreamer element support two ways of configuration: config file in JSON format, and GST properties. Each configuration parameter can be set using both ways, but GST properties has higher priority.

Pad templates

sink (input)

video/x-raw
format: { (string)NV12, (string)NV21 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw(ANY)
format: { (string)NV12, (string)NV21 }
width: [ 1, 2147483647 ]
height: [ 1, 32767 ]
framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsink

source (output)

video/x-raw
format: { (string)NV12, (string)NV21 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw(ANY)
format: { (string)NV12, (string)NV21 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Properties

name

The name of the object.

type: String
access: read/write
default: "qtimlesnpe0"

qos

Handle Quality-of-Service events.

type: Boolean
access: read/write
default: false

config

Path to JSON configuration file. Eg.: /data/misc/camera/mle_snpe_config.json

type: String
access: read/write
default: None

model

Model file name. Path to model file. Eg.: /data/misc/camera/model.dlc. Filename extension should be .dlc

type: String
access: read/write
default: None

labels

Labels file name. Path to labels file. Eg.: /data/misc/camera/labels.txt. Filename extension should be .txt

type: String
access: read/write
default: None

input-format

Set inference input format. Supported formats: 0 - RGB; 1 - BGR; 2 - RGBFloat; 3 - BGRFloat.

type: Unsigned Integer
access: read/write
default: 3

postprocessing

Supported Postprocessing: classification; detection; singlessd; segmentation

type: String
access: read/write
default: None

mean

Channel Mean Subtraction values ('<B, G, R>'). Eg. mean="<128.0,128.0,128.0>"

type: GstValueArray of GValues of type "gdouble"
access: read/write
default: 128.0

sigma

Channel divisor values ('<B, G, R>'). Eg. sigma="<128.0,128.0,128.0>"

type: GstValueArray of GValues of type "gdouble"
access: read/write
default: 128.0

runtime

SNPE Runtime: 0 - CPU; 1 - DSP

type: Unsigned Integer
access: read/write
default: 1

output-layers

Model output layers, comma separated. Should be set if model have more than one output

type: String
access: read/write
default: None

preprocess-type

Controls pre-processing aspect ration(AR) maintenance.

Possible values: 0-kKeepARCrop, 1-kKeepARPad, 2-kDirectDownscale

type: Unsigned Integer
access: read/write
default: 1

confidence-threshold

Confidence threshold value.

type: Float
access: read/write
default: 0.5