DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

SignNet.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-2019 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_SIGNNET_H_
49 #define DW_SIGNNET_H_
50 
51 #include <dw/core/Context.h>
52 #include <dw/core/Exports.h>
53 #include <dw/dnn/DNN.h>
54 #include <dw/world/TrafficSigns.h>
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 #define DW_SIGNNET_MAX_CLASSES 796
61 #define DW_SIGNNET_MAX_DNN_OUTPUT 1000
62 #define DW_SIGNNET_MAX_MODELS 64
63 
65 
68 typedef struct dwSignNetObject* dwSignNetHandle_t;
69 
71 typedef enum {
93 
95 typedef enum dwSignNetBatchSize {
100 
101 typedef struct
102 {
110  const void* networkCustomData;
112 
114 typedef const char* dwSignNetModelName;
115 
117 typedef const char* dwSignNetClassName;
118 
129 
142 dwStatus dwSignNet_initialize(dwSignNetHandle_t* signNetHandle,
143  const dwSignNetParams* signNetParams,
144  dwContextHandle_t ctx);
145 
153 dwStatus dwSignNet_reset(dwSignNetHandle_t obj);
154 
163 dwStatus dwSignNet_release(dwSignNetHandle_t obj);
164 
174 dwStatus dwSignNet_getInputBlobsize(dwBlobSize* inputBlobsize, dwSignNetHandle_t obj);
175 
184 dwStatus dwSignNet_getClassLabel(const char** classLabel, uint32_t classIdx, dwSignNetHandle_t obj);
185 
194 dwStatus dwSignNet_getTrafficSignalClass(dwTrafficSignalClass* trafficSignalClass, uint32_t classIdx, dwSignNetHandle_t obj);
195 
206 dwStatus dwSignNet_getTypeLabel(const char** classLabel, uint32_t classIdx, dwSignNetHandle_t obj)
207  DW_DEPRECATED("WARNING: dwSignNet_getTypeLabel is deprecated and will be removed the future releases.");
208 
216 dwStatus dwSignNet_getModelNameLabel(const char** modelNameLabel, dwSignNetHandle_t obj);
217 
234 DW_DEPRECATED("WARNING: dwSignNet_getAvailableClasses() with the current signature is deprecated. "
235  "Use dwSignNet_getAvailableClasses_new() in this release. In future releases use "
236  "dwSignNet_getAvailableClasses() with new signature.")
238  uint32_t* numSignClasses,
239  dwSignNetHandle_t obj);
240 
254 dwStatus dwSignNet_getAvailableClassesNew(dwSignNetClassName* signClasses,
255  uint32_t* numSignClasses,
256  dwSignNetHandle_t obj);
257 
267 dwStatus dwSignNet_getNumberOutputs(uint32_t* numSignOutputs,
268  dwSignNetHandle_t obj);
269 
279 dwStatus dwSignNet_getAvailableModels(dwSignNetModelName* availableModels,
280  uint32_t* numAvailableModels);
281 
291 dwStatus dwSignNet_getDNNMetaData(dwDNNMetaData* metaData, dwSignNetHandle_t obj);
292 
293 #ifdef __cplusplus
294 }
295 #endif
296 
297 #endif // DW_SIGNNET_H_
dwPrecision networkPrecision
SignNet network precision. Default is DW_PRECISION_FP32.
Definition: SignNet.h:106
SignNet model for EU signs version 1.
Definition: SignNet.h:79
SignNet model for US signs, version 1.
Definition: SignNet.h:73
DW_API_PUBLIC dwStatus dwSignNet_getModelNameLabel(const char **modelNameLabel, dwSignNetHandle_t obj)
Returns the SignNet model text label (name of a model) for a hangle.
DW_API_PUBLIC dwStatus dwSignNet_getAvailableClassesNew(dwSignNetClassName *signClasses, uint32_t *numSignClasses, dwSignNetHandle_t obj)
Returns the sign classes that SignNet can detect.
SignNet model for EU signs version 3.
Definition: SignNet.h:83
DW_API_PUBLIC dwStatus dwSignNet_getTypeLabel(const char **classLabel, uint32_t classIdx, dwSignNetHandle_t obj)
Returns the class label for a given class index for UI output.
dwPrecision
Definition: Types.h:140
SignNet network is loaded with batch size = 32 if available.
Definition: SignNet.h:98
DW_API_PUBLIC dwStatus dwSignNet_getDNNMetaData(dwDNNMetaData *metaData, dwSignNetHandle_t obj)
Returns the DNN metadata.
dwSignNetModel networkModel
SignNet network model. Default is DW_SIGNNET_MODEL_FRONT_US_V2.
Definition: SignNet.h:104
NVIDIA DriveWorks API: Core Methods
Holds blob dimensions.
Definition: DNNTypes.h:60
DW_API_PUBLIC dwStatus dwSignNet_getClassLabel(const char **classLabel, uint32_t classIdx, dwSignNetHandle_t obj)
Returns the class label for a given class index for UI output.
const void * networkCustomData
Custom network data. Must be set if custom model is selected and available.
Definition: SignNet.h:110
NVIDIA DriveWorks API: DNN Methods
dwStatus
Status definition.
Definition: Status.h:166
SignNet model for US signs, version 4 (HWISP)
Definition: SignNet.h:77
dwSignNetModel
SignNet network models to be loaded by SignNet module.
Definition: SignNet.h:71
NVIDIA DriveWorks API: Traffic Sign types enum
DW_API_PUBLIC dwStatus dwSignNet_getInputBlobsize(dwBlobSize *inputBlobsize, dwSignNetHandle_t obj)
Returns input blob size that SignNet expects.
SignNet network is loaded with batch size = 16 if available.
Definition: SignNet.h:97
#define DW_DEPRECATED(msg)
Definition: Exports.h:68
DW_API_PUBLIC dwStatus dwSignNet_reset(dwSignNetHandle_t obj)
Resets SignNet.
dwSignClass
Legacy-models type of a sign (to be depricated).
Definition: TrafficSigns.h:228
DW_API_PUBLIC dwStatus dwSignNet_getNumberOutputs(uint32_t *numSignOutputs, dwSignNetHandle_t obj)
Returns the number of raw signnet outputs its DNN produces.
DW_API_PUBLIC dwStatus dwSignNet_getTrafficSignalClass(dwTrafficSignalClass *trafficSignalClass, uint32_t classIdx, dwSignNetHandle_t obj)
Returns the dwTrafficSignalClass sturcutre for a given class index for UI output. ...
dwSignNetBatchSize
SignNet network batch size options.
Definition: SignNet.h:95
SignNet model for Japan signs version 1.
Definition: SignNet.h:87
Loads custom SignNet model if available.
Definition: SignNet.h:91
DW_API_PUBLIC dwStatus dwSignNet_initDefaultParams(dwSignNetParams *params, dwContextHandle_t ctx)
Initializes SignNet parameters with default values.
const char * dwSignNetModelName
SignNet model name type.
Definition: SignNet.h:114
DW_API_PUBLIC dwStatus dwSignNet_release(dwSignNetHandle_t obj)
Releases the SignNet module.
SignNet model for EU signs version 4 (HWISP)
Definition: SignNet.h:85
struct dwSignNetObject * dwSignNetHandle_t
Handle to a SignNet object.
Definition: SignNet.h:68
DW_API_PUBLIC dwStatus dwSignNet_getAvailableModels(dwSignNetModelName *availableModels, uint32_t *numAvailableModels)
Returns the list of models the SignNet module has.
SignNet model for US signs, version 2.
Definition: SignNet.h:75
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
Specifies TensorRT model header.
Definition: DNN.h:69
SignNet model for EU signs version 2.
Definition: SignNet.h:81
const char * dwSignNetClassName
Type for SignNet model class.
Definition: SignNet.h:117
SignNet network is loaded with batch size = 1 if available.
Definition: SignNet.h:96
NVIDIA DriveWorks API: Core Exports
Class of traffic signal.
Definition: TrafficSigns.h:165
#define DW_API_PUBLIC
Definition: Exports.h:56
dwSignNetBatchSize batchSize
SignNet network batch size. Default is DW_SIGNNET_BATCH_SIZE_1.
Definition: SignNet.h:108
DW_API_PUBLIC dwStatus dwSignNet_getAvailableClasses(const dwSignClass **signClasses, uint32_t *numSignClasses, dwSignNetHandle_t obj)
Returns the sign classes that SignNet can detect.
DW_API_PUBLIC dwStatus dwSignNet_initialize(dwSignNetHandle_t *signNetHandle, const dwSignNetParams *signNetParams, dwContextHandle_t ctx)
Initializes SignNet module.