NVIDIA DeepStream SDK API Reference

8.0 Release
sources/includes/nvdsinfer_context.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
84 #ifndef __NVDSINFER_CONTEXT_H__
85 #define __NVDSINFER_CONTEXT_H__
86 
87 #include "nvdsinfer.h"
88 
97 #define _PATH_MAX 4096
98 
101 #define _MAX_CHANNELS 4
102 
104 #define _MAX_STR_LENGTH 1024
105 
107 #define NVDSINFER_MAX_BATCH_SIZE 1024
108 
111 #define NVDSINFER_MIN_OUTPUT_BUFFERPOOL_SIZE 2
112 
122 typedef enum
123 {
129 
133 typedef enum
134 {
154 
158 typedef enum
159 {
174 
178 typedef enum {
182  NvDsInferUffOrder_kNCHW _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNCHW instead") = NvDsInferTensorOrder_kNCHW,
183  NvDsInferUffOrder_kNHWC _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNCWH instead") = NvDsInferTensorOrder_kNHWC,
184  NvDsInferUffOrder_kNC _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNC instead") = NvDsInferTensorOrder_kNC
186 
187 #define NvDsInferUffOrder _Pragma \
188  ("GCC warning \"'NvDsInferUffOrder' macro is deprecated. Use NvDsInferTensorOrder instead.\"") \
189  NvDsInferTensorOrder
190 
194 typedef struct
195 {
198  union {
199  float threshold _DS_DEPRECATED_("Use preclusterThreshold instead.");
201  };
202 
206 
209  float eps;
212  int minBoxes;
219  float minScore;
224  int topK;
226 
230 typedef enum
231 {
242 {
245  unsigned int uniqueID;
246 
249 
260 
264 
265  union {
270  } _DS_DEPRECATED_("Use inferInputDims instead.");
271 
276 
279 
282 
287 
291  unsigned int maxBatchSize;
292 
297 
301 
304 
307 
312  unsigned int numOffsets;
313 
316 
319  _DS_DEPRECATED_("Use NvDsInferClusterMode instead")
321 
323  unsigned int numDetectedClasses;
324 
328 
332 
334 
338  unsigned int numOutputLayers;
339 
340 
350 
354 
356  unsigned int gpuID;
357 
359  int useDLA;
361  int dlaCore;
362 
365  unsigned int outputBufferPoolSize;
366 
371 
374 
379 
383  unsigned int workspaceSize;
384 
387 
390 
394 
400  unsigned int numOutputIOFormats;
401 
404 
411 
414 
420 
426 
431 
434  double maxGPUMemPer;
435 
458 
465 
474  unsigned int numDynamicProperties;
475 
485 
487 
495 typedef void (* NvDsInferContextReturnInputAsyncFunc) (void *data);
496 
500 typedef struct
501 {
504  void** inputFrames;
506  unsigned int numInputFrames;
510  unsigned int inputPitch;
517 
518 typedef struct
519 {
522  unsigned int numInputTensors;
529 
533 typedef struct
534 {
536  float left;
538  float top;
540  float width;
542  float height;
546  char *label;
547  /* confidence score of the detected object. */
548  float confidence;
549  /* Instance mask information for the object. */
550  float *mask;
552  unsigned int mask_width;
554  unsigned int mask_height;
556  unsigned int mask_size;
561 
566 typedef struct
567 {
571  unsigned int numObjects;
573 
578 typedef struct
579 {
585  unsigned int numAttributes;
588  char *label;
590 
594 typedef struct
595 {
597  unsigned int width;
599  unsigned int height;
601  unsigned int classes;
604  int *class_map;
610 
614 typedef struct
615 {
622  union
623  {
633  };
635 
640 typedef struct
641 {
645  unsigned int numFrames;
646 
652 
655  void **hostBuffers;
657  unsigned int numHostBuffers;
658 
660  void* priv;
662 
664 typedef struct INvDsInferContext * NvDsInferContextHandle;
665 
683  unsigned int uniqueID, NvDsInferLogLevel logLevel, const char* logMessage,
684  void* userCtx);
685 
686 #ifdef __cplusplus
687 extern "C" {
688 #endif
689 
696 
709  const char *key, const char *value);
710 
718  const char *key);
719 
727  const char *key);
728 
734 
741  void *builderConfig);
742 
751 _DS_DEPRECATED_("NvDsInferContext_GetStatusName is deprecated. Use NvDsInferStatus2Str instead")
752 const char * NvDsInferContext_GetStatusName (NvDsInferStatus status);
753 
754 
755 #ifdef __cplusplus
756 }
757 #endif
758 
766 #ifdef __cplusplus
767 
768 #include <string>
769 #include <vector>
770 
774 struct INvDsInferContext
775 {
776 public:
793  virtual NvDsInferStatus queueInputBatch(NvDsInferContextBatchInput &batchInput) = 0;
794 
806  virtual NvDsInferStatus dequeueOutputBatch(NvDsInferContextBatchOutput &batchOutput) = 0;
807 
815  virtual void releaseBatchOutput(NvDsInferContextBatchOutput &batchOutput) = 0;
816 
824  virtual void fillLayersInfo(std::vector<NvDsInferLayerInfo> &layersInfo) = 0;
825 
831  virtual void getNetworkInfo(NvDsInferNetworkInfo &networkInfo) = 0;
832 
841  virtual const std::vector< std::vector<std::string> >& getLabels() = 0;
842 
846  virtual void destroy() = 0;
847 
849  virtual ~INvDsInferContext() {}
850 
860  virtual NvDsInferStatus queueInputBatchPreprocessed(NvDsInferContextBatchPreprocessedInput &batchInput) = 0;
861 };
862 
876 NvDsInferStatus createNvDsInferContext(NvDsInferContextHandle *handle,
877  NvDsInferContextInitParams &initParams,
878  void *userCtx = nullptr,
879  NvDsInferContextLoggingFunc logFunc = nullptr);
880 
881 #endif
882 
891 #ifdef __cplusplus
892 extern "C" {
893 #endif
894 
895 
910  NvDsInferContextInitParams *initParams, void *userCtx,
912 
920 
932  NvDsInferContextBatchInput *batchInput);
933 
946  NvDsInferContextBatchOutput *batchOutput);
947 
958  NvDsInferContextBatchOutput *batchOutput);
959 
967  NvDsInferNetworkInfo *networkInfo);
968 
977 
989  NvDsInferLayerInfo *layersInfo);
990 
1002  unsigned int id, unsigned int value);
1003 
1004 #ifdef __cplusplus
1005 }
1006 #endif
1007 
1010 #endif
1011 
NvDsInferObject::confidence
float confidence
Definition: sources/includes/nvdsinfer_context.h:548
_NvDsInferContextInitParams::inputFromPreprocessedTensor
int inputFromPreprocessedTensor
Boolean flag indicating that caller will supply preprocessed tensors for inferencing.
Definition: sources/includes/nvdsinfer_context.h:419
NvDsInferFrameOutput::classificationOutput
NvDsInferClassificationOutput classificationOutput
Holds classifier output.
Definition: sources/includes/nvdsinfer_context.h:629
NvDsInferSegmentationOutput::height
unsigned int height
Holds the height of the output.
Definition: sources/includes/nvdsinfer_context.h:599
NvDsInferContext_Create
NvDsInferStatus NvDsInferContext_Create(NvDsInferContextHandle *handle, NvDsInferContextInitParams *initParams, void *userCtx, NvDsInferContextLoggingFunc logFunc)
Creates a new NvDsInferContext object with specified initialization parameters.
NvDsInferContext_SetDynamicProperty
int NvDsInferContext_SetDynamicProperty(NvDsInferContextInitParams *initParams, const char *key, const char *value)
Dynamic property management functions for extensible TensorRT/trtexec flags.
NvDsInferObject::classIndex
int classIndex
Holds the index for the object's class.
Definition: sources/includes/nvdsinfer_context.h:544
NvDsInferObject::mask_width
unsigned int mask_width
Holds width of mask.
Definition: sources/includes/nvdsinfer_context.h:552
NvDsInferSegmentationOutput::classes
unsigned int classes
Holds the number of classes supported by the network.
Definition: sources/includes/nvdsinfer_context.h:601
_NvDsInferContextInitParams::workspaceSize
unsigned int workspaceSize
Max workspace size (unit MB) that will be used as tensorrt build settings for cuda engine.
Definition: sources/includes/nvdsinfer_context.h:383
NvDsInferTensorOrder
NvDsInferTensorOrder
Defines UFF input layer orders.
Definition: sources/includes/nvdsinfer_context.h:178
_NvDsInferContextInitParams::uffInputOrder
NvDsInferTensorOrder uffInputOrder
Holds the original input order for the UFF model.
Definition: sources/includes/nvdsinfer_context.h:273
NvDsInferNetworkType_Classifier
@ NvDsInferNetworkType_Classifier
Specifies a classifier.
Definition: sources/includes/nvdsinfer_context.h:140
NvDsInferContext_GetNumLayersInfo
unsigned int NvDsInferContext_GetNumLayersInfo(NvDsInferContextHandle handle)
Gets the number of the bound layers of the inference engine in an NvDsInferContext instance.
_NvDsInferContextInitParams::uffFilePath
char uffFilePath[_PATH_MAX]
Holds the pathname of the UFF model file.
Definition: sources/includes/nvdsinfer_context.h:255
NvDsInferClassificationOutput::attributes
NvDsInferAttribute * attributes
Holds a pointer to an array of attributes.
Definition: sources/includes/nvdsinfer_context.h:583
_NvDsInferContextInitParams::customBBoxParseFuncName
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
Definition: sources/includes/nvdsinfer_context.h:346
NvDsInferNetworkMode_INT8
@ NvDsInferNetworkMode_INT8
Definition: sources/includes/nvdsinfer_context.h:125
_NvDsInferContextInitParams::dumpIpTensor
int dumpIpTensor
Boolean flag indicating whether or not to dump raw input tensor data.
Definition: sources/includes/nvdsinfer_context.h:438
NvDsInferFormat
NvDsInferFormat
Defines color formats.
Definition: sources/includes/nvdsinfer_context.h:158
_NvDsInferContextInitParams::netInputOrder
NvDsInferTensorOrder netInputOrder
Holds the original input order for the network.
Definition: sources/includes/nvdsinfer_context.h:278
_NvDsInferContextInitParams::maxGPUMemPer
double maxGPUMemPer
Max gpu memory that can be occupied while expanding the bufferpool.
Definition: sources/includes/nvdsinfer_context.h:434
_NvDsInferContextInitParams::meanImageFilePath
char meanImageFilePath[_PATH_MAX]
Holds the pathname of the mean image file (PPM format).
Definition: sources/includes/nvdsinfer_context.h:300
_NvDsInferContextInitParams::layerDevicePrecisions
char ** layerDevicePrecisions
Can be used to specify the device type and inference precision of layers.
Definition: sources/includes/nvdsinfer_context.h:408
_NvDsInferContextInitParams::maxBatchSize
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch.
Definition: sources/includes/nvdsinfer_context.h:291
NVDSINFER_CLUSTER_GROUP_RECTANGLES
@ NVDSINFER_CLUSTER_GROUP_RECTANGLES
Definition: sources/includes/nvdsinfer_context.h:232
_NvDsInferContextInitParams::dynamicPropertyKeys
char ** dynamicPropertyKeys
Dynamic properties for TensorRT/trtexec flags.
Definition: sources/includes/nvdsinfer_context.h:472
NvDsInferUffOrder_kNHWC
@ NvDsInferUffOrder_kNHWC
Definition: sources/includes/nvdsinfer_context.h:183
_NvDsInferContextInitParams::copyInputToHostBuffers
int copyInputToHostBuffers
Holds a Boolean; true if the input layer contents are to be copied to host memory for access by the a...
Definition: sources/includes/nvdsinfer_context.h:353
NvDsInferDetectionParams::preClusterThreshold
float preClusterThreshold
Definition: sources/includes/nvdsinfer_context.h:200
NvDsInferNetworkMode_FP16
@ NvDsInferNetworkMode_FP16
Definition: sources/includes/nvdsinfer_context.h:126
NVDSINFER_CLUSTER_DBSCAN
@ NVDSINFER_CLUSTER_DBSCAN
Definition: sources/includes/nvdsinfer_context.h:233
_NvDsInferContextInitParams::networkType
NvDsInferNetworkType networkType
Holds the network type.
Definition: sources/includes/nvdsinfer_context.h:315
_NvDsInferContextInitParams::uffDimsCHW
NvDsInferDimsCHW uffDimsCHW
Holds the input dimensions for the UFF model.
Definition: sources/includes/nvdsinfer_context.h:269
NVDSINFER_CLUSTER_NONE
@ NVDSINFER_CLUSTER_NONE
Definition: sources/includes/nvdsinfer_context.h:236
NvDsInferDetectionOutput::numObjects
unsigned int numObjects
Holds the number of objects in objects.
Definition: sources/includes/nvdsinfer_context.h:571
NvDsInferUffOrder_kNC
@ NvDsInferUffOrder_kNC
Definition: sources/includes/nvdsinfer_context.h:184
_NvDsInferContextInitParams::overwriteOpTensor
int overwriteOpTensor
Boolean flag indicating whether or not to overwrite raw ouput tensor data provided by the user into t...
Definition: sources/includes/nvdsinfer_context.h:453
NvDsInferContextBatchPreprocessedInput::returnInputFunc
NvDsInferContextReturnInputAsyncFunc returnInputFunc
Holds a callback for returning the input buffers to the client.
Definition: sources/includes/nvdsinfer_context.h:524
_NvDsInferContextInitParams::gpuID
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
Definition: sources/includes/nvdsinfer_context.h:356
NvDsInferNetworkMode_BEST
@ NvDsInferNetworkMode_BEST
Definition: sources/includes/nvdsinfer_context.h:127
_NvDsInferContextInitParams::labelsFilePath
char labelsFilePath[_PATH_MAX]
Holds the pathname of the labels file containing strings for the class labels.
Definition: sources/includes/nvdsinfer_context.h:296
NvDsInferSegmentationOutput
Holds information parsed from segmentation network output for one frame.
Definition: sources/includes/nvdsinfer_context.h:594
NvDsInferContextBatchInput::returnInputFunc
NvDsInferContextReturnInputAsyncFunc returnInputFunc
Holds a callback for returning the input buffers to the client.
Definition: sources/includes/nvdsinfer_context.h:512
NvDsInferObject::mask_size
unsigned int mask_size
Holds size of mask in bytes.
Definition: sources/includes/nvdsinfer_context.h:556
_NvDsInferContextInitParams::numDetectedClasses
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
Definition: sources/includes/nvdsinfer_context.h:323
NvDsInferContext_GetStatusName
NvDsInferContext_GetStatusName is deprecated Use NvDsInferStatus2Str const instead char * NvDsInferContext_GetStatusName(NvDsInferStatus status)
Gets the string name of the status.
_NvDsInferContextInitParams::disableOutputHostCopy
int disableOutputHostCopy
Boolean flag indicating that whether we will post processing on GPU if this flag enabled,...
Definition: sources/includes/nvdsinfer_context.h:425
NvDsInferContext_ApplyDynamicPropertiesToBuilder
void NvDsInferContext_ApplyDynamicPropertiesToBuilder(const NvDsInferContextInitParams *initParams, void *builderConfig)
Apply dynamic properties to TensorRT builder configuration.
NvDsInferContextBatchPreprocessedInput::numInputTensors
unsigned int numInputTensors
Holds the number of input tensors.
Definition: sources/includes/nvdsinfer_context.h:522
NvDsInferContext_ReleaseBatchOutput
void NvDsInferContext_ReleaseBatchOutput(NvDsInferContextHandle handle, NvDsInferContextBatchOutput *batchOutput)
Frees the memory associated with the batch output and releases the set of host buffers back to the co...
_NvDsInferContextInitParams::outputBufferPoolSize
unsigned int outputBufferPoolSize
Holds the number of sets of output buffers (host and device) to be allocated.
Definition: sources/includes/nvdsinfer_context.h:365
_NvDsInferContextInitParams::dlaCore
int dlaCore
Holds the ID of the DLA core to use.
Definition: sources/includes/nvdsinfer_context.h:361
_NvDsInferContextInitParams::uniqueID
unsigned int uniqueID
Holds a unique identifier for the instance.
Definition: sources/includes/nvdsinfer_context.h:245
NvDsInferLogLevel
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: sources/includes/nvdsinfer.h:257
_NvDsInferContextInitParams::customBBoxInstanceMaskParseFuncName
char customBBoxInstanceMaskParseFuncName[_MAX_STR_LENGTH]
Holds the name of the bounding box and instance mask parse function in the custom library.
Definition: sources/includes/nvdsinfer_context.h:393
_NvDsInferContextInitParams::useDBScan
Use NvDsInferClusterMode instead int useDBScan
Holds a Boolean; true if DBScan is to be used for object clustering, or false if OpenCV groupRectangl...
Definition: sources/includes/nvdsinfer_context.h:320
NvDsInferContextBatchOutput::priv
void * priv
Holds a private context pointer for the set of output buffers.
Definition: sources/includes/nvdsinfer_context.h:660
NvDsInferContextBatchPreprocessedInput::returnFuncData
void * returnFuncData
A pointer to the data to be supplied with the callback in returnInputFunc.
Definition: sources/includes/nvdsinfer_context.h:527
NvDsInferContextBatchInput::numInputFrames
unsigned int numInputFrames
Holds the number of input frames, i.e.
Definition: sources/includes/nvdsinfer_context.h:506
_NvDsInferContextInitParams::networkInputFormat
NvDsInferFormat networkInputFormat
Holds the network input format.
Definition: sources/includes/nvdsinfer_context.h:306
NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID
@ NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID
Definition: sources/includes/nvdsinfer_context.h:235
NvDsInferContextBatchOutput::numFrames
unsigned int numFrames
Holds the number of elements in frames.
Definition: sources/includes/nvdsinfer_context.h:645
_MAX_STR_LENGTH
#define _MAX_STR_LENGTH
Defines the maximum length of string parameters.
Definition: sources/includes/nvdsinfer_context.h:104
NvDsInferClassificationOutput
Holds information on all attributes classifed by a classifier network for one frame.
Definition: sources/includes/nvdsinfer_context.h:578
_NvDsInferContextInitParams::segmentationThreshold
float segmentationThreshold
Definition: sources/includes/nvdsinfer_context.h:333
NvDsInferNetworkType_Detector
@ NvDsInferNetworkType_Detector
Specifies a detector.
Definition: sources/includes/nvdsinfer_context.h:137
_NvDsInferContextInitParams::uffInputBlobName
char uffInputBlobName[_MAX_STR_LENGTH]
Holds the name of the input layer for the UFF model.
Definition: sources/includes/nvdsinfer_context.h:275
NvDsInferNetworkMode
NvDsInferNetworkMode
Defines internal data formats used by the inference engine.
Definition: sources/includes/nvdsinfer_context.h:122
NvDsInferContextBatchInput
Holds information about one batch to be inferred.
Definition: sources/includes/nvdsinfer_context.h:500
NVDSINFER_CLUSTER_NMS
@ NVDSINFER_CLUSTER_NMS
Definition: sources/includes/nvdsinfer_context.h:234
NvDsInferDetectionParams::minBoxes
int minBoxes
Holds the minimum number of boxes in a cluster to be considered an object during grouping using DBSCA...
Definition: sources/includes/nvdsinfer_context.h:212
NvDsInferContextReturnInputAsyncFunc
void(* NvDsInferContextReturnInputAsyncFunc)(void *data)
Defines a callback function type for asynchronously returning the input client buffers to the NvDsInf...
Definition: sources/includes/nvdsinfer_context.h:495
_NvDsInferContextInitParams::customSegmentationParseFuncName
char customSegmentationParseFuncName[_MAX_STR_LENGTH]
Holds the name of segmentation parse function in the custom library.
Definition: sources/includes/nvdsinfer_context.h:403
NvDsInferFormat_RGB
@ NvDsInferFormat_RGB
Specifies 24-bit interleaved R-G-B format.
Definition: sources/includes/nvdsinfer_context.h:161
_NvDsInferContextInitParams::dumpOpTensor
int dumpOpTensor
Boolean flag indicating whether or not to dump raw input tensor data.
Definition: sources/includes/nvdsinfer_context.h:441
NvDsInferClusterMode
NvDsInferClusterMode
Enum for clustering mode for detectors.
Definition: sources/includes/nvdsinfer_context.h:230
_NvDsInferContextInitParams::protoFilePath
char protoFilePath[_PATH_MAX]
Holds the pathname of the prototxt file.
Definition: sources/includes/nvdsinfer_context.h:251
NvDsInferTensorOrder_kNC
@ NvDsInferTensorOrder_kNC
Definition: sources/includes/nvdsinfer_context.h:181
NvDsInferNetworkMode_FP32
@ NvDsInferNetworkMode_FP32
Definition: sources/includes/nvdsinfer_context.h:124
_NvDsInferContextInitParams::outputLayerNames
char ** outputLayerNames
Holds a pointer to an array of pointers to output layer names.
Definition: sources/includes/nvdsinfer_context.h:336
NvDsInferObject::label
char * label
Holds a pointer to a string containing a label for the object.
Definition: sources/includes/nvdsinfer_context.h:546
nvdsinfer.h
NvDsInferContextBatchOutput::outputDeviceBuffers
void ** outputDeviceBuffers
Holds a pointer to an array of pointers to output device buffers for this batch.
Definition: sources/includes/nvdsinfer_context.h:649
NvDsInferContextBatchInput::inputFrames
void ** inputFrames
Holds a pointer to an array of pointers to input frame buffers.
Definition: sources/includes/nvdsinfer_context.h:504
NvDsInferObject::height
float height
Holds the object's height.
Definition: sources/includes/nvdsinfer_context.h:542
NvDsInferContextBatchOutput::frames
NvDsInferFrameOutput * frames
Holds a pointer to an array of outputs for each frame in the batch.
Definition: sources/includes/nvdsinfer_context.h:643
NvDsInferDetectionOutput
Holds information on all objects detected by a detector network in one frame.
Definition: sources/includes/nvdsinfer_context.h:566
NvDsInferSegmentationOutput::width
unsigned int width
Holds the width of the output.
Definition: sources/includes/nvdsinfer_context.h:597
_NvDsInferContextInitParams::numOutputLayers
unsigned int numOutputLayers
Holds the number of output layer names.
Definition: sources/includes/nvdsinfer_context.h:338
_NvDsInferContextInitParams::customLibPath
char customLibPath[_PATH_MAX]
Holds the pathname of the library containing custom methods required to support the network.
Definition: sources/includes/nvdsinfer_context.h:343
NvDsInferFrameOutput::segmentationOutput
NvDsInferSegmentationOutput segmentationOutput
Holds classifier output.
Definition: sources/includes/nvdsinfer_context.h:632
NvDsInferObject::top
float top
Holds the object's offset from the top boundary of the frame.
Definition: sources/includes/nvdsinfer_context.h:538
NvDsInferContextBatchOutput::hostBuffers
void ** hostBuffers
Holds a pointer to an array of pointers to host buffers for this batch.
Definition: sources/includes/nvdsinfer_context.h:655
_NvDsInferContextInitParams::warmupEngine
int warmupEngine
Boolean flag indicating whether to run TensorRT engine warmup during initialization.
Definition: sources/includes/nvdsinfer_context.h:484
NvDsInferNetworkInfo
Holds information about the model network.
Definition: sources/includes/nvdsinfer.h:114
NvDsInferClassificationOutput::numAttributes
unsigned int numAttributes
Holds the size of the attributes array.
Definition: sources/includes/nvdsinfer_context.h:585
_NvDsInferContextInitParams::classifierThreshold
float classifierThreshold
Holds the minimum confidence threshold for the classifier to consider a label valid.
Definition: sources/includes/nvdsinfer_context.h:331
NvDsInferLayerInfo
Holds information about one layer in the model.
Definition: sources/includes/nvdsinfer.h:91
NvDsInferTensorOrder_kNHWC
@ NvDsInferTensorOrder_kNHWC
Definition: sources/includes/nvdsinfer_context.h:180
_NvDsInferContextInitParams::perClassDetectionParams
NvDsInferDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
Definition: sources/includes/nvdsinfer_context.h:327
_NvDsInferContextInitParams::customEngineCreateFuncName
char customEngineCreateFuncName[_MAX_STR_LENGTH]
Name of the custom engine creation function in the custom library.
Definition: sources/includes/nvdsinfer_context.h:373
NvDsInferObject::left
float left
Holds the object's offset from the left boundary of the frame.
Definition: sources/includes/nvdsinfer_context.h:536
NvDsInferDetectionParams::postClusterThreshold
float postClusterThreshold
Hold the bounding box detection threshold to be applied post clustering operation.
Definition: sources/includes/nvdsinfer_context.h:205
NvDsInferObject::mask_height
unsigned int mask_height
Holds height of mask.
Definition: sources/includes/nvdsinfer_context.h:554
NvDsInferContextHandle
struct INvDsInferContext * NvDsInferContextHandle
An opaque pointer type to be used as a handle for a context instance.
Definition: sources/includes/nvdsinfer_context.h:664
_PATH_MAX
#define _PATH_MAX
Maximum length of a file path parameter.
Definition: sources/includes/nvdsinfer_context.h:97
_NvDsInferContextInitParams::offsets
float offsets[_MAX_CHANNELS]
Holds the per-channel offsets for mean subtraction.
Definition: sources/includes/nvdsinfer_context.h:311
_NvDsInferContextInitParams::forceImplicitBatchDimension
int forceImplicitBatchDimension
For model parsers supporting both implicit batch dim and full dims, prefer to use implicit batch dim.
Definition: sources/includes/nvdsinfer_context.h:378
NvDsInferContextBatchInput::inputFormat
NvDsInferFormat inputFormat
Holds the format of the frame contents.
Definition: sources/includes/nvdsinfer_context.h:508
NvDsInferFormat_GRAY
@ NvDsInferFormat_GRAY
Specifies 8-bit Luma format.
Definition: sources/includes/nvdsinfer_context.h:165
NvDsInferDetectionParams::minScore
float minScore
Minimum score in a cluster for the cluster to be considered an object during grouping.
Definition: sources/includes/nvdsinfer_context.h:219
_NvDsInferContextInitParams::tltModelKey
char tltModelKey[_MAX_STR_LENGTH]
Holds the string key for decoding the TLT encoded model.
Definition: sources/includes/nvdsinfer_context.h:281
_NvDsInferContextInitParams::numOutputIOFormats
unsigned int numOutputIOFormats
Holds number of output IO formats specified.
Definition: sources/includes/nvdsinfer_context.h:400
_NvDsInferContextInitParams::numLayerDevicePrecisions
unsigned int numLayerDevicePrecisions
Holds number of layer device precisions specified.
Definition: sources/includes/nvdsinfer_context.h:410
NvDsInferContext_ResetInitParams
void NvDsInferContext_ResetInitParams(NvDsInferContextInitParams *initParams)
Resets a context parameter structure to default values.
NvDsInferTensorOrder_kNCHW
@ NvDsInferTensorOrder_kNCHW
Definition: sources/includes/nvdsinfer_context.h:179
_NvDsInferContextInitParams::autoIncMem
int autoIncMem
Boolean flag indicating that whether we will automatically increase bufferpool size when facing a bot...
Definition: sources/includes/nvdsinfer_context.h:430
NvDsInferSegmentationOutput::class_map
int * class_map
Holds a pointer to an array for the 2D pixel class map.
Definition: sources/includes/nvdsinfer_context.h:604
NvDsInferDimsCHW
Holds the dimensions of a three-dimensional layer.
Definition: sources/includes/nvdsinfer.h:59
_NvDsInferContextInitParams::modelEngineFilePath
char modelEngineFilePath[_PATH_MAX]
Holds the pathname of the serialized model engine file.
Definition: sources/includes/nvdsinfer_context.h:286
NvDsInferFormat_RGBA
@ NvDsInferFormat_RGBA
Specifies 32-bit interleaved R-G-B-A format.
Definition: sources/includes/nvdsinfer_context.h:167
NvDsInferContextBatchInput::inputPitch
unsigned int inputPitch
Holds the pitch of the input frames, in bytes.
Definition: sources/includes/nvdsinfer_context.h:510
_MAX_CHANNELS
#define _MAX_CHANNELS
Defines the maximum number of channels supported by the API for image input layers.
Definition: sources/includes/nvdsinfer_context.h:101
_NvDsInferContextInitParams::overwriteIpTensor
int overwriteIpTensor
Boolean flag indicating whether or not to overwrite raw input tensor data provided by the user into t...
Definition: sources/includes/nvdsinfer_context.h:445
_NvDsInferContextInitParams::dynamicPropertyValues
char ** dynamicPropertyValues
Definition: sources/includes/nvdsinfer_context.h:473
NvDsInferContext_DequeueOutputBatch
NvDsInferStatus NvDsInferContext_DequeueOutputBatch(NvDsInferContextHandle handle, NvDsInferContextBatchOutput *batchOutput)
Dequeues output for a batch of frames.
NvDsInferContext_Destroy
void NvDsInferContext_Destroy(NvDsInferContextHandle handle)
Destroys an NvDsInferContext instance and releases its resources.
_NvDsInferContextInitParams::customClassifierParseFuncName
char customClassifierParseFuncName[_MAX_STR_LENGTH]
Name of the custom classifier attribute parsing function in the custom library.
Definition: sources/includes/nvdsinfer_context.h:349
_NvDsInferContextInitParams::modelFilePath
char modelFilePath[_PATH_MAX]
Holds the pathname of the caffemodel file.
Definition: sources/includes/nvdsinfer_context.h:253
_DS_DEPRECATED_
#define _DS_DEPRECATED_(STR)
Definition: sources/includes/gst-nvdssr.h:29
NvDsInferContext_QueueInputBatch
NvDsInferStatus NvDsInferContext_QueueInputBatch(NvDsInferContextHandle handle, NvDsInferContextBatchInput *batchInput)
Queues a batch of input frames for preprocessing and inferencing.
_NvDsInferContextInitParams::segmentationOutputOrder
NvDsInferTensorOrder segmentationOutputOrder
Holds output order for segmentation network.
Definition: sources/includes/nvdsinfer_context.h:413
NvDsInferNetworkType_InstanceSegmentation
@ NvDsInferNetworkType_InstanceSegmentation
Specifies a instance segmentation network.
Definition: sources/includes/nvdsinfer_context.h:147
_NvDsInferContextInitParams
Holds the initialization parameters required for the NvDsInferContext interface.
Definition: sources/includes/nvdsinfer_context.h:241
NvDsInferContextBatchOutput::numOutputDeviceBuffers
unsigned int numOutputDeviceBuffers
Holds the number of elements in *outputDeviceBuffers.
Definition: sources/includes/nvdsinfer_context.h:651
NvDsInferFormat_Unknown
@ NvDsInferFormat_Unknown
Definition: sources/includes/nvdsinfer_context.h:172
NvDsInferFrameOutput::outputType
NvDsInferNetworkType outputType
Holds an output type indicating the valid member in the union of detectionOutput, classificationOutpu...
Definition: sources/includes/nvdsinfer_context.h:619
_NvDsInferContextInitParams::outputIOFormats
char ** outputIOFormats
Can be used to specify the format and datatype for bound output layers.
Definition: sources/includes/nvdsinfer_context.h:398
NvDsInferUffOrder_kNCHW
@ NvDsInferUffOrder_kNCHW
Definition: sources/includes/nvdsinfer_context.h:182
NvDsInferObject::mask
float * mask
Definition: sources/includes/nvdsinfer_context.h:550
NvDsInferContext_GetNetworkInfo
void NvDsInferContext_GetNetworkInfo(NvDsInferContextHandle handle, NvDsInferNetworkInfo *networkInfo)
Gets network input information.
NvDsInferClassificationOutput::label
char * label
Holds a pointer to a string containing a label for the classified output.
Definition: sources/includes/nvdsinfer_context.h:588
NvDsInferDetectionParams::nmsIOUThreshold
float nmsIOUThreshold
IOU threshold to be used with NMS mode of clustering.
Definition: sources/includes/nvdsinfer_context.h:221
NvDsInferContextBatchInput::returnFuncData
void * returnFuncData
A pointer to the data to be supplied with the callback in returnInputFunc.
Definition: sources/includes/nvdsinfer_context.h:515
_NvDsInferContextInitParams::numDynamicProperties
unsigned int numDynamicProperties
Definition: sources/includes/nvdsinfer_context.h:474
_NvDsInferContextInitParams::networkScaleFactor
float networkScaleFactor
Holds the normalization factor with which to scale the input pixels.
Definition: sources/includes/nvdsinfer_context.h:303
_NvDsInferContextInitParams::opTensorFilePath
char ** opTensorFilePath
List of paths to the raw output tensor data that are going to be used to overwrite the different outp...
Definition: sources/includes/nvdsinfer_context.h:457
_NvDsInferContextInitParams::useDLA
int useDLA
Holds a Boolean; true if DLA is to be used.
Definition: sources/includes/nvdsinfer_context.h:359
NvDsInferContextBatchPreprocessedInput::tensors
NvDsInferLayerInfo * tensors
Definition: sources/includes/nvdsinfer_context.h:520
NvDsInferFormat_Tensor
@ NvDsInferFormat_Tensor
NCHW planar.
Definition: sources/includes/nvdsinfer_context.h:171
NvDsInferContextLoggingFunc
void(* NvDsInferContextLoggingFunc)(NvDsInferContextHandle handle, unsigned int uniqueID, NvDsInferLogLevel logLevel, const char *logMessage, void *userCtx)
Type declaration for a logging callback.
Definition: sources/includes/nvdsinfer_context.h:682
NvDsInferNetworkType_Segmentation
@ NvDsInferNetworkType_Segmentation
Specifies a segmentation network.
Definition: sources/includes/nvdsinfer_context.h:143
NvDsInferObject::rotation_angle
float rotation_angle
Holds the rotation angle in radians for oriented bounding boxes (OBB).
Definition: sources/includes/nvdsinfer_context.h:559
NvDsInferContext_FillLayersInfo
void NvDsInferContext_FillLayersInfo(NvDsInferContextHandle handle, NvDsInferLayerInfo *layersInfo)
Fills an input vector with information about all of the bound layers of the inference engine in an Nv...
_NvDsInferContextInitParams::int8CalibrationFilePath
char int8CalibrationFilePath[_PATH_MAX]
Holds the pathname of the INT8 calibration file.
Definition: sources/includes/nvdsinfer_context.h:263
_NvDsInferContextInitParams::onnxFilePath
char onnxFilePath[_PATH_MAX]
Holds the pathname of the ONNX model file.
Definition: sources/includes/nvdsinfer_context.h:257
NvDsInferDetectionParams
Holds detection and bounding box grouping parameters.
Definition: sources/includes/nvdsinfer_context.h:194
_NvDsInferContextInitParams::useStronglyTyped
int useStronglyTyped
Boolean flag indicating whether to enable strongly typed network mode.
Definition: sources/includes/nvdsinfer_context.h:464
NvDsInferFrameOutput
Holds the information inferred by the network on one frame.
Definition: sources/includes/nvdsinfer_context.h:614
NvDsInferDetectionParams::groupThreshold
int groupThreshold
Holds the minimum number boxes in a cluster to be considered an object during grouping using OpenCV g...
Definition: sources/includes/nvdsinfer_context.h:215
NvDsInferNetworkType
NvDsInferNetworkType
Defines network types.
Definition: sources/includes/nvdsinfer_context.h:133
NvDsInferObject::width
float width
Holds the object's width.
Definition: sources/includes/nvdsinfer_context.h:540
NvDsInferFormat_BGR
@ NvDsInferFormat_BGR
Specifies 24-bit interleaved B-G-R format.
Definition: sources/includes/nvdsinfer_context.h:163
NvDsInferContextBatchPreprocessedInput
Definition: sources/includes/nvdsinfer_context.h:518
NvDsInferContext_GetDynamicProperty
const char * NvDsInferContext_GetDynamicProperty(const NvDsInferContextInitParams *initParams, const char *key)
Get a dynamic property value.
_NvDsInferContextInitParams::inputDims
NvDsInferDimsCHW inputDims
Holds the input dimensions for the model.
Definition: sources/includes/nvdsinfer_context.h:267
NvDsInferContextBatchOutput
Holds the output for all of the frames in a batch (an array of frame), and related buffer information...
Definition: sources/includes/nvdsinfer_context.h:640
_NvDsInferContextInitParams::inferInputDims
NvDsInferDimsCHW inferInputDims
Inference input dimensions for runtime engine.
Definition: sources/includes/nvdsinfer_context.h:386
NvDsInferNetworkType_Other
@ NvDsInferNetworkType_Other
Specifies other.
Definition: sources/includes/nvdsinfer_context.h:152
NvDsInferObject
Holds information about one detected object.
Definition: sources/includes/nvdsinfer_context.h:533
NvDsInferFrameOutput::detectionOutput
NvDsInferDetectionOutput detectionOutput
Holds detector output.
Definition: sources/includes/nvdsinfer_context.h:626
NvDsInferDetectionOutput::objects
NvDsInferObject * objects
Holds a pointer to an array of objects.
Definition: sources/includes/nvdsinfer_context.h:569
_NvDsInferContextInitParams::numOffsets
unsigned int numOffsets
Definition: sources/includes/nvdsinfer_context.h:312
NvDsInferAttribute
Holds information about one classified attribute.
Definition: sources/includes/nvdsinfer.h:207
NvDsInferDetectionParams::eps
float eps
Holds the epsilon to control merging of overlapping boxes.
Definition: sources/includes/nvdsinfer_context.h:209
_NvDsInferContextInitParams::ipTensorFilePath
char ipTensorFilePath[_PATH_MAX]
Path to the raw input tensor data that is going to be used to overwrite the buffer.
Definition: sources/includes/nvdsinfer_context.h:449
_NvDsInferContextInitParams::tltEncodedModelFilePath
char tltEncodedModelFilePath[_PATH_MAX]
Holds the pathname of the TLT encoded model file.
Definition: sources/includes/nvdsinfer_context.h:259
_NvDsInferContextInitParams::customNetworkConfigFilePath
char customNetworkConfigFilePath[_PATH_MAX]
Holds the pathname of the configuration file for custom network creation.
Definition: sources/includes/nvdsinfer_context.h:370
NvDsInferDetectionParams::topK
int topK
Number of objects with objects to be filtered in the decensding order of probability.
Definition: sources/includes/nvdsinfer_context.h:224
_NvDsInferContextInitParams::networkMode
NvDsInferNetworkMode networkMode
Holds an internal data format specifier used by the inference engine.
Definition: sources/includes/nvdsinfer_context.h:248
NvDsInferContext_GetLabel
const char * NvDsInferContext_GetLabel(NvDsInferContextHandle handle, unsigned int id, unsigned int value)
Gets the string label associated with the class ID for detectors and the attribute ID and attribute v...
NvDsInferSegmentationOutput::class_probability_map
float * class_probability_map
Holds a pointer to an array containing raw probabilities.
Definition: sources/includes/nvdsinfer_context.h:608
NvDsInferFormat_BGRx
@ NvDsInferFormat_BGRx
Specifies 32-bit interleaved B-G-R-x format.
Definition: sources/includes/nvdsinfer_context.h:169
NvDsInferContext_HasDynamicProperty
int NvDsInferContext_HasDynamicProperty(const NvDsInferContextInitParams *initParams, const char *key)
Check if a dynamic property exists.
NvDsInferContextBatchOutput::numHostBuffers
unsigned int numHostBuffers
Holds the number of elements in hostBuffers.
Definition: sources/includes/nvdsinfer_context.h:657
_NvDsInferContextInitParams::clusterMode
NvDsInferClusterMode clusterMode
Holds the type of clustering mode.
Definition: sources/includes/nvdsinfer_context.h:389
NvDsInferContext_ClearDynamicProperties
void NvDsInferContext_ClearDynamicProperties(NvDsInferContextInitParams *initParams)
Clear all dynamic properties.
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: sources/includes/nvdsinfer.h:226