DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Data Conditioner

About This Module

The Data Conditioner module shall be used in support of the DNN module in order to make the input data format compatible with the network input format. This can be done on a batch of images having the same size in parallel. In addition, the Data Conditioner module provides several pre-processing functionalities that can be used to further modify the input images, e.g., pixel value scaling, mean image subtraction, etc.

The output of the dwDataConditioner module is a Tensor which is an input to the dwDNN module or TensorRT directly. The output's layout can be as follows:

  • Planar: N batches of blobs composed by C channels where each channel is in its own plane of WxH elements, the next channel starts where the current one ends. Represented as NCHW (4 dimensions)
  • Interleaved: Given batch size N, with C channels, each composed by WxH elements, then the element at X,Y of C0 is followed by element at X,Y of C1 etc... Represented as NHWC (4 dimensions)
  • Hybrid: This mixes planar and interleaved, decided by the underlying library handling the Tensor allocation. Represented as NCHWx (5 dimensions)

Calling dwDNNTensor_getLayoutView() allows to retrieve the information needed to traverse manually a raw tensor. Given a chosen dimension to traverse, the function returns the offset, which dictates the location of the next plane in that dimension, the stride dictates the length in memory of each element in the plane

Relevant Tutorials