DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

SignNet Interface

Detailed Description

Defines SignNet module, i.e., SignNet configuration and loading.

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

Data Structures

struct  dwSignNetParams
 

Macros

#define DW_SIGNNET_MAX_CLASSES   796
 
#define DW_SIGNNET_MAX_DNN_OUTPUT   1000
 
#define DW_SIGNNET_MAX_MODELS   64
 

Typedefs

typedef const char * dwSignNetClassName
 Type for SignNet model class. More...
 
typedef struct dwSignNetObject * dwSignNetHandle_t
 Handle to a SignNet object. More...
 
typedef const char * dwSignNetModelName
 SignNet model name type. More...
 

Enumerations

enum  dwSignNetBatchSize {
  DW_SIGNNET_BATCH_SIZE_1 = 0,
  DW_SIGNNET_BATCH_SIZE_16 = 1,
  DW_SIGNNET_BATCH_SIZE_32 = 2
}
 SignNet network batch size options. More...
 
enum  dwSignNetModel {
  DW_SIGNNET_MODEL_US_V1 = 0,
  DW_SIGNNET_MODEL_US_V2 = 1,
  DW_SIGNNET_MODEL_US_V4 = 2,
  DW_SIGNNET_MODEL_EU_V1 = 3,
  DW_SIGNNET_MODEL_EU_V2 = 4,
  DW_SIGNNET_MODEL_EU_V3 = 5,
  DW_SIGNNET_MODEL_EU_V4 = 6,
  DW_SIGNNET_MODEL_JP_V1 = 7,
  DW_SIGNNET_MODEL_COUNT,
  DW_SIGNNET_MODEL_CUSTOM = -1
}
 SignNet network models to be loaded by SignNet module. More...
 

Functions

DW_API_PUBLIC dwStatus dwSignNet_getAvailableClasses (const dwSignClass **signClasses, uint32_t *numSignClasses, dwSignNetHandle_t obj)
 Returns the sign classes that SignNet can detect. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getAvailableClassesNew (dwSignNetClassName *signClasses, uint32_t *numSignClasses, dwSignNetHandle_t obj)
 Returns the sign classes that SignNet can detect. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getAvailableModels (dwSignNetModelName *availableModels, uint32_t *numAvailableModels)
 Returns the list of models the SignNet module has. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getClassLabel (const char **classLabel, uint32_t classIdx, dwSignNetHandle_t obj)
 Returns the class label for a given class index for UI output. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getDNNMetaData (dwDNNMetaData *metaData, dwSignNetHandle_t obj)
 Returns the DNN metadata. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getInputBlobsize (dwBlobSize *inputBlobsize, dwSignNetHandle_t obj)
 Returns input blob size that SignNet expects. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getModelNameLabel (const char **modelNameLabel, dwSignNetHandle_t obj)
 Returns the SignNet model text label (name of a model) for a hangle. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getNumberOutputs (uint32_t *numSignOutputs, dwSignNetHandle_t obj)
 Returns the number of raw signnet outputs its DNN produces. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getTrafficSignalClass (dwTrafficSignalClass *trafficSignalClass, uint32_t classIdx, dwSignNetHandle_t obj)
 Returns the dwTrafficSignalClass sturcutre for a given class index for UI output. More...
 
DW_API_PUBLIC dwStatus dwSignNet_getTypeLabel (const char **classLabel, uint32_t classIdx, dwSignNetHandle_t obj)
 Returns the class label for a given class index for UI output. More...
 
DW_API_PUBLIC dwStatus dwSignNet_initDefaultParams (dwSignNetParams *params, dwContextHandle_t ctx)
 Initializes SignNet parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwSignNet_initialize (dwSignNetHandle_t *signNetHandle, const dwSignNetParams *signNetParams, dwContextHandle_t ctx)
 Initializes SignNet module. More...
 
DW_API_PUBLIC dwStatus dwSignNet_release (dwSignNetHandle_t obj)
 Releases the SignNet module. More...
 
DW_API_PUBLIC dwStatus dwSignNet_reset (dwSignNetHandle_t obj)
 Resets SignNet. More...
 

Data Structure Documentation

◆ dwSignNetParams

struct dwSignNetParams
Data Fields
dwSignNetBatchSize batchSize SignNet network batch size. Default is DW_SIGNNET_BATCH_SIZE_1.
const void * networkCustomData Custom network data. Must be set if custom model is selected and available.
dwSignNetModel networkModel SignNet network model. Default is DW_SIGNNET_MODEL_FRONT_US_V2.
dwPrecision networkPrecision SignNet network precision. Default is DW_PRECISION_FP32.

