-
Notifications
You must be signed in to change notification settings - Fork 4
tidlpreproc
tidlpreproc
is used to Preprocesses a video for conventional deep learning algorithms. It uses GstBaseTransform base class.
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBaseTransform
+----GstTIDLPreProc
video/x-raw
format: { (string)RGB, (string)NV12 }
width: [ 1, 8192 ]
height: [ 1, 8192 ]
framerate: [ 0/1, 2147483647/1 ]
Availability – always
Direction – sink
Object type – GstPad
application/x-tensor-tiovx
num-dims: 3
data-type: [ 2, 10 ]
channel-order: { (string)NCHW, (string)NHWC }
tensor-format: { (string)RGB, (string)BGR }
tensor-width: [ 1, 8192 ]
tensor-height: [ 1, 8192 ]
Availability – always
Direction – src
Object type – GstPad
Channel order for the tensor dimensions
flags: readable, writable, controllable
Enum "GstTIDLPreProcChannelOrder"
Default: 0, "nchw"
(0): nchw - NCHW channel order
(1): nhwc - NHWC channel order
Data Type of tensor at the output
flags: readable, writable, controllable
Enum "GstTIDLPreProcChannelOrder"
Default: 10, "float32"
(2): int8 - TYPE_INT8
(3): uint8 - TYPE_UINT8
(4): int16 - TYPE_INT16
(5): uint16 - TYPE_UINT16
(6): int32 - TYPE_INT32
(7): uint32 - TYPE_UINT32
(10): float32 - TYPE_FLOAT32
Mean pixel to be subtracted for the first plane
flags: readable, writable
Float Range: 0 - 255
Default : 0
Mean pixel to be subtracted for the second plane
flags: readable, writable
Float Range: 0 - 255
Default : 0
Mean pixel to be subtracted for the third plane
flags: readable, writable
Float Range: 0 - 255
Default : 0
TIDL Model directory with params, model and artifacts
flags: readable, writable
String
Default : NULL
The name of the object
flags: readable, writable
String
Default : "tidlpreproc0"
Number of buffers to allocate in output pool
flags: readable, writable
Unsigned Integer Range: 2 - 16
Default : 2
The parent of the object
flags: readable, writable
GstObject
Default : N/A
Handle Quality-of-Service events
flags: readable, writable
Boolean
Default : false
Scaling value for the first plane
flags: readable, writable
Float Range: 0 - 1
Default : 1
Scaling value for the second plane
flags: readable, writable
Float Range: 0 - 1
Default : 1
Scaling value for the third plane
flags: readable, writable
Float Range: 0 - 1
Default : 1
Tensor format at the output
flags: readable, writable, controllable
Enum "GstTIOVXDLPreProcTensorFormat"
Default: 0, "rgb"
(0): rgb - RGB plane format
(1): bgr - BGR plane format
Various pre-processing properties like channel-order, tensor-format, tensor-datatype, mean, and scale can be either defined explicitly or through a model directory containing params.yaml file.
gst-launch-1.0 \
videotestsrc num-buffers=1 is-live=true ! "video/x-raw,format=NV12,width=1280,height=720,framerate=(fraction)30/1" ! \
tidlpreproc data-type=uint8 channel-order=nchw tensor-format=bgr ! "application/x-tensor-tiovx" ! \
filesink location=dl-pre-proc-output_1280x720_u8bit_nchw.bgr -e
MODEL_DIR=/opt/model_zoo/ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416
gst-launch-1.0 \
videotestsrc num-buffers=1 is-live=true ! "video/x-raw,format=NV12,width=416,height=612,framerate=(fraction)30/1" ! \
tidlpreproc model=$MODEL_DIR ! "application/x-tensor-tiovx" ! \
filesink location=dl-pre-proc-output_1280x720_u8bit_nchw.bgr -e