DriveWorks SDK Reference
3.5.78 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 {
91 
93 typedef enum dwSignNetBatchSize {
98 
99 typedef struct
100 {
108  const void* networkCustomData;
110 
112 typedef const char* dwSignNetModelName;
113 
115 typedef const char* dwSignNetClassName;
116 
127 
140 dwStatus dwSignNet_initialize(dwSignNetHandle_t* signNetHandle,
141  const dwSignNetParams* signNetParams,
142  dwContextHandle_t ctx);
143 
151 dwStatus dwSignNet_reset(dwSignNetHandle_t obj);
152 
161 dwStatus dwSignNet_release(dwSignNetHandle_t obj);
162 
172 dwStatus dwSignNet_getInputBlobsize(dwBlobSize* inputBlobsize, dwSignNetHandle_t obj);
173 
182 dwStatus dwSignNet_getClassLabel(const char** classLabel, uint32_t classIdx, dwSignNetHandle_t obj);
183 
192 dwStatus dwSignNet_getTrafficSignalClass(dwTrafficSignalClass* trafficSignalClass, uint32_t classIdx, dwSignNetHandle_t obj);
193 
204 dwStatus dwSignNet_getTypeLabel(const char** classLabel, uint32_t classIdx, dwSignNetHandle_t obj)
205  DW_DEPRECATED("WARNING: dwSignNet_getTypeLabel is deprecated and will be removed the future releases.");
206 
214 dwStatus dwSignNet_getModelNameLabel(const char** modelNameLabel, dwSignNetHandle_t obj);
215 
232 DW_DEPRECATED("WARNING: dwSignNet_getAvailableClasses() with the current signature is deprecated. "
233  "Use dwSignNet_getAvailableClasses_new() in this release. In future releases use "
234  "dwSignNet_getAvailableClasses() with new signature.")
236  uint32_t* numSignClasses,
237  dwSignNetHandle_t obj);
238 
252 dwStatus dwSignNet_getAvailableClassesNew(dwSignNetClassName* signClasses,
253  uint32_t* numSignClasses,
254  dwSignNetHandle_t obj);
255 
265 dwStatus dwSignNet_getNumberOutputs(uint32_t* numSignOutputs,
266  dwSignNetHandle_t obj);
267 
277 dwStatus dwSignNet_getAvailableModels(dwSignNetModelName* availableModels,
278  uint32_t* numAvailableModels);
279 
289 dwStatus dwSignNet_getDNNMetaData(dwDNNMetaData* metaData, dwSignNetHandle_t obj);
290 
291 #ifdef __cplusplus
292 }
293 #endif
294 
295 #endif // DW_SIGNNET_H_
dwPrecision networkPrecision
SignNet network precision. Default is DW_PRECISION_FP32.
Definition: SignNet.h:104
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.
[Deprecated] Non-HWISP SignNet model for EU signs, version 3
Definition: SignNet.h:77
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:96
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:102
NVIDIA DriveWorks API: Core Methods
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:108
Current models for use per country.
Definition: SignNet.h:84
NVIDIA DriveWorks API: DNN Methods
dwStatus
Status definition.
Definition: Status.h:178
HWISP SignNet model for US signs, version 4.
Definition: SignNet.h:75
dwSignNetModel
SignNet network models to be loaded by SignNet module.
Definition: SignNet.h:71
NVIDIA DriveWorks API: Traffic Sign types enum
Holds blob dimensions.
Definition: Types.h:560
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:95
#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:232
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:93
SignNet model for Japan signs version 1.
Definition: SignNet.h:81
Loads custom SignNet model if available.
Definition: SignNet.h:89
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:112
DW_API_PUBLIC dwStatus dwSignNet_release(dwSignNetHandle_t obj)
Releases the SignNet module.
HWISP SignNet model for EU signs version 4.
Definition: SignNet.h:79
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.
[Deprecated] Non-HWISP SignNet model for US signs, version 2
Definition: SignNet.h:73
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
Specifies TensorRT model header.
Definition: DNN.h:69
const char * dwSignNetClassName
Type for SignNet model class.
Definition: SignNet.h:115
SignNet network is loaded with batch size = 1 if available.
Definition: SignNet.h:94
NVIDIA DriveWorks API: Core Exports
Class of traffic signal.
Definition: TrafficSigns.h:169
#define DW_API_PUBLIC
Definition: Exports.h:56
dwSignNetBatchSize batchSize
SignNet network batch size. Default is DW_SIGNNET_BATCH_SIZE_1.
Definition: SignNet.h:106
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.