DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

DriveNet Interface

Detailed Description

Defines the DriveNet module.

Note
SW Release Applicability: These APIs are available in NVIDIA DRIVE Software releases.

Data Structures

struct  dwDriveNetClassProperties
 DriveNet properties per class. More...
 
struct  dwDriveNetParams
 DriveNet model parameters. More...
 

Typedefs

typedef struct dwDriveNetObject * dwDriveNetHandle_t
 Handle to a DriveNet object. More...
 

Enumerations

enum  dwDriveNetBatchSize {
  DW_DRIVENET_BATCH_SIZE_1 = 0,
  DW_DRIVENET_BATCH_SIZE_2 = 1,
  DW_DRIVENET_BATCH_SIZE_4 = 2
}
 DriveNet network batch size options. More...
 
enum  dwDriveNetCameraType {
  DW_DRIVENET_CAMERA_60FOV,
  DW_DRIVENET_CAMERA_120FOV,
  DW_DRIVENET_CAMERA_30FOV
}
 DriveNet camera type based on its field of view. More...
 
enum  dwDriveNetModel {
  DW_DRIVENET_MODEL_FRONT = 0,
  DW_DRIVENET_MODEL_SIDE = 1,
  DW_STATEFUL_TEMPORAL_DRIVENET_MODEL = 2,
  DW_STATELESS_TEMPORAL_DRIVENET_MODEL = 3,
  DW_DRIVENET_NUM_MODELS,
  DW_DRIVENET_MODEL_CUSTOM = -1
}
 DriveNet network models to be loaded by DriveNet module. More...
 

Functions

DW_API_PUBLIC dwStatus dwDriveNet_getAvailableClasses (const dwObjectClass **objectClasses, uint32_t *numObjectClasses, dwDriveNetHandle_t obj)
 Returns the object classes that DriveNet can detect. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_getClassProperties (dwDriveNetClassProperties *properties, dwObjectClass objectClass, dwDriveNetHandle_t obj)
 Returns properties of the DriveNet model for a given class. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_getDNNMetaData (dwDNNMetaData *metaData, dwDriveNetHandle_t obj)
 Returns the DNN metadata. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_getInputBlobsize (dwBlobSize *inputBlobsize, dwDriveNetHandle_t obj)
 Returns input blob size that DriveNet expects. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_getProcessorType (dwProcessorType *processorType, dwDriveNetHandle_t obj)
 Returns processor type that DriveNet runs on. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_initDefaultParams (dwDriveNetParams *params, dwContextHandle_t ctx)
 Initializes DriveNet parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_initialize (dwDriveNetHandle_t *drivenetHandle, const dwDriveNetParams *drivenetParams, dwContextHandle_t ctx)
 Initializes DriveNet module. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_release (dwDriveNetHandle_t obj)
 Releases the DriveNet module. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_reset (dwDriveNetHandle_t obj)
 Resets DriveNet. More...
 

Data Structure Documentation

◆ dwDriveNetClassProperties

struct dwDriveNetClassProperties
Data Fields
bool hasDepth Flag indicating whether a valid depth is provided for a given object class.
bool hasOrientation Flag indicating whether a valid orientation is provided for a given object class.
bool hasUrgency Flag indicating whether a valid urgency is provided for a given object class.
bool hasVisibility Flag indicating whether a valid visibility is provided for a given object class.

◆ dwDriveNetParams

struct dwDriveNetParams
Data Fields
dwDriveNetBatchSize batchSize Drivenet network batch size.
dwDriveNetCameraType cameraType Type of camera based on the field of view.
bool hasDepth Deprecated flag indicating to load a network that outputs depth for detected objects.
bool hasObjectDepth Flag indicating to load a network that outputs depth for detected objects.
bool hasObjectUrgency Flag indicating to load a network that outputs urgency for detected objects.
uint32_t maxClustersPerClass Maximum number of clusters per class. Default is 100.
uint32_t maxProposalsPerClass Maximum number of RAW detections per class directly obtained from DNN. Default is 100.
const void * networkCustomData Custom network data. Must be set if custom model is selected and available.
dwDriveNetModel networkModel Drivenet network model. Default is DW_DRIVENET_MODEL_FRONT.
dwPrecision networkPrecision Drivenet network precision. Default is DW_PRECISION_FP32.
dwProcessorType processorType Processor type. Supported processors: GPU, DLA (only on DDPX)
bool suppressRiderInCar Suppress detected pedestrians which are actually riders in a car.

Typedef Documentation

◆ dwDriveNetHandle_t

typedef struct dwDriveNetObject* dwDriveNetHandle_t

Handle to a DriveNet object.

Definition at line 63 of file DriveNet.h.

Enumeration Type Documentation

◆ dwDriveNetBatchSize

DriveNet network batch size options.

Enumerator
DW_DRIVENET_BATCH_SIZE_1 

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

DW_DRIVENET_BATCH_SIZE_2 

DriveNet network is loaded with batch size = 2 if available.

DW_DRIVENET_BATCH_SIZE_4 

DriveNet network is loaded with batch size = 4 if available.

Definition at line 83 of file DriveNet.h.

