qtimletflite

The QTI's qtimletflite GStreamer element exposes TensorFlow Lite (TFLite) capabilities to GStreamer. It can load and execute TFLite models. It supports preprocessing and postprocessing 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 qtimletflite gstreamer element support two ways of configuration: config file in JSON format and GST properties. Each configuration parameter can be set in 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, 32767 ]
framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Properties

name

The name of the object.

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

qos

Handle Quality-of-Service events.

type: Boolean
access: read/write
default: false

config

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

type: String
access: read/write
default: None

model

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

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; segmentation; posenet

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

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

delegate

upported TFLite delegates: default - use CPU; dsp - use DSP

type: String
access: read/write
default: default

num-threads

Number of threads that are to be used for inference.

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