Macro Definition Documentation

◆ DW_SIGNNET_MAX_CLASSES

#define DW_SIGNNET_MAX_CLASSES   796

Definition at line 60 of file SignNet.h.

◆ DW_SIGNNET_MAX_DNN_OUTPUT

#define DW_SIGNNET_MAX_DNN_OUTPUT   1000

Definition at line 61 of file SignNet.h.

◆ DW_SIGNNET_MAX_MODELS

#define DW_SIGNNET_MAX_MODELS   64

Definition at line 62 of file SignNet.h.

Typedef Documentation

◆ dwSignNetClassName

typedef const char* dwSignNetClassName

Type for SignNet model class.

Definition at line 117 of file SignNet.h.

◆ dwSignNetHandle_t

typedef struct dwSignNetObject* dwSignNetHandle_t

Handle to a SignNet object.

Definition at line 68 of file SignNet.h.

◆ dwSignNetModelName

typedef const char* dwSignNetModelName

SignNet model name type.

Definition at line 114 of file SignNet.h.

Enumeration Type Documentation

◆ dwSignNetBatchSize

SignNet network batch size options.

Enumerator
DW_SIGNNET_BATCH_SIZE_1 

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

DW_SIGNNET_BATCH_SIZE_16 

SignNet network is loaded with batch size = 16 if available.

DW_SIGNNET_BATCH_SIZE_32 

SignNet network is loaded with batch size = 32 if available.

Definition at line 95 of file SignNet.h.

◆ dwSignNetModel

SignNet network models to be loaded by SignNet module.

Enumerator
DW_SIGNNET_MODEL_US_V1 

SignNet model for US signs, version 1.

DW_SIGNNET_MODEL_US_V2 

SignNet model for US signs, version 2.

DW_SIGNNET_MODEL_US_V4 

SignNet model for US signs, version 4 (HWISP)

DW_SIGNNET_MODEL_EU_V1 

SignNet model for EU signs version 1.

DW_SIGNNET_MODEL_EU_V2 

SignNet model for EU signs version 2.

DW_SIGNNET_MODEL_EU_V3 

SignNet model for EU signs version 3.

DW_SIGNNET_MODEL_EU_V4 

SignNet model for EU signs version 4 (HWISP)

DW_SIGNNET_MODEL_JP_V1 

SignNet model for Japan signs version 1.

DW_SIGNNET_MODEL_COUNT 
DW_SIGNNET_MODEL_CUSTOM 

Loads custom SignNet model if available.

Network name must be provided in networkCustomData field in dwSignNetParams

Definition at line 71 of file SignNet.h.

Function Documentation

◆ dwSignNet_getAvailableClasses()

DW_API_PUBLIC dwStatus dwSignNet_getAvailableClasses ( const dwSignClass **  signClasses,
uint32_t *  numSignClasses,
dwSignNetHandle_t  obj 
)

Returns the sign classes that SignNet can detect.

Parameters
[out]signClassesA pointer to list of object classes that SignNet can detect.
[out]numSignClassesNumber of object classes.
[in]objSpecifies the SignNet 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
Deprecated:
Use dwSignNet_getAvailableClassesNew() in this release. In future releases, use same dwSignNet_getAvailableClasses() but with new signature.

◆ dwSignNet_getAvailableClassesNew()

DW_API_PUBLIC dwStatus dwSignNet_getAvailableClassesNew ( dwSignNetClassName signClasses,
uint32_t *  numSignClasses,
dwSignNetHandle_t  obj 
)

Returns the sign classes that SignNet can detect.

Parameters
[out]signClassesA pointer to list of class name that SignNet can detect.
[out]numSignClassesNumber of object classes.
[in]objSpecifies the SignNet 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

◆ dwSignNet_getAvailableModels()

DW_API_PUBLIC dwStatus dwSignNet_getAvailableModels ( dwSignNetModelName availableModels,
uint32_t *  numAvailableModels 
)

Returns the list of models the SignNet module has.

Parameters
[out]availableModelsA pointer to a list of names of models that SignNet model has.
[out]numAvailableModelsNumber of models.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwSignNet_getClassLabel()

DW_API_PUBLIC dwStatus dwSignNet_getClassLabel ( const char **  classLabel,
uint32_t  classIdx,
dwSignNetHandle_t  obj 
)

Returns the class label for a given class index for UI output.

Parameters
[out]classLabelPointer to class label.
[in]classIdxClass index within the model being used.
[in]objThe handle to SignNet.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwSignNet_getDNNMetaData()

