DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

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

Initialization

WaitNet module creates a WaitNet handle ( dwWaitNetHandle_t ) that is owned by the application and must be released by the application when it's not needed anymore.

dwWaitNetParams records the specs of the WaitNet model to be loaded and initialized. These parameters determine which precision, optimized processor, and specific network model to be loaded. dwWaitNetModel defines specific network model to use. To initialize WaitNet parameters with default values:

To initialize a pointer to WaitNet handle with the designated values of dwWaitNetParams call:

An example code snippet to initialize a WaitNet module with a customized FP32 WaitNet model that is optimized to perform inference on GPU:

dwWaitNetHandle_t waitnetHandle{};
dwWaitNetParams waitnetParams{};
waitnetParams.maxClustersPerClass = 10000u;
waitnetParams.maxProposalsPerClass = 10000u;
dwWaitNet_initialize(&waitnetHandle, &waitnetParams, context);

Note that dwWaitNet_initDefaultParams() set waitnetParams.networkPrecision to the default values of DW_PRECISION_FP32. And it is assuming that the network file "waitnet.dnn" is already present in data/resources sub-directory.

Query Network Specs

With the provided APIs, you can get the input and output blob dimension that the initialized WaitNet expects:

or retrieve the pointer to the label of the provided class index:

dwStatus dwWaitNet_getAvailableClasses(const dwWaitConditionsObjectClass** intersectionClasses,
const dwWaitConditionsObjectClass** trafficControlClasses,
uint32_t* numIntersectionClasses, uint32_t* numTrafficControlClasses, d
wWaitNetHandle_t obj)

Release

To release the WaitNet module at the end of the application: