DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

AutoNet Interface

Detailed Description

Defines the AutoNet module.

Defines the AutoNet module's pipeline.

Data Structures

struct  dwAutoNetParams
 AutoNet model parameters. More...
 

Typedefs

typedef struct dwAutoNetObject * dwAutoNetHandle_t
 Handle to a AutoNet object. More...
 
typedef struct dwAutoNetOutputObject * dwAutoNetOutputHandle_t
 Handle to a AutoNet output object. More...
 

Enumerations

enum  dwAutoNetBatchSize { DW_AUTONET_BATCH_SIZE_1 = 0 }
 AutoNet network batch size options. More...
 
enum  dwAutoNetHeadType {
  DW_AUTONET_DRIVENET_HEAD = 0,
  DW_AUTONET_MAPNET_HEAD = 1,
  DW_AUTONET_OPENROADNET_HEAD = 2,
  DW_AUTONET_PATHNET_HEAD = 3,
  DW_AUTONET_WAITNET_HEAD = 4,
  DW_AUTONET_URGENCYNET_HEAD = 5,
  DW_AUTONET_LIGHTSOURCENET_HEAD = 6,
  DW_AUTONET_HEAD_COUNT
}
 Definition AutoNet DNN heads. More...
 
enum  dwAutoNetModel {
  DW_AUTONET_MODEL_FRONT = 0,
  DW_AUTONET_NUM_MODELS,
  DW_AUTONET_MODEL_CUSTOM = -1
}
 AutoNet network models to be loaded by AutoNet module. More...
 
enum  dwAutoNetProcessStage {
  DW_AUTONET_PROCESS_STAGE_GPU_ASYNC_PREPROCESSING = 0,
  DW_AUTONET_PROCESS_STAGE_GPU_ASYNC_INFERENCE = 1,
  DW_AUTONET_PROCESS_STAGE_GPU_ASYNC_POSTPROCESSING = 2
}
 The GPU process stages of the Landmark Detector. More...
 
enum  dwAutoNetSelectionMask {
  DW_AUTONET_SELECTION_MASK_DRIVENET = (1 << DW_AUTONET_DRIVENET_HEAD),
  DW_AUTONET_SELECTION_MASK_MAPNET = (1 << DW_AUTONET_MAPNET_HEAD),
  DW_AUTONET_SELECTION_MASK_OPENROADNET = (1 << DW_AUTONET_OPENROADNET_HEAD),
  DW_AUTONET_SELECTION_MASK_PATHNET = (1 << DW_AUTONET_PATHNET_HEAD),
  DW_AUTONET_SELECTION_MASK_WAITNET = (1 << DW_AUTONET_WAITNET_HEAD),
  DW_AUTONET_SELECTION_MASK_URGENCYNET = (1 << DW_AUTONET_URGENCYNET_HEAD),
  DW_AUTONET_SELECTION_MASK_LIGHTSOURCENET = (1 << DW_AUTONET_LIGHTSOURCENET_HEAD),
  DW_DNN_SELECTION_MASK_ALL = (1 << DW_AUTONET_HEAD_COUNT) - 1
}
 Bitmask enum which enables specific DNN heads to be parsed and post-processed. More...
 

Functions

