DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

SignNet Workflow
Note
SW Release Applicability: This tutorial is applicable to modules in NVIDIA DRIVE Software releases.

Initialization

SignNet module creates an SignNet handle ( dwSignNetHandle_t ) that is owned by the application and must be released by the application when it's not needed anymore.

dwSignNetParams documents the specs of the SignNet model to be loaded and initialized. These parameters determine which precision, optimized processor, and type of SignNet to be loaded and can affect the speed of the inference significantly. To initialize SignNet parameters with default values:

To initialize a pointer to SignNet handle with the designated values of dwSignNetParams call:

An example code snippet to initialize an SignNet module with a customized FP16 SignNet model that is optimized to perform inference on GPU:

dwSignNetParams signNetParams{};
signNetParams.networkModel = DW_SIGNNET_MODEL_US_CURRENT;
signNetParams.batchSize = DW_SIGNNET_BATCH_SIZE_1;
CHECK_DW_ERROR(dwSignNet_initialize(&signNet, &signNetParams, context));

Note that dwSignNet_initDefaultParams() set signNetParams.networkPrecision, signNetParams.batchSize and signNetParams.processorType to their default values of DW_PRECISION_FP32, DW_SIGNNET_BATCH_SIZE_1 and DW_PROCESSOR_TYPE_GPU, respectively. The currently supplied trained models correspond to DW_SIGNNET_MODEL_US_V4, DW_SIGNNET_MODEL_EU_V4, and DW_SIGNNET_MODEL_JP_V1 which cover signs for the United States, European Union, and Japan respectively. Any other model is considered deprecated.

You can always refer to the current model being used for a certain region by using DW_SIGNNET_MODEL_XX_CURRENT where XX should be replaced with US, EU or JP.

Query Network Specs

With the provided APIs, you can query several aspects of the network:

Get the input blob dimension that the initialized SignNet expects:

Get the text label corresponding to the provided class index:

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

Get list of available classes along with the number of classes:

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

Obtain meta data which contains preprocessing configuration of the network:

Release

Finally, to release the SignNet module at the end of the application use the following method:

Wait Conditions Classification Workflow for Traffic Signs shows in more details how to employ SignNet with ObjectClassifier after initialization. For more concrete usage please refer to Traffic Sign Classification Sample (SignNet)