DriveWorks SDK Reference
3.5.78 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 {
77 
79 typedef enum dwLightNetBatchSize {
85 
86 typedef struct
87 {
95  const void* networkCustomData;
99 
109 
120 dwStatus dwLightNet_initialize(dwLightNetHandle_t* lightNetHandle,
121  const dwLightNetParams* lightNetParams,
122  dwContextHandle_t ctx);
123 
130 dwStatus dwLightNet_reset(dwLightNetHandle_t obj);
131 
139 dwStatus dwLightNet_release(dwLightNetHandle_t obj);
140 
148 dwStatus dwLightNet_getInputBlobsize(dwBlobSize* inputBlobsize, dwLightNetHandle_t obj);
149 
158 dwStatus dwLightNet_getTypeLabel(const char** classLabel, uint32_t classIdx, dwLightNetHandle_t obj);
159 
167 dwStatus dwLightNet_getDNNMetaData(dwDNNMetaData* metaData, dwLightNetHandle_t obj);
168 
178 dwStatus dwLightNet_getNumberOutputs(uint32_t* numLightOutputs,
179  dwLightNetHandle_t obj);
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #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:81
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:95
dwLightNetBatchSize batchSize
LightNet network batch size. Default is DW_LIGHTNET_BATCH_SIZE_1.
Definition: LightNet.h:93
NVIDIA DriveWorks API: Core Methods
Loads custom LightNet model if available.
Definition: LightNet.h:75
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:178
dwProcessorType
Processor type definitions.
Definition: Types.h:159
NVIDIA DriveWorks API: Traffic Sign types enum
Holds blob dimensions.
Definition: Types.h:560
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:91
LightNet network is loaded with batch size = 64 if available.
Definition: LightNet.h:83
dwLightNetModel networkModel
LightNet network model. Default is DW_LIGHTNET_MODEL_FRONT_V7.
Definition: LightNet.h:89
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:97
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:79
LightNet network is loaded with batch size = 32 if available.
Definition: LightNet.h:82
#define DW_API_PUBLIC
Definition: Exports.h:56
LightNet network is loaded with batch size = 1 if available.
Definition: LightNet.h:80
struct dwLightNetObject * dwLightNetHandle_t
Handle to a LightNet object.
Definition: LightNet.h:63