DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

LightNet.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) 2018 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 
48 #ifndef DW_LIGHTNET_H_
49 #define DW_LIGHTNET_H_
50 
51 #include <dw/core/Context.h>
52 #include <dw/dnn/DNN.h>
53 #include <dw/world/TrafficSigns.h>
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
60 
63 typedef struct dwLightNetObject* dwLightNetHandle_t;
64 
66 typedef enum {
76 
78 typedef enum dwLightNetBatchSize {
84 
85 typedef struct
86 {
94  const void* networkCustomData;
98 
108 
119 dwStatus dwLightNet_initialize(dwLightNetHandle_t* lightNetHandle,
120  const dwLightNetParams* lightNetParams,
121  dwContextHandle_t ctx);
122 
129 dwStatus dwLightNet_reset(dwLightNetHandle_t obj);
130 
138 dwStatus dwLightNet_release(dwLightNetHandle_t obj);
139 
147 dwStatus dwLightNet_getInputBlobsize(dwBlobSize* inputBlobsize, dwLightNetHandle_t obj);
148 
157 dwStatus dwLightNet_getTypeLabel(const char** classLabel, uint32_t classIdx, dwLightNetHandle_t obj);
158 
166 dwStatus dwLightNet_getDNNMetaData(dwDNNMetaData* metaData, dwLightNetHandle_t obj);
167 
177 dwStatus dwLightNet_getNumberOutputs(uint32_t* numLightOutputs,
178  dwLightNetHandle_t obj);
179 
180 #ifdef __cplusplus
181 }
182 #endif
183 
184 #endif // DW_LIGHTNET_H_
DW_API_PUBLIC dwStatus dwLightNet_getDNNMetaData(dwDNNMetaData *metaData, dwLightNetHandle_t obj)
Returns the DNN metadata.
LightNet network is loaded with batch size = 16 if available.
Definition: LightNet.h:80
dwPrecision
Definition: Types.h:140
DW_API_PUBLIC dwStatus dwLightNet_initDefaultParams(dwLightNetParams *params, dwContextHandle_t ctx)
Initializes LightNet parameters with default values.
const void * networkCustomData
Custom network data. Must be set if custom model is selected and available.
Definition: LightNet.h:94
dwLightNetBatchSize batchSize
LightNet network batch size. Default is DW_LIGHTNET_BATCH_SIZE_1.
Definition: LightNet.h:92
NVIDIA DriveWorks API: Core Methods
Holds blob dimensions.
Definition: DNNTypes.h:60
Loads custom LightNet model if available.
Definition: LightNet.h:74
DW_API_PUBLIC dwStatus dwLightNet_release(dwLightNetHandle_t obj)
Releases the LightNet module.
NVIDIA DriveWorks API: DNN Methods
LightNet model on front camera.
Definition: LightNet.h:68
DW_API_PUBLIC dwStatus dwLightNet_getNumberOutputs(uint32_t *numLightOutputs, dwLightNetHandle_t obj)
Returns the number of raw lightnet outputs its DNN produces.
dwStatus
Status definition.
Definition: Status.h:166
dwProcessorType
Processor type definitions.
Definition: Types.h:159
NVIDIA DriveWorks API: Traffic Sign types enum
DW_API_PUBLIC dwStatus dwLightNet_initialize(dwLightNetHandle_t *lightNetHandle, const dwLightNetParams *lightNetParams, dwContextHandle_t ctx)
Initializes LightNet module.
DW_API_PUBLIC dwStatus dwLightNet_getInputBlobsize(dwBlobSize *inputBlobsize, dwLightNetHandle_t obj)
Returns input blob size that LightNet expects.
dwLightNetModel
LightNet network models to be loaded by LightNet module.
Definition: LightNet.h:66
dwPrecision networkPrecision
LightNet network precision. Default is DW_PRECISION_FP32.
Definition: LightNet.h:90
LightNet network is loaded with batch size = 64 if available.
Definition: LightNet.h:82
dwLightNetModel networkModel
LightNet network model. Default is DW_LIGHTNET_MODEL_FRONT_V7.
Definition: LightNet.h:88
DW_API_PUBLIC dwStatus dwLightNet_getTypeLabel(const char **classLabel, uint32_t classIdx, dwLightNetHandle_t obj)
Returns the class label for a given class index.
dwProcessorType processorType
Processor type. Supported processors: GPU, DLA (only on DDPX)
Definition: LightNet.h:96
DW_API_PUBLIC dwStatus dwLightNet_reset(dwLightNetHandle_t obj)
Resets LightNet.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
Specifies TensorRT model header.
Definition: DNN.h:69
dwLightNetBatchSize
LightNet network batch size options.
Definition: LightNet.h:78
LightNet network is loaded with batch size = 32 if available.
Definition: LightNet.h:81
#define DW_API_PUBLIC
Definition: Exports.h:56
LightNet network is loaded with batch size = 1 if available.
Definition: LightNet.h:79
struct dwLightNetObject * dwLightNetHandle_t
Handle to a LightNet object.
Definition: LightNet.h:63