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:
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.
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:
or even the meta data which contains preprocessing configuration of the network:
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).