DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

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


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

dwMapNetParams records the specs of the MapNet model to be loaded and initialized. These parameters determine which precision, optimized processor, and type of MapNet to be loaded and can affect the speed of the inference greatly. dwMapNetType defines which type of network to use segmentation based, regressor based or end-to-end network. To initialize MapNet parameters with default values:

To initialize a pointer to MapNet handle with the designated values of dwMapNetParams call:

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

dwMapNetParams mapNetParams{};
mapNetParams.networkModel = DW_MAPNET_MODEL_FRONT_MULTI_CLASS;
CHECK_DW_ERROR(dwMapNet_initialize(&mapNet, &mapNetParams, context));

Note that dwMapNet_initDefaultParams() set mapNetParams.networkPrecision and mapNetParams.processorType to the default values of DW_PRECISION_FP32 and DW_PROCESSOR_TYPE_GPU, respectively.

The available choices for network model depend on dwMapNetType. If the MapNet type is DW_MAPNET_TYPE_E2E, the supported model is DW_MAPNET_MODEL_FRONT_E2E. If the MapNet type is DW_MAPNET_TYPE_REGRESSOR, the supported model is DW_MAPNET_MODEL_FRONT_REGRESSOR. If the MapNet type is DW_MAPNET_TYPE_SEGMENTATION, the supported models are DW_MAPNET_MODEL_FRONT_MULTI_CLASS and DW_MAPNET_MODEL_FRONT_SINGLE_CLASS.

Query Network Specs

With the provided APIs, you can get the input blob dimension that the initialized MapNet expects:

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

dwStatus dwMapNet_getClassLabel(const char** classLabel, uint32_t classIdx, dwMapNetHandle_t obj);

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


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