DW_API_PUBLIC dwStatus dwAutoNet_bindInput (dwConstDNNTensorHandle_t tensor, dwAutoNetHandle_t obj)
 Binds the input tensor to a specific index of AutoNet inputs. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_bindOutput (dwAutoNetOutputHandle_t autonetOutput, dwAutoNetHandle_t obj)
 Binds the output tensor to Autonet inference output. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_bindTensorTimestamp (dwAutoNetOutputHandle_t autonetOutput, dwTime_t tensorTimeStamp)
 Ties image timestamp to the autonet output tensor. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_createOutput (dwAutoNetOutputHandle_t *autonetOutput, dwAutoNetHandle_t obj)
 Allocates AutoNet output. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_destroyOutput (dwAutoNetOutputHandle_t autonetOutput)
 Destroys AutoNet output. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_getDNNMetaData (dwDNNMetaData *metaData, dwAutoNetHandle_t obj)
 Returns the DNN metadata. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_getInputBlobsize (dwBlobSize *inputBlobsize, dwAutoNetHandle_t obj)
 Returns input blob size that AutoNet expects. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_getInputTensorProperties (dwDNNTensorProperties *inputProps, dwAutoNetHandle_t obj)
 Returns input properties that AutoNet expects. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_getNumHeadOutputBlobs (uint32_t *numOutputBlobs, dwAutoNetHeadType headType, dwAutoNetHandle_t obj)
 Returns number of valid head outputs that AutoNet expects. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_getOutputTensorProperties (dwDNNTensorProperties *outputProps, dwAutoNetHeadType headType, dwAutoNetHandle_t obj)
 Returns output properties that AutoNet expects. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_getProcessorType (dwProcessorType *processorType, dwAutoNetHandle_t obj)
 Returns processor type that AutoNet runs on. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_inferAsync (dwAutoNetOutputHandle_t autonetOutput, dwConstDNNTensorHandle_t *inputTensors, dwAutoNetHandle_t obj)
 Runs inference on given list of input tensors. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_initDefaultParams (dwAutoNetParams *params)
 Initializes AutoNet parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_initialize (dwAutoNetHandle_t *autoNetHandle, const dwAutoNetParams *autoNetParams, dwContextHandle_t ctx)
 Initializes AutoNet module. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_process (dwAutoNetProcessStage stage, dwAutoNetHandle_t obj)
 Process specific inference step. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_release (dwAutoNetHandle_t obj)
 Releases the AutoNet module. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_reset (dwAutoNetHandle_t obj)
 Resets AutoNet. More...
 
DW_API_PUBLIC dwStatus dwAutoNet_setCUDAStream (cudaStream_t stream, dwAutoNetHandle_t obj)
 Sets the CUDA stream for CUDA related operations. More...
 

Data Structure Documentation

◆ dwAutoNetParams

struct dwAutoNetParams
Data Fields
dwAutoNetBatchSize batchSize AutoNet network batch size.
uint32_t dnnEnabled Binary coding (via dwAutoNetSelectionMask) the set of AutoNet heads to be initialized.
dwDriveNetParams driveNetParams DriveNet head model parameters.
dwLightSourceNetParams lightSourcenetParams LightSourceNet head model parameters.
dwMapNetParams mapNetParams MapNet head model parameters.
const void * networkCustomData Custom network data. Must be set if custom model is selected and available.
dwAutoNetModel networkModel AutoNet network model. Default is DW_AUTONET_MODEL_FRONT.
dwPrecision networkPrecision AutoNet network precision. Default is DW_PRECISION_FP32.
dwOpenRoadNetParams openRoadNetParams OpenRoadNet head model parameters.
dwPathNetParams pathNetParams PathNet head model parameters.
dwProcessorType processorType Processor type. Supported processors: GPU, DLA (only on DDPX)
dwWaitNetParams waitNetParams WaitNet head model parameters.

Typedef Documentation

◆ dwAutoNetHandle_t

typedef struct dwAutoNetObject* dwAutoNetHandle_t

Handle to a AutoNet object.

Definition at line 65 of file AutoNet.h.

◆ dwAutoNetOutputHandle_t

typedef struct dwAutoNetOutputObject* dwAutoNetOutputHandle_t

Handle to a AutoNet output object.

This object is the output of the inference and the interface to a corresponding post-processing module.

Definition at line 71 of file AutoNet.h.

Enumeration Type Documentation

◆ dwAutoNetBatchSize

AutoNet network batch size options.

Enumerator
DW_AUTONET_BATCH_SIZE_1 

AutoNet network is loaded with batch size = 1 if available.

Definition at line 111 of file AutoNet.h.

◆ dwAutoNetHeadType

Definition AutoNet DNN heads.

Enumerator
DW_AUTONET_DRIVENET_HEAD 
DW_AUTONET_MAPNET_HEAD 
DW_AUTONET_OPENROADNET_HEAD 
DW_AUTONET_PATHNET_HEAD 
DW_AUTONET_WAITNET_HEAD 
DW_AUTONET_URGENCYNET_HEAD 
DW_AUTONET_LIGHTSOURCENET_HEAD 
DW_AUTONET_HEAD_COUNT 