◆ dwDriveNetCameraType

DriveNet camera type based on its field of view.

Enumerator
DW_DRIVENET_CAMERA_60FOV 
DW_DRIVENET_CAMERA_120FOV 
DW_DRIVENET_CAMERA_30FOV 

Definition at line 90 of file DriveNet.h.

◆ dwDriveNetModel

DriveNet network models to be loaded by DriveNet module.

Enumerator
DW_DRIVENET_MODEL_FRONT 

DriveNet model that performs best on front camera.

DW_DRIVENET_MODEL_SIDE 

DriveNet model that performs best on side camera.

DW_STATEFUL_TEMPORAL_DRIVENET_MODEL 

Stateful Temporal DriveNet model that also predicts urgency on front camera.

DW_STATELESS_TEMPORAL_DRIVENET_MODEL 

Stateless Temporal DriveNet model that also predicts urgency on front camera.

DW_DRIVENET_NUM_MODELS 

Number of available DriveNet models.

DW_DRIVENET_MODEL_CUSTOM 

Loads custom drivenet model if available.

Network name must be provided in networkCustomData field in dwDriveNetParams

Definition at line 66 of file DriveNet.h.

Function Documentation

◆ dwDriveNet_getAvailableClasses()

DW_API_PUBLIC dwStatus dwDriveNet_getAvailableClasses ( const dwObjectClass **  objectClasses,
uint32_t *  numObjectClasses,
dwDriveNetHandle_t  obj 
)

Returns the object classes that DriveNet can detect.

Parameters
[out]objectClassesA pointer to list of object classes that DriveNet can detect.
[out]numObjectClassesNumber of object classes.
[in]objSpecifies the DriveNet handle.
Returns
DW_SUCCESS
DW_INVALID_HANDLE - If the given handle is invalid,i.e. null or of wrong type
DW_BAD_CAST
DW_INVALID_ARGUMENT - If the given object classes or numobject clasees pointer is NULL

◆ dwDriveNet_getClassProperties()

DW_API_PUBLIC dwStatus dwDriveNet_getClassProperties ( dwDriveNetClassProperties properties,
dwObjectClass  objectClass,
dwDriveNetHandle_t  obj 
)

Returns properties of the DriveNet model for a given class.

Parameters
[out]propertiesPointer to dwDriveNetClassProperties struct
[in]objectClassObject class
[in]objSpecifies the DriveNet 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 - If the given class properties pointer is NULL

◆ dwDriveNet_getDNNMetaData()

DW_API_PUBLIC dwStatus dwDriveNet_getDNNMetaData ( dwDNNMetaData metaData,
dwDriveNetHandle_t  obj 
)

Returns the DNN metadata.

Parameters
[out]metaDataPointer to metaData struct.
[in]objSpecifies the DriveNet 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 - If the given metadata pointer is NULL

◆ dwDriveNet_getInputBlobsize()

DW_API_PUBLIC dwStatus dwDriveNet_getInputBlobsize ( dwBlobSize inputBlobsize,
dwDriveNetHandle_t  obj 
)

Returns input blob size that DriveNet expects.

Parameters
[out]inputBlobsizeInput blob size.
[in]objSpecifies the DriveNet 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 - if the given input blobsize pointer is NULL

◆ dwDriveNet_getProcessorType()

DW_API_PUBLIC dwStatus dwDriveNet_getProcessorType ( dwProcessorType processorType,
dwDriveNetHandle_t  obj 
)

Returns processor type that DriveNet runs on.

Parameters
[out]processorTypeprocessor type.
[in]objSpecifies the DriveNet 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 - If the given processor type pointer is NULL

◆ dwDriveNet_initDefaultParams()

DW_API_PUBLIC dwStatus dwDriveNet_initDefaultParams ( dwDriveNetParams params,
dwContextHandle_t  ctx 
)

Initializes DriveNet parameters with default values.

Parameters
[out]paramsDriveNet parameters.
[in]ctxSpecifies the handle to the context.
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT - If the given params pointer is NULL
Note
Default precision depends on the current GPU.

◆ dwDriveNet_initialize()

DW_API_PUBLIC dwStatus dwDriveNet_initialize ( dwDriveNetHandle_t drivenetHandle,
const dwDriveNetParams drivenetParams,
dwContextHandle_t  ctx 
)

Initializes DriveNet module.

Parameters
[out]drivenetHandleA pointer to DriveNet handle to be initialized.
[in]drivenetParamsDrivenet 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 - If the given drivenet handle or drivenet params pointers is NULL
Note
Some object classes might not be available based on the network type chosen. The objectClasses parameter, therefore, returns the list of supported classes.
If DriveNet module is to be loaded on a non-default GPU Device, the initialization must take place after dwContext_selectGPUDevice.

◆ dwDriveNet_release()

DW_API_PUBLIC dwStatus dwDriveNet_release ( dwDriveNetHandle_t  obj)

Releases the DriveNet 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.

◆ dwDriveNet_reset()

DW_API_PUBLIC dwStatus dwDriveNet_reset ( dwDriveNetHandle_t  obj)

Resets DriveNet.

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