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 /*
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 
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 {
163  unsigned int classId;
164 
166  float left;
168  float top;
170  float width;
172  float height;
173 
177 
179  float *mask;
181  unsigned int mask_width;
183  unsigned int mask_height;
185  unsigned int mask_size;
187 
191 typedef struct
192 {
196  unsigned int attributeIndex;
198  unsigned int attributeValue;
203  const char *attributeLabel;
205 
209 typedef enum {
232 
236 typedef enum {
242 
250 const char* NvDsInferStatus2Str(NvDsInferStatus status);
251 
252 #ifdef __cplusplus
253 }
254 #endif
255 
256 /* C++ data types */
257 #ifdef __cplusplus
258 
263 typedef enum
264 {
265  kSELECTOR_MIN = 0,
266  kSELECTOR_OPT,
267  kSELECTOR_MAX,
268  kSELECTOR_SIZE
269 } NvDsInferProfileSelector;
270 
274 typedef struct
275 {
276  int batchSize = 0;
277  NvDsInferDims dims = {0};
278 } NvDsInferBatchDims;
279 
284 struct NvDsInferBatchDimsLayerInfo : NvDsInferLayerInfo
285 {
286  NvDsInferBatchDims profileDims[kSELECTOR_SIZE];
287 };
288 
289 #endif
290 
291 #endif
292 
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:196
Failed to configure the NvDsInferContext instance possibly due to an erroneous initialization propert...
Definition: nvdsinfer.h:214
NvDsInferDataType dataType
Holds the data type of the layer.
Definition: nvdsinfer.h:89
Custom Library interface implementation failed.
Definition: nvdsinfer.h:216
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:191
float width
Holds the width of the object's bounding box.
Definition: nvdsinfer.h:170
unsigned int classId
Holds the ID of the class to which the object belongs.
Definition: nvdsinfer.h:163
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:220
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: nvdsinfer.h:236
Invalid parameters were supplied.
Definition: nvdsinfer.h:218
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:203
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:222
float height
Holds the height of the object's bounding box.
Definition: nvdsinfer.h:145
float top
Holds the vertical offset of the object's bounding box.
Definition: nvdsinfer.h:168
float attributeConfidence
Holds the attribute's confidence level.
Definition: nvdsinfer.h:200
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:183
unsigned int classId
Holds the ID of the class to which the object belongs.
Definition: nvdsinfer.h:136
unsigned int mask_size
Holds size of mask in bytes.
Definition: nvdsinfer.h:185
unsigned int attributeValue
Holds the the attribute's output value.
Definition: nvdsinfer.h:198
Unknown error was encountered.
Definition: nvdsinfer.h:230
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
Definition: nvdsinfer.h:149
float left
Holds the horizontal offset of the bounding box shape for the object.
Definition: nvdsinfer.h:166
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:209
float * mask
Holds object segment mask.
Definition: nvdsinfer.h:179
Holds the dimensions of a layer.
Definition: nvdsinfer.h:45
Resource error was encountered.
Definition: nvdsinfer.h:226
NvDsInferContext operation succeeded.
Definition: nvdsinfer.h:211
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:172
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:228
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.
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
Definition: nvdsinfer.h:176
Holds information about one parsed object and instance mask from a detector's output.
Definition: nvdsinfer.h:160
unsigned int mask_width
Holds width of mask.
Definition: nvdsinfer.h:181
#define _DS_DEPRECATED_(STR)
Definition: nvdsinfer.h:40
TensorRT interface failed.
Definition: nvdsinfer.h:224
Specifies INT32 format.
Definition: nvdsinfer.h:80