PathNet module initialization takes either PathNet module handle or user customized path detection network module handle as an input. To initialize NVIDIA PathNet module:
Or to initialize a pointer to a PathNet handle with designated values of dwPathNetParams
use:
An example code snippet to initialize a PathNet module with a customized FP32 PathNet model that is optimized to perfrom inference on GPU:
Note that dwPathNet_initDefaultParams()
set pathNetParams.networkPrecision
to the default value of DW_PRECISION_FP32
. And it is assuming that "my_pathnet_model" file is already present in data/resources sub-directory.
With the provided APIs, you can get the input blob dimension that the initialized PathNet expects:
Retrieve the pointer to the path position label of the provided class index:
Or, retrieve the meta data which contains preprocessing configuration for the network:
To reset the PathNet module:
To release the PathNet module:
For more detailed workflow, please refer to the path detection sample: Path Perception Sample (PathNet).