NVIDIA DeepStream SDK API Reference

6.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvdsinfer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  *
10  */
11 
28 #ifndef _NVDSINFER_H_
29 #define _NVDSINFER_H_
30 
31 #include <stdint.h>
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37 
38 #define NVDSINFER_MAX_DIMS 8
39 
40 #define _DS_DEPRECATED_(STR) __attribute__ ((deprecated (STR)))
41 
45 typedef struct
46 {
48  unsigned int numDims;
50  unsigned int d[NVDSINFER_MAX_DIMS];
52  unsigned int numElements;
54 
58 typedef struct
59 {
61  unsigned int c;
63  unsigned int h;
65  unsigned int w;
67 
71 typedef enum
72 {
74  FLOAT = 0,
76  HALF = 1,
78  INT8 = 2,
80  INT32 = 3
82 
86 typedef struct
87 {
91  union {
93  NvDsInferDims dims _DS_DEPRECATED_("dims is deprecated. Use inferDims instead");
94  };
98  const char* layerName;
100  void *buffer;
103  int isInput;
105 
109 typedef struct
110 {
112  unsigned int width;
114  unsigned int height;
116  unsigned int channels;
118 
123 #define getDimsCHWFromDims(dimsCHW,dims) \
124  do { \
125  (dimsCHW).c = (dims).d[0]; \
126  (dimsCHW).h = (dims).d[1]; \
127  (dimsCHW).w = (dims).d[2]; \
128  } while (0)
129 
130 #define getDimsHWCFromDims(dimsCHW,dims) \
131  do { \
132  (dimsCHW).h = (dims).d[0]; \
133  (dimsCHW).w = (dims).d[1]; \
134  (dimsCHW).c = (dims).d[2]; \
135  } while (0)
136 
140 typedef struct
141 {
143  unsigned int classId;
144 
146  float left;
148  float top;
150  float width;
152  float height;
153 
158 
163 
167 typedef struct
168 {
170  unsigned int classId;
171 
173  float left;
175  float top;
177  float width;
179  float height;
180 
184 
186  float *mask;
188  unsigned int mask_width;
190  unsigned int mask_height;
192  unsigned int mask_size;
194 
198 typedef struct
199 {
203  unsigned int attributeIndex;
205  unsigned int attributeValue;
213 
217 typedef enum {
242 
246 typedef enum {
252 
260 const char* NvDsInferStatus2Str(NvDsInferStatus status);
261 
262 #ifdef __cplusplus
263 }
264 #endif
265 
266 /* C++ data types */
267 #ifdef __cplusplus
268 
273 typedef enum
274 {
275  kSELECTOR_MIN = 0,
276  kSELECTOR_OPT,
277  kSELECTOR_MAX,
278  kSELECTOR_SIZE
279 } NvDsInferProfileSelector;
280 
284 typedef struct
285 {
286  int batchSize = 0;
287  NvDsInferDims dims = {0};
288 } NvDsInferBatchDims;
289 
294 struct NvDsInferBatchDimsLayerInfo : NvDsInferLayerInfo
295 {
296  NvDsInferBatchDims profileDims[kSELECTOR_SIZE];
297 };
298 
299 #endif
300 
301 #endif
302 
unsigned int w
Holds the width of the layer.
Definition: nvdsinfer.h:65
Holds information about one parsed object from a detector's output.
Definition: nvdsinfer.h:140
void * buffer
Holds a pointer to the buffer for the layer data.
Definition: nvdsinfer.h:100
float width
Holds the width of the object's bounding box.
Definition: nvdsinfer.h:150
NvDsInferObjectDetectionInfo NvDsInferParseObjectInfo
A typedef defined to maintain backward compatibility.
Definition: nvdsinfer.h:162
unsigned int width
Holds the input width for the model.
Definition: nvdsinfer.h:112
unsigned int attributeIndex
Holds the index of the attribute's label.
Definition: nvdsinfer.h:203
Failed to configure the NvDsInferContext instance possibly due to an erroneous initialization propert...
Definition: nvdsinfer.h:222
NvDsInferDataType dataType
Holds the data type of the layer.
Definition: nvdsinfer.h:89
Custom Library interface implementation failed.
Definition: nvdsinfer.h:224
const char * layerName
Holds the name of the layer.
Definition: nvdsinfer.h:98
Specifies FP32 format.
Definition: nvdsinfer.h:74
Specifies INT8 format.
Definition: nvdsinfer.h:78
unsigned int c
Holds the channel count of the layer.
Definition: nvdsinfer.h:61
Holds information about one classified attribute.
Definition: nvdsinfer.h:198
char * attributeLabel
Holds a pointer to a string containing the attribute's label.
Definition: nvdsinfer.h:211
float width
Holds the width of the object's bounding box.
Definition: nvdsinfer.h:177
unsigned int classId
Holds the ID of the class to which the object belongs.
Definition: nvdsinfer.h:170
unsigned int numDims
Holds the number of dimesions in the layer.
Definition: nvdsinfer.h:48
unsigned int h
Holds the height of the layer.
Definition: nvdsinfer.h:63
unsigned int channels
Holds the number of input channels for the model.
Definition: nvdsinfer.h:116
Output parsing failed.
Definition: nvdsinfer.h:228
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: nvdsinfer.h:246
Invalid parameters were supplied.
Definition: nvdsinfer.h:226
NvDsInferDataType
Specifies the data type of a layer.
Definition: nvdsinfer.h:71
Specifies FP16 format.
Definition: nvdsinfer.h:76
unsigned int height
Holds the input height for the model.
Definition: nvdsinfer.h:114
NvDsInferDims inferDims
Definition: nvdsinfer.h:92
CUDA error was encountered.
Definition: nvdsinfer.h:230
float height
Holds the height of the object's bounding box.
Definition: nvdsinfer.h:152
float top
Holds the vertical offset of the object's bounding box.
Definition: nvdsinfer.h:175
float attributeConfidence
Holds the attribute's confidence level.
Definition: nvdsinfer.h:207
unsigned int numElements
Holds the number of elements in the layer, including all dimensions.
Definition: nvdsinfer.h:52
unsigned int mask_height
Holds height of mask.
Definition: nvdsinfer.h:190
unsigned int classId
Holds the ID of the class to which the object belongs.
Definition: nvdsinfer.h:143
unsigned int mask_size
Holds size of mask in bytes.
Definition: nvdsinfer.h:192
unsigned int attributeValue
Holds the the attribute's output value.
Definition: nvdsinfer.h:205
Unknown error was encountered.
Definition: nvdsinfer.h:240
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
Definition: nvdsinfer.h:156
float left
Holds the horizontal offset of the bounding box shape for the object.
Definition: nvdsinfer.h:173
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:217
float * mask
Holds object segment mask.
Definition: nvdsinfer.h:186
Holds the dimensions of a layer.
Definition: nvdsinfer.h:45
Resource error was encountered.
Definition: nvdsinfer.h:234
NvDsInferContext operation succeeded.
Definition: nvdsinfer.h:219
int bindingIndex
Holds the TensorRT binding index of the layer.
Definition: nvdsinfer.h:96
float height
Holds the height of the object's bounding box.
Definition: nvdsinfer.h:179
Holds information about the model network.
Definition: nvdsinfer.h:109
int isInput
Holds a Boolean; true if the layer is an input layer, or false if an output layer.
Definition: nvdsinfer.h:103
Holds the dimensions of a three-dimensional layer.
Definition: nvdsinfer.h:58
float top
Holds the vertical offset of the object's bounding box.
Definition: nvdsinfer.h:148
[deprecated]TRT-IS error was encountered
Definition: nvdsinfer.h:238
Holds information about one layer in the model.
Definition: nvdsinfer.h:86
float left
Holds the horizontal offset of the bounding box shape for the object.
Definition: nvdsinfer.h:146
#define NVDSINFER_MAX_DIMS
Definition: nvdsinfer.h:38
Triton error was encountered.
Definition: nvdsinfer.h:236
const char * NvDsInferStatus2Str(NvDsInferStatus status)
Get the string name for the status.
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
Definition: nvdsinfer.h:183
Holds information about one parsed object and instance mask from a detector's output.
Definition: nvdsinfer.h:167
unsigned int mask_width
Holds width of mask.
Definition: nvdsinfer.h:188
#define _DS_DEPRECATED_(STR)
Definition: nvdsinfer.h:40
TensorRT interface failed.
Definition: nvdsinfer.h:232
Specifies INT32 format.
Definition: nvdsinfer.h:80