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:
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.
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:
or even the meta data which contains preprocessing configuration of the network:
Finally, to release the RoadMarkNet module at the end of the application: