NVIDIA DeepStream SDK API Reference

7.0 Release
nvdsinfer_context.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2024 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 
120 typedef enum
121 {
127 
131 typedef enum
132 {
152 
156 typedef enum
157 {
172 
176 typedef enum {
180  NvDsInferUffOrder_kNCHW _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNCHW instead") = NvDsInferTensorOrder_kNCHW,
181  NvDsInferUffOrder_kNHWC _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNCWH instead") = NvDsInferTensorOrder_kNHWC,
182  NvDsInferUffOrder_kNC _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNC instead") = NvDsInferTensorOrder_kNC
184 
185 #define NvDsInferUffOrder _Pragma \
186  ("GCC warning \"'NvDsInferUffOrder' macro is deprecated. Use NvDsInferTensorOrder instead.\"") \
187  NvDsInferTensorOrder
188 
192 typedef struct
193 {
196  union {
197  float threshold _DS_DEPRECATED_("Use preclusterThreshold instead.");
199  };
200 
204 
207  float eps;
210  int minBoxes;
217  float minScore;
222  int topK;
224 
228 typedef enum
229 {
240 {
243  unsigned int uniqueID;
244 
247 
258 
262 
263  union {
268  } _DS_DEPRECATED_("Use inferInputDims instead.");
269 
274 
277 
280 
285 
289  unsigned int maxBatchSize;
290 
295 
299 
302 
305 
310  unsigned int numOffsets;
311 
314 
317  _DS_DEPRECATED_("Use NvDsInferClusterMode instead")
319 
321  unsigned int numDetectedClasses;
322 
326 
330 
332 
336  unsigned int numOutputLayers;
337 
338 
348 
352 
354  unsigned int gpuID;
355 
357  int useDLA;
359  int dlaCore;
360 
363  unsigned int outputBufferPoolSize;
364 
369 
372 
377 
381  unsigned int workspaceSize;
382 
385 
388 
392 
398  unsigned int numOutputIOFormats;
399 
406 
409 
415 
421 
426 
429  double maxGPUMemPer;
430 
453 
455 
463 typedef void (* NvDsInferContextReturnInputAsyncFunc) (void *data);
464 
468 typedef struct
469 {
472  void** inputFrames;
474  unsigned int numInputFrames;
478  unsigned int inputPitch;
485 
486 typedef struct
487 {
490  unsigned int numInputTensors;
497 
501 typedef struct
502 {
504  float left;
506  float top;
508  float width;
510  float height;
512  int classIndex;
514  char *label;
515  /* confidence score of the detected object. */
516  float confidence;
517  /* Instance mask information for the object. */
518  float *mask;
520  unsigned int mask_width;
522  unsigned int mask_height;
524  unsigned int mask_size;
526 
531 typedef struct
532 {
534  NvDsInferObject *objects;
536  unsigned int numObjects;
538 
543 typedef struct
544 {
550  unsigned int numAttributes;
553  char *label;
555 
559 typedef struct
560 {
562  unsigned int width;
564  unsigned int height;
566  unsigned int classes;
569  int *class_map;
573  float *class_probability_map;
575 
579 typedef struct
580 {
587  union
588  {
598  };
600 
605 typedef struct
606 {
610  unsigned int numFrames;
611 
617 
620  void **hostBuffers;
622  unsigned int numHostBuffers;
623 
625  void* priv;
627 
629 typedef struct INvDsInferContext * NvDsInferContextHandle;
630 
648  unsigned int uniqueID, NvDsInferLogLevel logLevel, const char* logMessage,
649  void* userCtx);
650 
651 #ifdef __cplusplus
652 extern "C" {
653 #endif
654 
661 
670 _DS_DEPRECATED_("NvDsInferContext_GetStatusName is deprecated. Use NvDsInferStatus2Str instead")
671 const char * NvDsInferContext_GetStatusName (NvDsInferStatus status);
672 
673 
674 #ifdef __cplusplus
675 }
676 #endif
677 
685 #ifdef __cplusplus
686 
687 #include <string>
688 #include <vector>
689 
693 struct INvDsInferContext
694 {
695 public:
712  virtual NvDsInferStatus queueInputBatch(NvDsInferContextBatchInput &batchInput) = 0;
713 
725  virtual NvDsInferStatus dequeueOutputBatch(NvDsInferContextBatchOutput &batchOutput) = 0;
726 
734  virtual void releaseBatchOutput(NvDsInferContextBatchOutput &batchOutput) = 0;
735 
743  virtual void fillLayersInfo(std::vector<NvDsInferLayerInfo> &layersInfo) = 0;
744 
750  virtual void getNetworkInfo(NvDsInferNetworkInfo &networkInfo) = 0;
751 
760  virtual const std::vector< std::vector<std::string> >& getLabels() = 0;
761 
765  virtual void destroy() = 0;
766 
768  virtual ~INvDsInferContext() {}
769 
779  virtual NvDsInferStatus queueInputBatchPreprocessed(NvDsInferContextBatchPreprocessedInput &batchInput) = 0;
780 };
781 
795 NvDsInferStatus createNvDsInferContext(NvDsInferContextHandle *handle,
796  NvDsInferContextInitParams &initParams,
797  void *userCtx = nullptr,
798  NvDsInferContextLoggingFunc logFunc = nullptr);
799 
800 #endif
801 
810 #ifdef __cplusplus
811 extern "C" {
812 #endif
813 
814 
829  NvDsInferContextInitParams *initParams, void *userCtx,
831 
839 
851  NvDsInferContextBatchInput *batchInput);
852 
865  NvDsInferContextBatchOutput *batchOutput);
866 
877  NvDsInferContextBatchOutput *batchOutput);
878 
886  NvDsInferNetworkInfo *networkInfo);
887 
896 
908  NvDsInferLayerInfo *layersInfo);
909 
921  unsigned int id, unsigned int value);
922 
923 #ifdef __cplusplus
924 }
925 #endif
926 
929 #endif
930 
_NvDsInferContextInitParams::inputFromPreprocessedTensor
int inputFromPreprocessedTensor
Boolean flag indicating that caller will supply preprocessed tensors for inferencing.
Definition: nvdsinfer_context.h:414
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...
NvDsInferFrameOutput::classificationOutput
NvDsInferClassificationOutput classificationOutput
Holds classifier output.
Definition: nvdsinfer_context.h:594
NvDsInferContext_Create
NvDsInferStatus NvDsInferContext_Create(NvDsInferContextHandle *handle, NvDsInferContextInitParams *initParams, void *userCtx, NvDsInferContextLoggingFunc logFunc)
Creates a new NvDsInferContext object with specified initialization parameters.
_NvDsInferContextInitParams::customClassifierParseFuncName
char customClassifierParseFuncName[_MAX_STR_LENGTH]
Name of the custom classifier attribute parsing function in the custom library.
Definition: nvdsinfer_context.h:347
NvDsInferObject::mask_width
unsigned int mask_width
Holds width of mask.
Definition: nvdsinfer_context.h:520
_NvDsInferContextInitParams::workspaceSize
unsigned int workspaceSize
Max workspace size (unit MB) that will be used as tensorrt build settings for cuda engine.
Definition: nvdsinfer_context.h:381
NvDsInferTensorOrder
NvDsInferTensorOrder
Defines UFF input layer orders.
Definition: nvdsinfer_context.h:176
_NvDsInferContextInitParams::customBBoxInstanceMaskParseFuncName
char customBBoxInstanceMaskParseFuncName[_MAX_STR_LENGTH]
Holds the name of the bounding box and instance mask parse function in the custom library.
Definition: nvdsinfer_context.h:391
_NvDsInferContextInitParams::uffInputOrder
NvDsInferTensorOrder uffInputOrder
Holds the original input order for the UFF model.
Definition: nvdsinfer_context.h:271
NvDsInferNetworkType_Classifier
@ NvDsInferNetworkType_Classifier
Specifies a classifier.
Definition: nvdsinfer_context.h:138
_NvDsInferContextInitParams::perClassDetectionParams
NvDsInferDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
Definition: nvdsinfer_context.h:325
NvDsInferContext_GetNumLayersInfo
unsigned int NvDsInferContext_GetNumLayersInfo(NvDsInferContextHandle handle)
Gets the number of the bound layers of the inference engine in an NvDsInferContext instance.
NvDsInferNetworkMode_INT8
@ NvDsInferNetworkMode_INT8
Definition: nvdsinfer_context.h:123
_NvDsInferContextInitParams::dumpIpTensor
int dumpIpTensor
Boolean flag indicating whether or not to dump raw input tensor data.
Definition: nvdsinfer_context.h:433
NvDsInferFormat
NvDsInferFormat
Defines color formats.
Definition: nvdsinfer_context.h:156
_NvDsInferContextInitParams::protoFilePath
char protoFilePath[_PATH_MAX]
Holds the pathname of the prototxt file.
Definition: nvdsinfer_context.h:249
_NvDsInferContextInitParams::netInputOrder
NvDsInferTensorOrder netInputOrder
Holds the original input order for the network.
Definition: nvdsinfer_context.h:276
_NvDsInferContextInitParams::maxGPUMemPer
double maxGPUMemPer
Max gpu memory that can be occupied while expanding the bufferpool.
Definition: nvdsinfer_context.h:429
_NvDsInferContextInitParams::maxBatchSize
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch.
Definition: nvdsinfer_context.h:289
NVDSINFER_CLUSTER_GROUP_RECTANGLES
@ NVDSINFER_CLUSTER_GROUP_RECTANGLES
Definition: nvdsinfer_context.h:230
_NvDsInferContextInitParams::customEngineCreateFuncName
char customEngineCreateFuncName[_MAX_STR_LENGTH]
Name of the custom engine creation function in the custom library.
Definition: nvdsinfer_context.h:371
_NvDsInferContextInitParams::layerDevicePrecisions
char ** layerDevicePrecisions
Can be used to specify the device type and inference precision of layers.
Definition: nvdsinfer_context.h:403
NvDsInferUffOrder_kNHWC
@ NvDsInferUffOrder_kNHWC
Definition: nvdsinfer_context.h:181
_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: nvdsinfer_context.h:351
NvDsInferDetectionParams::preClusterThreshold
float preClusterThreshold
Definition: nvdsinfer_context.h:198
NvDsInferNetworkMode_FP16
@ NvDsInferNetworkMode_FP16
Definition: nvdsinfer_context.h:124
NVDSINFER_CLUSTER_DBSCAN
@ NVDSINFER_CLUSTER_DBSCAN
Definition: nvdsinfer_context.h:231
_NvDsInferContextInitParams::networkType
NvDsInferNetworkType networkType
Holds the network type.
Definition: nvdsinfer_context.h:313
_NvDsInferContextInitParams::uffDimsCHW
NvDsInferDimsCHW uffDimsCHW
Holds the input dimensions for the UFF model.
Definition: nvdsinfer_context.h:267
NVDSINFER_CLUSTER_NONE
@ NVDSINFER_CLUSTER_NONE
Definition: nvdsinfer_context.h:234
_NvDsInferContextInitParams::int8CalibrationFilePath
char int8CalibrationFilePath[_PATH_MAX]
Holds the pathname of the INT8 calibration file.
Definition: nvdsinfer_context.h:261
NvDsInferUffOrder_kNC
@ NvDsInferUffOrder_kNC
Definition: nvdsinfer_context.h:182
_NvDsInferContextInitParams::overwriteOpTensor
int overwriteOpTensor
Boolean flag indicating whether or not to overwrite raw ouput tensor data provided by the user into t...
Definition: nvdsinfer_context.h:448
NvDsInferContextBatchPreprocessedInput::returnInputFunc
NvDsInferContextReturnInputAsyncFunc returnInputFunc
Holds a callback for returning the input buffers to the client.
Definition: nvdsinfer_context.h:492
_NvDsInferContextInitParams::gpuID
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
Definition: nvdsinfer_context.h:354
NvDsInferNetworkMode_BEST
@ NvDsInferNetworkMode_BEST
Definition: nvdsinfer_context.h:125
NvDsInferContextBatchOutput::hostBuffers
void ** hostBuffers
Holds a pointer to an array of pointers to host buffers for this batch.
Definition: nvdsinfer_context.h:620
NvDsInferSegmentationOutput
Holds the information parsed from segmentation network output for one frame.
Definition: infer_post_datatypes.h:75
NvDsInferContextBatchInput::returnInputFunc
NvDsInferContextReturnInputAsyncFunc returnInputFunc
Holds a callback for returning the input buffers to the client.
Definition: nvdsinfer_context.h:480
NvDsInferObject::mask_size
unsigned int mask_size
Holds size of mask in bytes.
Definition: nvdsinfer_context.h:524
_NvDsInferContextInitParams::numDetectedClasses
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
Definition: nvdsinfer_context.h:321
_NvDsInferContextInitParams::disableOutputHostCopy
int disableOutputHostCopy
Boolean flag indicating that whether we will post processing on GPU if this flag enabled,...
Definition: nvdsinfer_context.h:420
NvDsInferContextBatchPreprocessedInput::numInputTensors
unsigned int numInputTensors
Holds the number of input tensors.
Definition: nvdsinfer_context.h:490
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...
NvDsInferContextBatchOutput::frames
NvDsInferFrameOutput * frames
Holds a pointer to an array of outputs for each frame in the batch.
Definition: nvdsinfer_context.h:608
_NvDsInferContextInitParams::outputBufferPoolSize
unsigned int outputBufferPoolSize
Holds the number of sets of output buffers (host and device) to be allocated.
Definition: nvdsinfer_context.h:363
_NvDsInferContextInitParams::meanImageFilePath
char meanImageFilePath[_PATH_MAX]
Holds the pathname of the mean image file (PPM format).
Definition: nvdsinfer_context.h:298
_NvDsInferContextInitParams::dlaCore
int dlaCore
Holds the ID of the DLA core to use.
Definition: nvdsinfer_context.h:359
_NvDsInferContextInitParams::uniqueID
unsigned int uniqueID
Holds a unique identifier for the instance.
Definition: nvdsinfer_context.h:243
NvDsInferLogLevel
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: nvdsinfer.h:249
_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: nvdsinfer_context.h:318
NvDsInferContextBatchOutput::outputDeviceBuffers
void ** outputDeviceBuffers
Holds a pointer to an array of pointers to output device buffers for this batch.
Definition: nvdsinfer_context.h:614
NvDsInferContextBatchInput::numInputFrames
unsigned int numInputFrames
Holds the number of input frames, i.e.
Definition: nvdsinfer_context.h:474
_NvDsInferContextInitParams::networkInputFormat
NvDsInferFormat networkInputFormat
Holds the network input format.
Definition: nvdsinfer_context.h:304
NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID
@ NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID
Definition: nvdsinfer_context.h:233
NvDsInferContextBatchOutput::numFrames
unsigned int numFrames
Holds the number of elements in frames.
Definition: nvdsinfer_context.h:610
_NvDsInferContextInitParams::offsets
float offsets[_MAX_CHANNELS]
Holds the per-channel offsets for mean subtraction.
Definition: nvdsinfer_context.h:309
_MAX_STR_LENGTH
#define _MAX_STR_LENGTH
Defines the maximum length of string parameters.
Definition: nvdsinfer_context.h:104
NvDsInferClassificationOutput
Holds information on all attributes classifed by a classifier network for one frame.
Definition: nvdsinfer_context.h:543
_NvDsInferContextInitParams::segmentationThreshold
float segmentationThreshold
Definition: nvdsinfer_context.h:331
_NvDsInferContextInitParams::tltEncodedModelFilePath
char tltEncodedModelFilePath[_PATH_MAX]
Holds the pathname of the TLT encoded model file.
Definition: nvdsinfer_context.h:257
NvDsInferNetworkType_Detector
@ NvDsInferNetworkType_Detector
Specifies a detector.
Definition: nvdsinfer_context.h:135
_NvDsInferContextInitParams::outputLayerNames
char ** outputLayerNames
Holds a pointer to an array of pointers to output layer names.
Definition: nvdsinfer_context.h:334
NvDsInferNetworkMode
NvDsInferNetworkMode
Defines internal data formats used by the inference engine.
Definition: nvdsinfer_context.h:120
NvDsInferContextBatchInput
Holds information about one batch to be inferred.
Definition: nvdsinfer_context.h:468
NVDSINFER_CLUSTER_NMS
@ NVDSINFER_CLUSTER_NMS
Definition: nvdsinfer_context.h:232
NvDsInferDetectionParams::minBoxes
int minBoxes
Holds the minimum number of boxes in a cluster to be considered an object during grouping using DBSCA...
Definition: nvdsinfer_context.h:210
NvDsInferContextReturnInputAsyncFunc
void(* NvDsInferContextReturnInputAsyncFunc)(void *data)
Defines a callback function type for asynchronously returning the input client buffers to the NvDsInf...
Definition: nvdsinfer_context.h:463
NvDsInferContextBatchPreprocessedInput::tensors
NvDsInferLayerInfo * tensors
Definition: nvdsinfer_context.h:488
_NvDsInferContextInitParams::ipTensorFilePath
char ipTensorFilePath[_PATH_MAX]
Path to the raw input tensor data that is going to be used to overwrite the buffer.
Definition: nvdsinfer_context.h:444
NvDsInferFormat_RGB
@ NvDsInferFormat_RGB
Specifies 24-bit interleaved R-G-B format.
Definition: nvdsinfer_context.h:159
_NvDsInferContextInitParams::dumpOpTensor
int dumpOpTensor
Boolean flag indicating whether or not to dump raw input tensor data.
Definition: nvdsinfer_context.h:436
NvDsInferClusterMode
NvDsInferClusterMode
Enum for clustering mode for detectors.
Definition: nvdsinfer_context.h:228
NvDsInferTensorOrder_kNC
@ NvDsInferTensorOrder_kNC
Definition: nvdsinfer_context.h:179
NvDsInferNetworkMode_FP32
@ NvDsInferNetworkMode_FP32
Definition: nvdsinfer_context.h:122
_NvDsInferContextInitParams::onnxFilePath
char onnxFilePath[_PATH_MAX]
Holds the pathname of the ONNX model file.
Definition: nvdsinfer_context.h:255
NvDsInferDetectionOutput
Holds the information on all objects detected by a detector network in one frame.
Definition: infer_post_datatypes.h:43
_NvDsInferContextInitParams::numOutputLayers
unsigned int numOutputLayers
Holds the number of output layer names.
Definition: nvdsinfer_context.h:336
NvDsInferFrameOutput::segmentationOutput
NvDsInferSegmentationOutput segmentationOutput
Holds classifier output.
Definition: nvdsinfer_context.h:597
_NvDsInferContextInitParams::customNetworkConfigFilePath
char customNetworkConfigFilePath[_PATH_MAX]
Holds the pathname of the configuration file for custom network creation.
Definition: nvdsinfer_context.h:368
NvDsInferNetworkInfo
Holds information about the model network.
Definition: nvdsinfer.h:110
NvDsInferClassificationOutput::numAttributes
unsigned int numAttributes
Holds the size of the attributes array.
Definition: nvdsinfer_context.h:550
_NvDsInferContextInitParams::labelsFilePath
char labelsFilePath[_PATH_MAX]
Holds the pathname of the labels file containing strings for the class labels.
Definition: nvdsinfer_context.h:294
_NvDsInferContextInitParams::classifierThreshold
float classifierThreshold
Holds the minimum confidence threshold for the classifier to consider a label valid.
Definition: nvdsinfer_context.h:329
NvDsInferLayerInfo
Holds information about one layer in the model.
Definition: nvdsinfer.h:87
NvDsInferTensorOrder_kNHWC
@ NvDsInferTensorOrder_kNHWC
Definition: nvdsinfer_context.h:178
NvDsInferDetectionParams::postClusterThreshold
float postClusterThreshold
Hold the bounding box detection threshold to be applied post clustering operation.
Definition: nvdsinfer_context.h:203
NvDsInferObject::mask_height
unsigned int mask_height
Holds height of mask.
Definition: nvdsinfer_context.h:522
NvDsInferContextHandle
struct INvDsInferContext * NvDsInferContextHandle
An opaque pointer type to be used as a handle for a context instance.
Definition: nvdsinfer_context.h:629
_PATH_MAX
#define _PATH_MAX
Maximum length of a file path parameter.
Definition: nvdsinfer_context.h:97
_NvDsInferContextInitParams::forceImplicitBatchDimension
int forceImplicitBatchDimension
For model parsers supporting both implicit batch dim and full dims, prefer to use implicit batch dim.
Definition: nvdsinfer_context.h:376
NvDsInferContextBatchInput::inputFormat
NvDsInferFormat inputFormat
Holds the format of the frame contents.
Definition: nvdsinfer_context.h:476
NvDsInferFormat_GRAY
@ NvDsInferFormat_GRAY
Specifies 8-bit Luma format.
Definition: nvdsinfer_context.h:163
NvDsInferDetectionParams::minScore
float minScore
Minimum score in a cluster for the cluster to be considered an object during grouping.
Definition: nvdsinfer_context.h:217
_NvDsInferContextInitParams::numOutputIOFormats
unsigned int numOutputIOFormats
Holds number of output IO formats specified.
Definition: nvdsinfer_context.h:398
NvDsInferContext_GetStatusName
NvDsInferContext_GetStatusName is deprecated Use NvDsInferStatus2Str const instead char * NvDsInferContext_GetStatusName(NvDsInferStatus status)
Gets the string name of the status.
_NvDsInferContextInitParams::numLayerDevicePrecisions
unsigned int numLayerDevicePrecisions
Holds number of layer device precisions specified.
Definition: nvdsinfer_context.h:405
NvDsInferContext_ResetInitParams
void NvDsInferContext_ResetInitParams(NvDsInferContextInitParams *initParams)
Resets a context parameter structure to default values.
_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: nvdsinfer_context.h:452
NvDsInferTensorOrder_kNCHW
@ NvDsInferTensorOrder_kNCHW
Definition: nvdsinfer_context.h:177
_NvDsInferContextInitParams::customBBoxParseFuncName
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
Definition: nvdsinfer_context.h:344
_NvDsInferContextInitParams::autoIncMem
int autoIncMem
Boolean flag indicating that whether we will automatically increase bufferpool size when facing a bot...
Definition: nvdsinfer_context.h:425
NvDsInferDimsCHW
Holds the dimensions of a three-dimensional layer.
Definition: nvdsinfer.h:59
NvDsInferFormat_RGBA
@ NvDsInferFormat_RGBA
Specifies 32-bit interleaved R-G-B-A format.
Definition: nvdsinfer_context.h:165
NvDsInferContextBatchInput::inputPitch
unsigned int inputPitch
Holds the pitch of the input frames, in bytes.
Definition: nvdsinfer_context.h:478
_MAX_CHANNELS
#define _MAX_CHANNELS
Defines the maximum number of channels supported by the API for image input layers.
Definition: 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: nvdsinfer_context.h:440
NvDsInferContext_DequeueOutputBatch
NvDsInferStatus NvDsInferContext_DequeueOutputBatch(NvDsInferContextHandle handle, NvDsInferContextBatchOutput *batchOutput)
Dequeues output for a batch of frames.
_NvDsInferContextInitParams::customLibPath
char customLibPath[_PATH_MAX]
Holds the pathname of the library containing custom methods required to support the network.
Definition: nvdsinfer_context.h:341
NvDsInferContext_Destroy
void NvDsInferContext_Destroy(NvDsInferContextHandle handle)
Destroys an NvDsInferContext instance and releases its resources.
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: nvdsinfer_context.h:408
NvDsInferNetworkType_InstanceSegmentation
@ NvDsInferNetworkType_InstanceSegmentation
Specifies a instance segmentation network.
Definition: nvdsinfer_context.h:145
_NvDsInferContextInitParams
Holds the initialization parameters required for the NvDsInferContext interface.
Definition: nvdsinfer_context.h:239
NvDsInferContextBatchOutput::numOutputDeviceBuffers
unsigned int numOutputDeviceBuffers
Holds the number of elements in *outputDeviceBuffers.
Definition: nvdsinfer_context.h:616
NvDsInferFormat_Unknown
@ NvDsInferFormat_Unknown
Definition: nvdsinfer_context.h:170
NvDsInferFrameOutput::outputType
NvDsInferNetworkType outputType
Holds an output type indicating the valid member in the union of detectionOutput, classificationOutpu...
Definition: nvdsinfer_context.h:584
NvDsInferUffOrder_kNCHW
@ NvDsInferUffOrder_kNCHW
Definition: nvdsinfer_context.h:180
nvdsinfer.h
NvDsInferObject::mask
float * mask
Definition: nvdsinfer_context.h:518
NvDsInferContext_GetNetworkInfo
void NvDsInferContext_GetNetworkInfo(NvDsInferContextHandle handle, NvDsInferNetworkInfo *networkInfo)
Gets network input information.
NvDsInferDetectionParams::nmsIOUThreshold
float nmsIOUThreshold
IOU threshold to be used with NMS mode of clustering.
Definition: nvdsinfer_context.h:219
NvDsInferContextBatchOutput::priv
void * priv
Holds a private context pointer for the set of output buffers.
Definition: nvdsinfer_context.h:625
_NvDsInferContextInitParams::networkScaleFactor
float networkScaleFactor
Holds the normalization factor with which to scale the input pixels.
Definition: nvdsinfer_context.h:301
_NvDsInferContextInitParams::useDLA
int useDLA
Holds a Boolean; true if DLA is to be used.
Definition: nvdsinfer_context.h:357
NvDsInferFormat_Tensor
@ NvDsInferFormat_Tensor
NCHW planar.
Definition: nvdsinfer_context.h:169
_NvDsInferContextInitParams::tltModelKey
char tltModelKey[_MAX_STR_LENGTH]
Holds the string key for decoding the TLT encoded model.
Definition: nvdsinfer_context.h:279
NvDsInferContextLoggingFunc
void(* NvDsInferContextLoggingFunc)(NvDsInferContextHandle handle, unsigned int uniqueID, NvDsInferLogLevel logLevel, const char *logMessage, void *userCtx)
Type declaration for a logging callback.
Definition: nvdsinfer_context.h:647
_DS_DEPRECATED_
#define _DS_DEPRECATED_(STR)
Definition: nvdsinfer.h:41
NvDsInferNetworkType_Segmentation
@ NvDsInferNetworkType_Segmentation
Specifies a segmentation network.
Definition: nvdsinfer_context.h:141
NvDsInferContextBatchInput::returnFuncData
void * returnFuncData
A pointer to the data to be supplied with the callback in returnInputFunc.
Definition: nvdsinfer_context.h:483
NvDsInferClassificationOutput::attributes
NvDsInferAttribute * attributes
Holds a pointer to an array of attributes.
Definition: nvdsinfer_context.h:548
_NvDsInferContextInitParams::modelFilePath
char modelFilePath[_PATH_MAX]
Holds the pathname of the caffemodel file.
Definition: nvdsinfer_context.h:251
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...
NvDsInferDetectionParams
Holds detection and bounding box grouping parameters.
Definition: nvdsinfer_context.h:192
NvDsInferFrameOutput
Holds the information inferred by the network on one frame.
Definition: nvdsinfer_context.h:579
NvDsInferDetectionParams::groupThreshold
int groupThreshold
Holds the minimum number boxes in a cluster to be considered an object during grouping using OpenCV g...
Definition: nvdsinfer_context.h:213
_NvDsInferContextInitParams::outputIOFormats
char ** outputIOFormats
Can be used to specify the format and datatype for bound output layers.
Definition: nvdsinfer_context.h:396
NvDsInferNetworkType
NvDsInferNetworkType
Defines network types.
Definition: nvdsinfer_context.h:131
NvDsInferFormat_BGR
@ NvDsInferFormat_BGR
Specifies 24-bit interleaved B-G-R format.
Definition: nvdsinfer_context.h:161
NvDsInferContextBatchPreprocessedInput
Definition: nvdsinfer_context.h:486
_NvDsInferContextInitParams::inputDims
NvDsInferDimsCHW inputDims
Holds the input dimensions for the model.
Definition: nvdsinfer_context.h:265
NvDsInferContextBatchOutput
Holds the output for all of the frames in a batch (an array of frame), and related buffer information...
Definition: nvdsinfer_context.h:605
_NvDsInferContextInitParams::inferInputDims
NvDsInferDimsCHW inferInputDims
Inference input dimensions for runtime engine.
Definition: nvdsinfer_context.h:384
NvDsInferClassificationOutput::label
char * label
Holds a pointer to a string containing a label for the classified output.
Definition: nvdsinfer_context.h:553
NvDsInferNetworkType_Other
@ NvDsInferNetworkType_Other
Specifies other.
Definition: nvdsinfer_context.h:150
NvDsInferObject
Holds the information about one detected object.
Definition: infer_post_datatypes.h:22
_NvDsInferContextInitParams::uffFilePath
char uffFilePath[_PATH_MAX]
Holds the pathname of the UFF model file.
Definition: nvdsinfer_context.h:253
NvDsInferFrameOutput::detectionOutput
NvDsInferDetectionOutput detectionOutput
Holds detector output.
Definition: nvdsinfer_context.h:591
_NvDsInferContextInitParams::numOffsets
unsigned int numOffsets
Definition: nvdsinfer_context.h:310
NvDsInferAttribute
Holds information about one classified attribute.
Definition: nvdsinfer.h:199
NvDsInferContextBatchInput::inputFrames
void ** inputFrames
Holds a pointer to an array of pointers to input frame buffers.
Definition: nvdsinfer_context.h:472
NvDsInferDetectionParams::eps
float eps
Holds the epsilon to control merging of overlapping boxes.
Definition: nvdsinfer_context.h:207
NvDsInferDetectionParams::topK
int topK
Number of objects with objects to be filtered in the decensding order of probability.
Definition: nvdsinfer_context.h:222
_NvDsInferContextInitParams::uffInputBlobName
char uffInputBlobName[_MAX_STR_LENGTH]
Holds the name of the input layer for the UFF model.
Definition: nvdsinfer_context.h:273
_NvDsInferContextInitParams::networkMode
NvDsInferNetworkMode networkMode
Holds an internal data format specifier used by the inference engine.
Definition: nvdsinfer_context.h:246
NvDsInferContextBatchPreprocessedInput::returnFuncData
void * returnFuncData
A pointer to the data to be supplied with the callback in returnInputFunc.
Definition: nvdsinfer_context.h:495
NvDsInferFormat_BGRx
@ NvDsInferFormat_BGRx
Specifies 32-bit interleaved B-G-R-x format.
Definition: nvdsinfer_context.h:167
_NvDsInferContextInitParams::modelEngineFilePath
char modelEngineFilePath[_PATH_MAX]
Holds the pathname of the serialized model engine file.
Definition: nvdsinfer_context.h:284
NvDsInferContextBatchOutput::numHostBuffers
unsigned int numHostBuffers
Holds the number of elements in hostBuffers.
Definition: nvdsinfer_context.h:622
_NvDsInferContextInitParams::clusterMode
NvDsInferClusterMode clusterMode
Holds the type of clustering mode.
Definition: nvdsinfer_context.h:387
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:218