Definition at line 74 of file AutoNet.h.

◆ dwAutoNetModel

AutoNet network models to be loaded by AutoNet module.

Enumerator
DW_AUTONET_MODEL_FRONT 

AutoNet model that performs best on front camera.

DW_AUTONET_NUM_MODELS 

Number of available AutoNet models.

DW_AUTONET_MODEL_CUSTOM 

Loads custom autonet model if available.

Network name must be provided in networkCustomData field in dwAutoNetParams

Definition at line 98 of file AutoNet.h.

◆ dwAutoNetProcessStage

The GPU process stages of the Landmark Detector.

Enumerator
DW_AUTONET_PROCESS_STAGE_GPU_ASYNC_PREPROCESSING 
DW_AUTONET_PROCESS_STAGE_GPU_ASYNC_INFERENCE 
DW_AUTONET_PROCESS_STAGE_GPU_ASYNC_POSTPROCESSING 

Definition at line 57 of file AutoNet_processpipeline.h.

◆ dwAutoNetSelectionMask

Bitmask enum which enables specific DNN heads to be parsed and post-processed.

Enumerator
DW_AUTONET_SELECTION_MASK_DRIVENET 
DW_AUTONET_SELECTION_MASK_MAPNET 
DW_AUTONET_SELECTION_MASK_OPENROADNET 
DW_AUTONET_SELECTION_MASK_PATHNET 
DW_AUTONET_SELECTION_MASK_WAITNET 
DW_AUTONET_SELECTION_MASK_URGENCYNET 
DW_AUTONET_SELECTION_MASK_LIGHTSOURCENET 
DW_DNN_SELECTION_MASK_ALL 

Definition at line 86 of file AutoNet.h.

Function Documentation

◆ dwAutoNet_bindInput()

DW_API_PUBLIC dwStatus dwAutoNet_bindInput ( dwConstDNNTensorHandle_t  tensor,
dwAutoNetHandle_t  obj 
)

Binds the input tensor to a specific index of AutoNet inputs.

Parameters
[in]tensorTensor representing the output of the DataConditioner.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_bindOutput()

DW_API_PUBLIC dwStatus dwAutoNet_bindOutput ( dwAutoNetOutputHandle_t  autonetOutput,
dwAutoNetHandle_t  obj 
)

Binds the output tensor to Autonet inference output.

Parameters
[in]autonetOutputOutput of AutoNet inference.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_bindTensorTimestamp()

DW_API_PUBLIC dwStatus dwAutoNet_bindTensorTimestamp ( dwAutoNetOutputHandle_t  autonetOutput,
dwTime_t  tensorTimeStamp 
)

Ties image timestamp to the autonet output tensor.

Parameters
[out]autonetOutputAutoNet output.
[in]tensorTimeStampimage timestamp to bind to autonet tensor
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_createOutput()

DW_API_PUBLIC dwStatus dwAutoNet_createOutput ( dwAutoNetOutputHandle_t autonetOutput,
dwAutoNetHandle_t  obj 
)

Allocates AutoNet output.

Note that this output needs to be provided to the same AutoNet object.

Parameters
[out]autonetOutputAutoNet output to be allocated.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_destroyOutput()

DW_API_PUBLIC dwStatus dwAutoNet_destroyOutput ( dwAutoNetOutputHandle_t  autonetOutput)

Destroys AutoNet output.

Parameters
[in]autonetOutputAutoNet output to be destroyed.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_getDNNMetaData()

DW_API_PUBLIC dwStatus dwAutoNet_getDNNMetaData ( dwDNNMetaData metaData,
dwAutoNetHandle_t  obj 
)

Returns the DNN metadata.

Parameters
[out]metaDataPointer to metaData struct.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_getInputBlobsize()

DW_API_PUBLIC dwStatus dwAutoNet_getInputBlobsize ( dwBlobSize inputBlobsize,
dwAutoNetHandle_t  obj 
)

Returns input blob size that AutoNet expects.

Parameters
[out]inputBlobsizeInput blob size.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_getInputTensorProperties()

