NVIDIA DeepStream SDK API Reference

4.0.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
nvdsinfer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019, 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 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
36 #define NVDSINFER_MAX_DIMS 8
37 
41 typedef struct
42 {
44  unsigned int numDims;
46  unsigned int d[NVDSINFER_MAX_DIMS];
48  unsigned int numElements;
50 
54 typedef struct
55 {
57  unsigned int c;
59  unsigned int h;
61  unsigned int w;
63 
67 typedef enum
68 {
70  FLOAT = 0,
72  HALF = 1,
74  INT8 = 2,
76  INT32 = 3
78 
82 typedef struct
83 {
91  const char* layerName;
93  void *buffer;
96  int isInput;
98 
102 typedef struct
103 {
105  unsigned int width;
107  unsigned int height;
109  unsigned int channels;
111 
116 #define getDimsCHWFromDims(dimsCHW,dims) \
117  do { \
118  (dimsCHW).c = (dims).d[0]; \
119  (dimsCHW).h = (dims).d[1]; \
120  (dimsCHW).w = (dims).d[2]; \
121  } while (0)
122 
126 typedef struct
127 {
129  unsigned int classId;
130 
132  unsigned int left;
134  unsigned int top;
136  unsigned int width;
138  unsigned int height;
139 
143 
148 
152 typedef struct
153 {
156  unsigned int attributeIndex;
158  unsigned int attributeValue;
162  const char *attributeLabel;
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif
170 
unsigned int w
Width of the layer.
Definition: nvdsinfer.h:61
Holds information about one parsed object from detector's output.
Definition: nvdsinfer.h:126
void * buffer
Pointer to the buffer for the layer data.
Definition: nvdsinfer.h:93
NvDsInferObjectDetectionInfo NvDsInferParseObjectInfo
Typedef to maintain backward compatibility.
Definition: nvdsinfer.h:147
unsigned int width
Input width for the model.
Definition: nvdsinfer.h:105
unsigned int left
Horizontal offset of the bounding box shape for the object.
Definition: nvdsinfer.h:132
unsigned int attributeIndex
Index of the label.
Definition: nvdsinfer.h:156
NvDsInferDims dims
Dimensions of the layer.
Definition: nvdsinfer.h:87
NvDsInferDataType dataType
Data type of the layer.
Definition: nvdsinfer.h:85
const char * layerName
Name of the layer.
Definition: nvdsinfer.h:91
FP32 format.
Definition: nvdsinfer.h:70
INT8 format.
Definition: nvdsinfer.h:74
unsigned int c
Channel count of the layer.
Definition: nvdsinfer.h:57
Holds information about one classified attribute.
Definition: nvdsinfer.h:152
unsigned int numDims
Number of dimesions of the layer.
Definition: nvdsinfer.h:44
unsigned int h
Height of the layer.
Definition: nvdsinfer.h:59
unsigned int channels
Number of input channels for the model.
Definition: nvdsinfer.h:109
NvDsInferDataType
Data type of the layers.
Definition: nvdsinfer.h:67
const char * attributeLabel
String label for the attribute.
Definition: nvdsinfer.h:162
FP16 format.
Definition: nvdsinfer.h:72
unsigned int height
Input height for the model.
Definition: nvdsinfer.h:107
float attributeConfidence
Confidence level for the classified attribute.
Definition: nvdsinfer.h:160
unsigned int numElements
Number of elements in the layer including all dimensions.
Definition: nvdsinfer.h:48
unsigned int classId
ID of the class to which the object belongs.
Definition: nvdsinfer.h:129
unsigned int top
Vertical offset of the bounding box shape for the object.
Definition: nvdsinfer.h:134
unsigned int attributeValue
Output for the label.
Definition: nvdsinfer.h:158
float detectionConfidence
Object detection confidence.
Definition: nvdsinfer.h:141
Specifies dimensions of a layer.
Definition: nvdsinfer.h:41
int bindingIndex
TensorRT binding index of the layer.
Definition: nvdsinfer.h:89
Holds information about the model network.
Definition: nvdsinfer.h:102
int isInput
Boolean indicating if the layer is an input layer.
Definition: nvdsinfer.h:96
Specifies dimensions of a layer with 3 dimensions.
Definition: nvdsinfer.h:54
unsigned int width
Width of the bounding box shape for the object.
Definition: nvdsinfer.h:136
Holds information about one layer in the model.
Definition: nvdsinfer.h:82
#define NVDSINFER_MAX_DIMS
Definition: nvdsinfer.h:36
unsigned int height
Height of the bounding box shape for the object.
Definition: nvdsinfer.h:138
INT32 format.
Definition: nvdsinfer.h:76