DriveWorks SDK Reference

| 0.6.67 Release

DriveNet

Detailed Description

Defines the DriveNet module.

Data Structures

struct  dwDriveNetParams
 

Typedefs

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

Enumerations

enum  dwDriveNetBatchSize {
  DW_DRIVENET_BATCHSIZE_1 = 0,
  DW_DRIVENET_BATCHSIZE_2 = 1
}
 
enum  dwDriveNetClass {
  DW_DRIVENET_CLASS_CAR = 0,
  DW_DRIVENET_CLASS_TRAFFIC_SIGN = 1,
  DW_DRIVENET_CLASS_BICYCLE = 2,
  DW_DRIVENET_CLASS_TRUCK = 3,
  DW_DRIVENET_CLASS_PEDESTRIAN = 4,
  DW_DRIVENET_CLASS_TRAFFIC_LIGHT = 5,
  DW_DRIVENET_NUM_CLASSES
}
 Class IDs detectable by the DriveNet implementation. More...
 
enum  dwDriveNetNetworkPrecision {
  DW_DRIVENET_PRECISION_INT8 = 0,
  DW_DRIVENET_PRECISION_FP16 = 1,
  DW_DRIVENET_PRECISION_FP32 = 2
}
 

Functions

DW_API_PUBLIC dwStatus dwDriveNet_getClassLabel (const char **classLabel, uint32_t classIdx, dwDriveNetHandle_t obj)
 Returns the class label for a given class index. 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_initDefaultParams (dwDriveNetParams *params)
 Initializes DriveNet parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwDriveNet_initialize (dwDriveNetHandle_t *drivenetHandle, dwObjectClusteringHandle_t **objectClusteringHandles, const dwDriveNetClass **objectClasses, uint32_t *numObjectClasses, dwContextHandle_t ctx, const dwDriveNetParams *drivenetParams)
 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

◆ dwDriveNetParams

struct dwDriveNetParams
Data Fields
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.
dwDriveNetBatchSize networkBatchSize Drivenet network batch size. Default is DW_DRIVENET_BATCHSIZE_1.
dwDriveNetNetworkPrecision networkPrecision Drivenet network precision. Default is DW_DRIVENET_PRECISION_FP32.

Typedef Documentation

◆ dwDriveNetHandle_t

typedef struct dwDriveNetObject* dwDriveNetHandle_t

Handle to a DriveNet object.

Definition at line 61 of file DriveNet.h.

Enumeration Type Documentation

◆ dwDriveNetBatchSize

Enumerator
DW_DRIVENET_BATCHSIZE_1 

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

DW_DRIVENET_BATCHSIZE_2 

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

Definition at line 75 of file DriveNet.h.

◆ dwDriveNetClass

Class IDs detectable by the DriveNet implementation.

Enumerator
DW_DRIVENET_CLASS_CAR 

any light weight vehicle

DW_DRIVENET_CLASS_TRAFFIC_SIGN 

traffic and road signs

DW_DRIVENET_CLASS_BICYCLE 

two wheeled vehicles

DW_DRIVENET_CLASS_TRUCK 

heavy weight trucks

DW_DRIVENET_CLASS_PEDESTRIAN 

pedestrians

DW_DRIVENET_CLASS_TRAFFIC_LIGHT 

traffic light

DW_DRIVENET_NUM_CLASSES 

Definition at line 84 of file DriveNet.h.

◆ dwDriveNetNetworkPrecision

Enumerator
DW_DRIVENET_PRECISION_INT8 

DriveNet network is loaded with INT8 precision.

This network works fastest on devices with compute capability 6.1.

DW_DRIVENET_PRECISION_FP16 

DriveNet network is loaded with FP16 precision.

This does not work on devices with compute capability <= 6.1.

DW_DRIVENET_PRECISION_FP32 

DriveNet network is loaded with FP32 precision.

Definition at line 63 of file DriveNet.h.

Function Documentation

◆ dwDriveNet_getClassLabel()

DW_API_PUBLIC dwStatus dwDriveNet_getClassLabel ( const char **  classLabel,
uint32_t  classIdx,
dwDriveNetHandle_t  obj 
)

Returns the class label for a given class index.

Parameters
[out]classLabelPointer to class label.
[in]classIdxClass index, i.e. number in [0, numObjectClasses)
[in]objSpecifies the DriveNet handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ 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, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ 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, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwDriveNet_initDefaultParams()

DW_API_PUBLIC dwStatus dwDriveNet_initDefaultParams ( dwDriveNetParams params)

Initializes DriveNet parameters with default values.

Parameters
[out]paramsDriveNet parameters.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwDriveNet_initialize()

DW_API_PUBLIC dwStatus dwDriveNet_initialize ( dwDriveNetHandle_t drivenetHandle,
dwObjectClusteringHandle_t **  objectClusteringHandles,
const dwDriveNetClass **  objectClasses,
uint32_t *  numObjectClasses,
dwContextHandle_t  ctx,
const dwDriveNetParams drivenetParams 
)

Initializes DriveNet module.

Parameters
[out]drivenetHandleA pointer to DriveNet handle to be initialized.
[out]objectClusteringHandlesA pointer to list of ObjectClustering handles to be initialized.
[out]objectClassesA pointer to list of object classes.
[out]numObjectClassesNumber of object classes which also determine the number of object clustering handles.
[in]ctxSpecifies the handle to the context.
[in]drivenetParamsDrivenet parameters
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
Note
Some object classes might not be available based on the network type chosen. The objectClasses parameter, therefore, returns the list of supported classes.
ObjectClustering handles must be explicitly released by the application.
ObjectClustering handle at an index corresponds to the Object Class at the same index.

◆ dwDriveNet_release()

DW_API_PUBLIC dwStatus dwDriveNet_release ( dwDriveNetHandle_t obj)

Releases the DriveNet module.

Parameters
[in]objA pointer to the object handle to release.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, 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, DW_BAD_CAST