DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

RoadMarkNet Workflow

Initialization

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

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

To initialize a pointer to RoadMarkNet handle with the designated values of dwRoadMarkNetParams call:

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

dwRoadMarkNetParams roadMarkNetParams{};
dwRoadMarkNet_initDefaultParams(&roadMarkNetParams, context);
roadMarkNetParams.networkModel = DW_ROADMARKNET_MODEL_CUSTOM;
roadMarkNetParams.networkCustomData = "my_RoadMarkNet_model";
roadMarkNetParams.batchSize = DW_ROADMARKNET_BATCH_SIZE_1;
CHECK_DW_ERROR(dwRoadMarkNet_initialize(&roadMarkNet, &roadMarkNetParams, context));

Note that dwRoadMarkNet_initDefaultParams() set roadMarkNetParams.networkPrecision, roadMarkNetParams.batchSize and roadMarkNetParams.processorType to their default values of DW_PRECISION_FP32, DW_ROADMARKNET_BATCH_SIZE_32 and DW_PROCESSOR_TYPE_GPU, respectively. It is assuming that "my_RoadMarknet_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 RoadMarkNet expects:

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

dwStatus dwRoadMarkNet_getClassLabel(const char** classLabel, dwRoadmarkType roadmarkType, dwRoadMarkNetHandle_t obj);

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

Release

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