DW_API_PUBLIC dwStatus dwAutoNet_getInputTensorProperties ( dwDNNTensorProperties inputProps,
dwAutoNetHandle_t  obj 
)

Returns input properties that AutoNet expects.

Parameters
[out]inputPropsInput tensor properties.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_getNumHeadOutputBlobs()

DW_API_PUBLIC dwStatus dwAutoNet_getNumHeadOutputBlobs ( uint32_t *  numOutputBlobs,
dwAutoNetHeadType  headType,
dwAutoNetHandle_t  obj 
)

Returns number of valid head outputs that AutoNet expects.

Parameters
[out]numOutputBlobsnumber of valid output blobs for specific headType
[in]headTypeautonet head type i.e. PathNetHead, MapNetHead
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_getOutputTensorProperties()

DW_API_PUBLIC dwStatus dwAutoNet_getOutputTensorProperties ( dwDNNTensorProperties outputProps,
dwAutoNetHeadType  headType,
dwAutoNetHandle_t  obj 
)

Returns output properties that AutoNet expects.

Parameters
[out]outputPropsList of Output tensor properties for specified head. must make sure this buffer is as large as output of dwAutoNet_getNumHeadOutputBlobs
[in]headTypeautonet head type i.e. PathNetHead, MapNetHead
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_getProcessorType()

DW_API_PUBLIC dwStatus dwAutoNet_getProcessorType ( dwProcessorType processorType,
dwAutoNetHandle_t  obj 
)

Returns processor type that AutoNet runs on.

Parameters
[out]processorTypeprocessor type.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_inferAsync()

DW_API_PUBLIC dwStatus dwAutoNet_inferAsync ( dwAutoNetOutputHandle_t  autonetOutput,
dwConstDNNTensorHandle_t inputTensors,
dwAutoNetHandle_t  obj 
)

Runs inference on given list of input tensors.

The order of the input tensors must match the requirements by the DNN.

Parameters
[out]autonetOutputAutoNet output.
[in]inputTensorsList of input tensors.
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
Note
only supports inputCount of 1

◆ dwAutoNet_initDefaultParams()

DW_API_PUBLIC dwStatus dwAutoNet_initDefaultParams ( dwAutoNetParams params)

Initializes AutoNet parameters with default values.

Parameters
[out]paramsAutoNet parameters.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwAutoNet_initialize()

DW_API_PUBLIC dwStatus dwAutoNet_initialize ( dwAutoNetHandle_t autoNetHandle,
const dwAutoNetParams autoNetParams,
dwContextHandle_t  ctx 
)

Initializes AutoNet module.

Parameters
[out]autoNetHandleA pointer to AutoNet handle to be initialized.
[in]autoNetParamsAutoNet parameters
[in]ctxSpecifies the handle to the context.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given context handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT

◆ dwAutoNet_process()

DW_API_PUBLIC dwStatus dwAutoNet_process ( dwAutoNetProcessStage  stage,
dwAutoNetHandle_t  obj 
)

Process specific inference step.

Parameters
stageprocessing stage: preprocessing, inference, post processing
[in]objSpecifies the AutoNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_release()

DW_API_PUBLIC dwStatus dwAutoNet_release ( dwAutoNetHandle_t  obj)

Releases the AutoNet module.

Parameters
[in]objThe object handle to release.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
Note
This method renders the handle unusable.

◆ dwAutoNet_reset()

DW_API_PUBLIC dwStatus dwAutoNet_reset ( dwAutoNetHandle_t  obj)

Resets AutoNet.

Parameters
[in]objHandle to reset.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST

◆ dwAutoNet_setCUDAStream()

DW_API_PUBLIC dwStatus dwAutoNet_setCUDAStream ( cudaStream_t  stream,
dwAutoNetHandle_t  obj 
)

Sets the CUDA stream for CUDA related operations.

Note
The ownership of the stream remains by the callee.
Parameters
[in]streamThe CUDA stream to be used. Default is the one passed during initialization.
[in]objA handle to the autonet module for which to set CUDA stream.
Returns
DW_INVALID_HANDLE - If the given context handle is invalid.
DW_SUCCESS