DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

AutoNet.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
45 #ifndef DW_DNN_AUTONET_H_
46 #define DW_DNN_AUTONET_H_
47 
48 #include <dw/core/Context.h>
49 #include <dw/dnn/DNN.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
62 
65 typedef struct dwAutoNetObject* dwAutoNetHandle_t;
66 
71 typedef struct dwAutoNetOutputObject* dwAutoNetOutputHandle_t;
72 
74 typedef enum {
84 
86 typedef enum {
96 
98 typedef enum dwAutoNetModel {
101 
104 
109 
111 typedef enum dwAutoNetBatchSize {
114 
116 typedef struct dwAutoNetParams
117 {
119  uint32_t dnnEnabled;
129  const void* networkCustomData;
130 
144 
154 
168 dwStatus dwAutoNet_initialize(dwAutoNetHandle_t* autoNetHandle,
169  const dwAutoNetParams* autoNetParams,
170  dwContextHandle_t ctx);
171 
184 dwStatus dwAutoNet_getInputBlobsize(dwBlobSize* inputBlobsize, dwAutoNetHandle_t obj);
185 
198 dwStatus dwAutoNet_getInputTensorProperties(dwDNNTensorProperties* inputProps, dwAutoNetHandle_t obj);
199 
213 dwStatus dwAutoNet_getNumHeadOutputBlobs(uint32_t* numOutputBlobs, dwAutoNetHeadType headType, dwAutoNetHandle_t obj);
214 
228 dwStatus dwAutoNet_getOutputTensorProperties(dwDNNTensorProperties* outputProps, dwAutoNetHeadType headType, dwAutoNetHandle_t obj);
229 
243 
256 dwStatus dwAutoNet_getDNNMetaData(dwDNNMetaData* metaData, dwAutoNetHandle_t obj);
257 
270 dwStatus dwAutoNet_release(dwAutoNetHandle_t obj);
271 
282 dwStatus dwAutoNet_reset(dwAutoNetHandle_t obj);
283 
295 dwStatus dwAutoNet_createOutput(dwAutoNetOutputHandle_t* autonetOutput, dwAutoNetHandle_t obj);
296 
305 dwStatus dwAutoNet_destroyOutput(dwAutoNetOutputHandle_t autonetOutput);
306 
318 dwStatus dwAutoNet_inferAsync(dwAutoNetOutputHandle_t autonetOutput, dwConstDNNTensorHandle_t* inputTensors, dwAutoNetHandle_t obj);
319 
329 dwStatus dwAutoNet_bindTensorTimestamp(dwAutoNetOutputHandle_t autonetOutput, dwTime_t tensorTimeStamp);
330 
343 dwStatus dwAutoNet_setCUDAStream(cudaStream_t stream, dwAutoNetHandle_t obj);
344 
345 #ifdef __cplusplus
346 }
347 #endif
348 
349 #endif // DW_DNN_AUTONET_H_
DW_API_PUBLIC dwStatus dwAutoNet_reset(dwAutoNetHandle_t obj)
Resets AutoNet.
DW_API_PUBLIC dwStatus dwAutoNet_initDefaultParams(dwAutoNetParams *params)
Initializes AutoNet parameters with default values.
NVIDIA DriveWorks API: OpenRoadNet Module
NVIDIA DriveWorks API: WaitNet Module
Number of available AutoNet models.
Definition: AutoNet.h:103
dwMapNetParams mapNetParams
MapNet head model parameters.
Definition: AutoNet.h:136
dwAutoNetBatchSize
AutoNet network batch size options.
Definition: AutoNet.h:111
NVIDIA DriveWorks API: LightSourceNet Module
const void * networkCustomData
Custom network data. Must be set if custom model is selected and available.
Definition: AutoNet.h:129
dwProcessorType processorType
Processor type. Supported processors: GPU, DLA (only on DDPX)
Definition: AutoNet.h:121
dwPrecision
Definition: Types.h:140
DW_API_PUBLIC dwStatus dwAutoNet_initialize(dwAutoNetHandle_t *autoNetHandle, const dwAutoNetParams *autoNetParams, dwContextHandle_t ctx)
Initializes AutoNet module.
NVIDIA DriveWorks API: Core Methods
AutoNet network is loaded with batch size = 1 if available.
Definition: AutoNet.h:112
dwAutoNetModel networkModel
AutoNet network model. Default is DW_AUTONET_MODEL_FRONT.
Definition: AutoNet.h:123
DW_API_PUBLIC dwStatus dwAutoNet_getInputBlobsize(dwBlobSize *inputBlobsize, dwAutoNetHandle_t obj)
Returns input blob size that AutoNet expects.
NVIDIA DriveWorks API: MapNet Module
dwAutoNetBatchSize batchSize
AutoNet network batch size.
Definition: AutoNet.h:127
DW_API_PUBLIC dwStatus dwAutoNet_release(dwAutoNetHandle_t obj)
Releases the AutoNet module.
dwDriveNetParams driveNetParams
DriveNet head model parameters.
Definition: AutoNet.h:132
AutoNet model parameters.
Definition: AutoNet.h:116
NVIDIA DriveWorks API: DNN Methods
dwStatus
Status definition.
Definition: Status.h:178
AutoNet model that performs best on front camera.
Definition: AutoNet.h:100
dwProcessorType
Processor type definitions.
Definition: Types.h:159
Holds blob dimensions.
Definition: Types.h:560
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
DW_API_PUBLIC dwStatus dwAutoNet_createOutput(dwAutoNetOutputHandle_t *autonetOutput, dwAutoNetHandle_t obj)
Allocates AutoNet output.
DW_API_PUBLIC dwStatus dwAutoNet_setCUDAStream(cudaStream_t stream, dwAutoNetHandle_t obj)
Sets the CUDA stream for CUDA related operations.
DW_API_PUBLIC dwStatus dwAutoNet_destroyOutput(dwAutoNetOutputHandle_t autonetOutput)
Destroys AutoNet output.
dwPrecision networkPrecision
AutoNet network precision. Default is DW_PRECISION_FP32.
Definition: AutoNet.h:125
dwLightSourceNetParams lightSourcenetParams
LightSourceNet head model parameters.
Definition: AutoNet.h:134
struct dwDNNTensorObject const * dwConstDNNTensorHandle_t
Definition: Tensor.h:60
Specifies DNNTensor properties.
Definition: Tensor.h:93
NVIDIA DriveWorks API: DriveNet Module
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
Specifies TensorRT model header.
Definition: DNN.h:69
dwAutoNetModel
AutoNet network models to be loaded by AutoNet module.
Definition: AutoNet.h:98
dwAutoNetSelectionMask
Bitmask enum which enables specific DNN heads to be parsed and post-processed.
Definition: AutoNet.h:86
DW_API_PUBLIC dwStatus dwAutoNet_getNumHeadOutputBlobs(uint32_t *numOutputBlobs, dwAutoNetHeadType headType, dwAutoNetHandle_t obj)
Returns number of valid head outputs that AutoNet expects.
struct dwAutoNetObject * dwAutoNetHandle_t
Handle to a AutoNet object.
Definition: AutoNet.h:65
dwOpenRoadNetParams openRoadNetParams
OpenRoadNet head model parameters.
Definition: AutoNet.h:140
struct dwAutoNetOutputObject * dwAutoNetOutputHandle_t
Handle to a AutoNet output object.
Definition: AutoNet.h:71
Loads custom autonet model if available.
Definition: AutoNet.h:107
DW_API_PUBLIC dwStatus dwAutoNet_getDNNMetaData(dwDNNMetaData *metaData, dwAutoNetHandle_t obj)
Returns the DNN metadata.
dwPathNetParams pathNetParams
PathNet head model parameters.
Definition: AutoNet.h:138
NVIDIA DriveWorks API: PathNet Module
DW_API_PUBLIC dwStatus dwAutoNet_bindTensorTimestamp(dwAutoNetOutputHandle_t autonetOutput, dwTime_t tensorTimeStamp)
Ties image timestamp to the autonet output tensor.
DW_API_PUBLIC dwStatus dwAutoNet_getOutputTensorProperties(dwDNNTensorProperties *outputProps, dwAutoNetHeadType headType, dwAutoNetHandle_t obj)
Returns output properties that AutoNet expects.
dwAutoNetHeadType
Definition AutoNet DNN heads.
Definition: AutoNet.h:74
DW_API_PUBLIC dwStatus dwAutoNet_getProcessorType(dwProcessorType *processorType, dwAutoNetHandle_t obj)
Returns processor type that AutoNet runs on.
uint32_t dnnEnabled
Binary coding (via dwAutoNetSelectionMask) the set of AutoNet heads to be initialized.
Definition: AutoNet.h:119
#define DW_API_PUBLIC
Definition: Exports.h:56
DW_API_PUBLIC dwStatus dwAutoNet_inferAsync(dwAutoNetOutputHandle_t autonetOutput, dwConstDNNTensorHandle_t *inputTensors, dwAutoNetHandle_t obj)
Runs inference on given list of input tensors.
DW_API_PUBLIC dwStatus dwAutoNet_getInputTensorProperties(dwDNNTensorProperties *inputProps, dwAutoNetHandle_t obj)
Returns input properties that AutoNet expects.
DriveNet model parameters.
Definition: DriveNet.h:97
dwWaitNetParams waitNetParams
WaitNet head model parameters.
Definition: AutoNet.h:142