DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

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

Initialization

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

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

To initialize a pointer to OpenRoadNet handle with the designated values of dwOpenRoadNetParams call:

An example code snippet to initialize an OpenRoadNet module with a customized FP32 OpenRoadNet model that is optimized to prefrom inference on GPU:

dwOpenRoadNetParams openRoadNetParams{};
dwOpenRoadNet_initDefaultParams(&openRoadNetParams);
openRoadNetParams.networkModel = DW_OPENROADNET_MODEL_CUSTOM;
openRoadNetParams.networkCustomData = "my_openroadnet_model";
CHECK_DW_ERROR(dwOpenRoadNet_initialize(&openRoadNet, &openRoadParams, context));

Note that dwOpenRoadNet_initDefaultParams() set openRoadNetParams.networkPrecision and openRoadNetParams.processorType to their default values of DW_PRECISION_FP32 and DW_PROCESSOR_TYPE_GPU, respectively. It is assuming that "my_openroadnet_model" file exists in data/resources sub-directory.

Query Network Specs

With the provided APIs, you can query the input blob dimension that the initialized OpenRoadNet expects:

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

dwStatus dwOpenRoadNet_getClassLabel(const char** classLabel, uint32_t classIdx, dwOpenRoadNetHandle_t obj);

or even the meta data which contains preprocessing configuration of the network:

Release

Finally, to release the OpenRoadNet module at the end of the application:

Freespace Perception Workflow shows in more details how to employ OpenRoadNet with FreespaceDetector after initialization. For more concrete usage please refer to Freespace Detection Sample (OpenRoadNet).