1 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
3 @page pathnet_usecase1 PathNet Workflow
7 PathNet module initialization takes either PathNet module handle or user customized path detection network module handle as an input. To initialize NVIDIA PathNet module:
9 dwStatus dwPathNet_initDefaultParams(dwPathNetParams* pathNetParams);
12 Or to initialize a pointer to a PathNet handle with designated values of `dwPathNetParams` use:
14 dwStatus dwPathNet_initialize(dwPathNetHandle_t *pathNetHandle,
15 const dwPathNetParams *pathNetParams,
16 dwContextHandle_t ctx);
19 An example code snippet to initialize a PathNet module with a customized FP32 PathNet model that is optimized to perfrom inference on GPU:
21 dwPathNetHandle_t pathNet;
22 dwPathNetParams pathNetParams{};
23 dwPathNet_initDefaultParams(&pathNetParams);
24 pathNetParams.networkModel = DW_PATHNET_MODEL_CUSTOM;
25 pathNetParams.networkCustomData = "my_pathnet_model";
26 CHECK_DW_ERROR(dwPathNet_initialize(&pathNet, &pathNetParams, context));
28 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.
30 ## Query Network Specs
32 With the provided APIs, you can get the input blob dimension that the initialized PathNet expects:
34 dwStatus dwPathNet_getInputBlobsize(dwBlobSize* inputBlobsize, dwPathNetHandle_t obj);
38 Retrieve the pointer to the path position label of the provided class index:
40 dwStatus dwPathNet_getPathPositionLabel(const char** pathPositionLabel, uint32_t classIdx, dwPathNetHandle_t obj);
44 Or, retrieve the meta data which contains preprocessing configuration for the network:
46 dwStatus dwPathNet_getDNNMetaData(dwDNNMetaData* metaData, dwPathNetHandle_t obj);
50 ## PathNet Module Reset
52 To reset the PathNet module:
54 dwStatus dwPathNet_reset(dwPathNetHandle_t obj);
57 ## PathNet Module Release
59 To release the PathNet module:
61 dwPathNet_release(dwPathNetHandle_t *obj);
64 For more detailed workflow, please refer to the path detection sample: @ref dwx_path_perception_sample.