DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

perception/path/camera/pilotnet/docs/pilotnet_usecase1.md
Go to the documentation of this file.
1 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
2 
3 @page pilotnet_usecase1 PilotNet Workflow
4 
5 ## Initialization
6 
7 A set of parameters is needed to define the network to be used. These parameters are defined in the ::dwPilotNetParams struct. The default parameters can be loaded with the following function
8 ```{.cpp}
9 dwStatus dwPilotNet_initDefaultParams(dwPilotNetParams* pilotNetParams);
10 ```
11 
12 If a custom model needs to be used, then we can replace the `networkModel` in the default params as follows:
13 ```{.cpp}
14 dwPilotNetParams pilotNetParams{};
15 dwPilotNet_initDefaultParams(&pilotNetParams);
16 pilotNetParams.networkModel = DW_PILOTNET_MODEL_CUSTOM;
17 pilotNetParams.networkCustomData = "path_to_pilotnet_model";
18 ```
19 Note that the default model supports only FP32.
20 
21 The PilotNet DNN module can be initialized with the following call:
22 ```{.cpp}
23 dwStatus dwPilotNet_initialize(dwPilotNetHandle_t* pilotNetHandle,
24  const dwPilotNetParams* pilotNetParams,
25  dwContextHandle_t ctx);
26 ```
27 
28 Once the module is initialized, ::dwPilotNetHandle_t can be used to initialize the @ref pathperception_mainsection_pilotnetdetector module.
29 
30 ## PilotNet Module Reset
31 
32 To reset the PilotNet module:
33 ```{.cpp}
34 dwStatus dwPilotNet_reset(dwPilotNetHandle_t obj);
35 ```
36 
37 ## PilotNet Module Release
38 
39 To release the PilotNet module:
40 ```{.cpp}
41 dwStatus dwPilotNet_release(dwPilotNetHandle_t obj);
42 ```
43 
44 For a more detailed workflow, please refer to the PilotNet detector: @ref dwx_pilotnet_sample.