NVIDIA DeepStream SDK API Reference

5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvdsinfer.h
Go to the documentation of this file.
1 
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 
133 typedef struct
134 {
136  unsigned int classId;
137 
139  float left;
141  float top;
143  float width;
145  float height;
146 
151 
156 
160 typedef struct
161 {
165  unsigned int attributeIndex;
167  unsigned int attributeValue;
172  const char *attributeLabel;
174 
178 typedef enum {
201 
205 typedef enum {
211 
219 const char* NvDsInferStatus2Str(NvDsInferStatus status);
220 
221 #ifdef __cplusplus
222 }
223 #endif
224 
225 /* C++ data types */
226 #ifdef __cplusplus
227 
232 typedef enum
233 {
234  kSELECTOR_MIN = 0,
235  kSELECTOR_OPT,
236  kSELECTOR_MAX,
237  kSELECTOR_SIZE
238 } NvDsInferProfileSelector;
239 
243 typedef struct
244 {
245  int batchSize = 0;
246  NvDsInferDims dims = {0};
247 } NvDsInferBatchDims;
248 
253 struct NvDsInferBatchDimsLayerInfo : NvDsInferLayerInfo
254 {
255  NvDsInferBatchDims profileDims[kSELECTOR_SIZE];
256 };
257 
258 #endif
259 
260 #endif
261 
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:133
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:143
NvDsInferObjectDetectionInfo NvDsInferParseObjectInfo
A typedef defined to maintain backward compatibility.
Definition: nvdsinfer.h:155
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:165
Failed to configure the NvDsInferContext instance possibly due to an erroneous initialization propert...
Definition: nvdsinfer.h:183
NvDsInferDataType dataType
Holds the data type of the layer.
Definition: nvdsinfer.h:89
Custom Library interface implementation failed.
Definition: nvdsinfer.h:185
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:160
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:189
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: nvdsinfer.h:205
Invalid parameters were supplied.
Definition: nvdsinfer.h:187
NvDsInferDataType
Specifies the data type of a layer.
Definition: nvdsinfer.h:71
const char * attributeLabel
Holds a pointer to a string containing the attribute's label.
Definition: nvdsinfer.h:172
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:191
float height
Holds the height of the object's bounding box.
Definition: nvdsinfer.h:145
float attributeConfidence
Holds the attribute's confidence level.
Definition: nvdsinfer.h:169
unsigned int numElements
Holds the number of elements in the layer, including all dimensions.
Definition: nvdsinfer.h:52
unsigned int classId
Holds the ID of the class to which the object belongs.
Definition: nvdsinfer.h:136
unsigned int attributeValue
Holds the the attribute's output value.
Definition: nvdsinfer.h:167
Unknown error was encountered.
Definition: nvdsinfer.h:199
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
Definition: nvdsinfer.h:149
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:178
Holds the dimensions of a layer.
Definition: nvdsinfer.h:45
Resource error was encountered.
Definition: nvdsinfer.h:195
NvDsInferContext operation succeeded.
Definition: nvdsinfer.h:180
int bindingIndex
Holds the TensorRT binding index of the layer.
Definition: nvdsinfer.h:96
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:141
TRT-IS error was encountered.
Definition: nvdsinfer.h:197
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:139
#define NVDSINFER_MAX_DIMS
Definition: nvdsinfer.h:38
const char * NvDsInferStatus2Str(NvDsInferStatus status)
Get the string name for the status.
#define _DS_DEPRECATED_(STR)
Definition: nvdsinfer.h:40
TensorRT interface failed.
Definition: nvdsinfer.h:193
Specifies INT32 format.
Definition: nvdsinfer.h:80