DW_API_PUBLIC dwStatus dwSignNet_getDNNMetaData ( dwDNNMetaData metaData,
dwSignNetHandle_t  obj 
)

Returns the DNN metadata.

Parameters
[out]metaDataPointer to metaData struct.
[in]objThe handle to SignNet.
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT : if metaData pointer is Null
DW_INVALID_HANDLE : if signNet handle is invalid i.e Null or wrong type

◆ dwSignNet_getInputBlobsize()

DW_API_PUBLIC dwStatus dwSignNet_getInputBlobsize ( dwBlobSize inputBlobsize,
dwSignNetHandle_t  obj 
)

Returns input blob size that SignNet expects.

Parameters
[out]inputBlobsizeInput blob size.
[in]objSpecifies the SignNet handle.
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT : if inputBlobsize pointer is Null
DW_INVALID_HANDLE : if signNet handle is invalid i.e Null or wrong type

◆ dwSignNet_getModelNameLabel()

DW_API_PUBLIC dwStatus dwSignNet_getModelNameLabel ( const char **  modelNameLabel,
dwSignNetHandle_t  obj 
)

Returns the SignNet model text label (name of a model) for a hangle.

Parameters
[out]modelNameLabelPointer to model name label.
[in]objThe handle to SignNet.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwSignNet_getNumberOutputs()

DW_API_PUBLIC dwStatus dwSignNet_getNumberOutputs ( uint32_t *  numSignOutputs,
dwSignNetHandle_t  obj 
)

Returns the number of raw signnet outputs its DNN produces.

Parameters
[out]numSignOutputsNumber of object classes.
[in]objSpecifies the SignNet handle.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwSignNet_getTrafficSignalClass()

DW_API_PUBLIC dwStatus dwSignNet_getTrafficSignalClass ( dwTrafficSignalClass trafficSignalClass,
uint32_t  classIdx,
dwSignNetHandle_t  obj 
)

Returns the dwTrafficSignalClass sturcutre for a given class index for UI output.

Parameters
[out]trafficSignalClassPointer to dwTrafficSignalClass structure to populate.
[in]classIdxClass index within the model being used.
[in]objThe handle to SignNet.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT

◆ dwSignNet_getTypeLabel()

DW_API_PUBLIC dwStatus dwSignNet_getTypeLabel ( const char **  classLabel,
uint32_t  classIdx,
dwSignNetHandle_t  obj 
)

Returns the class label for a given class index for UI output.

Parameters
[out]classLabelPointer to class label.
[in]classIdxClass index within the model being used.
[in]objThe handle to SignNet.
Returns
DW_SUCCESS, DW_INVALID_ARGUMENT
Deprecated:
Will be removed. please use dwSignNet_getClassLabel()

◆ dwSignNet_initDefaultParams()

DW_API_PUBLIC dwStatus dwSignNet_initDefaultParams ( dwSignNetParams params,
dwContextHandle_t  ctx 
)

Initializes SignNet parameters with default values.

Parameters
[out]paramsSignNet default parameters.
[in]ctxThe handle to the context.
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT : if param pointer is Null
Note
Default precision depends on the current GPU.

◆ dwSignNet_initialize()

DW_API_PUBLIC dwStatus dwSignNet_initialize ( dwSignNetHandle_t signNetHandle,
const dwSignNetParams signNetParams,
dwContextHandle_t  ctx 
)

Initializes SignNet module.

Parameters
[out]signNetHandleA pointer to SignNet handle to be initialized.
[in]signNetParamsSignNet parameters
[in]ctxThe handle to the context.
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT : if signNetParams pointer is Null
DW_INVALID_HANDLE : if signNet handle ctx is invalid i.e Null or wrong type
Note
If SignNet module is to be loaded on a non-default GPU Device, the initialization must take place after dwContext_selectGPUDevice.

◆ dwSignNet_release()

DW_API_PUBLIC dwStatus dwSignNet_release ( dwSignNetHandle_t  obj)

Releases the SignNet module.

Parameters
[in]objThe handle to SignNet.
Returns
DW_SUCCESS
DW_INVALID_HANDLE : if signNet handle is invalid i.e Null or wrong type
Note
This method renders the handle unusable.

◆ dwSignNet_reset()

DW_API_PUBLIC dwStatus dwSignNet_reset ( dwSignNetHandle_t  obj)

Resets SignNet.

Parameters
[in]objHandle to SignNet.
Returns
DW_SUCCESS
DW_INVALID_HANDLE : if signNet handle is invalid, i.e NULL or wrong type