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:
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.
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:
Get list of available classes along with the number of classes:
Obtain meta data which contains preprocessing configuration of the network:
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)