NVIDIA DeepStream SDK API Reference

6.2 Release
nvdsinfer_context.h
Go to the documentation of this file.
1 
83 #ifndef __NVDSINFER_CONTEXT_H__
84 #define __NVDSINFER_CONTEXT_H__
85 
86 #include "nvdsinfer.h"
87 
96 #define _PATH_MAX 4096
97 
100 #define _MAX_CHANNELS 4
101 
103 #define _MAX_STR_LENGTH 1024
104 
106 #define NVDSINFER_MAX_BATCH_SIZE 1024
107 
110 #define NVDSINFER_MIN_OUTPUT_BUFFERPOOL_SIZE 2
111 
115 typedef enum
116 {
121 
125 typedef enum
126 {
146 
150 typedef enum
151 {
166 
170 typedef enum {
174  NvDsInferUffOrder_kNCHW _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNCHW instead") = NvDsInferTensorOrder_kNCHW,
175  NvDsInferUffOrder_kNHWC _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNCWH instead") = NvDsInferTensorOrder_kNHWC,
176  NvDsInferUffOrder_kNC _DS_DEPRECATED_("Use NvDsInferTensorOrder_kNC instead") = NvDsInferTensorOrder_kNC
178 
179 #define NvDsInferUffOrder _Pragma \
180  ("GCC warning \"'NvDsInferUffOrder' macro is deprecated. Use NvDsInferTensorOrder instead.\"") \
181  NvDsInferTensorOrder
182 
186 typedef struct
187 {
190  union {
191  float threshold _DS_DEPRECATED_("Use preclusterThreshold instead.");
193  };
194 
198 
201  float eps;
204  int minBoxes;
211  float minScore;
216  int topK;
218 
222 typedef enum
223 {
234 {
237  unsigned int uniqueID;
238 
241 
252 
256 
257  union {
262  } _DS_DEPRECATED_("Use inferInputDims instead.");
263 
268 
271 
274 
279 
283  unsigned int maxBatchSize;
284 
289 
293 
296 
299 
304  unsigned int numOffsets;
305 
308 
311  _DS_DEPRECATED_("Use NvDsInferClusterMode instead")
313 
315  unsigned int numDetectedClasses;
316 
320 
324 
326 
330  unsigned int numOutputLayers;
331 
332 
342 
346 
348  unsigned int gpuID;
349 
351  int useDLA;
353  int dlaCore;
354 
357  unsigned int outputBufferPoolSize;
358 
363 
366 
371 
375  unsigned int workspaceSize;
376 
379 
382 
386 
392  unsigned int numOutputIOFormats;
393 
400 
403 
409 
415 
417 
425 typedef void (* NvDsInferContextReturnInputAsyncFunc) (void *data);
426 
430 typedef struct
431 {
434  void** inputFrames;
436  unsigned int numInputFrames;
440  unsigned int inputPitch;
447 
448 typedef struct
449 {
452  unsigned int numInputTensors;
459 
463 typedef struct
464 {
466  float left;
468  float top;
470  float width;
472  float height;
476  char *label;
477  /* confidence score of the detected object. */
478  float confidence;
479  /* Instance mask information for the object. */
480  float *mask;
482  unsigned int mask_width;
484  unsigned int mask_height;
486  unsigned int mask_size;
488 
493 typedef struct
494 {
498  unsigned int numObjects;
500 
505 typedef struct
506 {
512  unsigned int numAttributes;
515  char *label;
517 
521 typedef struct
522 {
524  unsigned int width;
526  unsigned int height;
528  unsigned int classes;
531  int *class_map;
537 
541 typedef struct
542 {
549  union
550  {
560  };
562 
567 typedef struct
568 {
572  unsigned int numFrames;
573 
579 
582  void **hostBuffers;
584  unsigned int numHostBuffers;
585 
587  void* priv;
589 
591 typedef struct INvDsInferContext * NvDsInferContextHandle;
592 
610  unsigned int uniqueID, NvDsInferLogLevel logLevel, const char* logMessage,
611  void* userCtx);
612 
613 #ifdef __cplusplus
614 extern "C" {
615 #endif
616 
623 
632 _DS_DEPRECATED_("NvDsInferContext_GetStatusName is deprecated. Use NvDsInferStatus2Str instead")
633 const char * NvDsInferContext_GetStatusName (NvDsInferStatus status);
634 
635 
636 #ifdef __cplusplus
637 }
638 #endif
639 
647 #ifdef __cplusplus
648 
649 #include <string>
650 #include <vector>
651 
655 struct INvDsInferContext
656 {
657 public:
674  virtual NvDsInferStatus queueInputBatch(NvDsInferContextBatchInput &batchInput) = 0;
675 
687  virtual NvDsInferStatus dequeueOutputBatch(NvDsInferContextBatchOutput &batchOutput) = 0;
688 
696  virtual void releaseBatchOutput(NvDsInferContextBatchOutput &batchOutput) = 0;
697 
705  virtual void fillLayersInfo(std::vector<NvDsInferLayerInfo> &layersInfo) = 0;
706 
712  virtual void getNetworkInfo(NvDsInferNetworkInfo &networkInfo) = 0;
713 
722  virtual const std::vector< std::vector<std::string> >& getLabels() = 0;
723 
727  virtual void destroy() = 0;
728 
730  virtual ~INvDsInferContext() {}
731 
741  virtual NvDsInferStatus queueInputBatchPreprocessed(NvDsInferContextBatchPreprocessedInput &batchInput) = 0;
742 };
743 
757 NvDsInferStatus createNvDsInferContext(NvDsInferContextHandle *handle,
758  NvDsInferContextInitParams &initParams,
759  void *userCtx = nullptr,
760  NvDsInferContextLoggingFunc logFunc = nullptr);
761 
762 #endif
763 
772 #ifdef __cplusplus
773 extern "C" {
774 #endif
775 
776 
791  NvDsInferContextInitParams *initParams, void *userCtx,
793 
801 
813  NvDsInferContextBatchInput *batchInput);
814 
827  NvDsInferContextBatchOutput *batchOutput);
828 
839  NvDsInferContextBatchOutput *batchOutput);
840 
848  NvDsInferNetworkInfo *networkInfo);
849 
858 
870  NvDsInferLayerInfo *layersInfo);
871 
883  unsigned int id, unsigned int value);
884 
885 #ifdef __cplusplus
886 }
887 #endif
888 
891 #endif
892 
NvDsInferObject::confidence
float confidence
Definition: nvdsinfer_context.h:478
_NvDsInferContextInitParams::inputFromPreprocessedTensor
int inputFromPreprocessedTensor
Boolean flag indicating that caller will supply preprocessed tensors for inferencing.
Definition: nvdsinfer_context.h:408
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:556
NvDsInferSegmentationOutput::height
unsigned int height
Holds the height of the output.
Definition: nvdsinfer_context.h:526
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:341
NvDsInferObject::classIndex
int classIndex
Holds the index for the object's class.
Definition: nvdsinfer_context.h:474
NvDsInferObject::mask_width
unsigned int mask_width
Holds width of mask.
Definition: nvdsinfer_context.h:482
NvDsInferSegmentationOutput::classes
unsigned int classes
Holds the number of classes supported by the network.
Definition: nvdsinfer_context.h:528
_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:375
NvDsInferTensorOrder
NvDsInferTensorOrder
Defines UFF input layer orders.
Definition: nvdsinfer_context.h:170
_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:385
_NvDsInferContextInitParams::uffInputOrder
NvDsInferTensorOrder uffInputOrder
Holds the original input order for the UFF model.
Definition: nvdsinfer_context.h:265
NvDsInferNetworkType_Classifier
@ NvDsInferNetworkType_Classifier
Specifies a classifier.
Definition: nvdsinfer_context.h:132
_NvDsInferContextInitParams::perClassDetectionParams
NvDsInferDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
Definition: nvdsinfer_context.h:319
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:118
NvDsInferFormat
NvDsInferFormat
Defines color formats.
Definition: nvdsinfer_context.h:150
_NvDsInferContextInitParams::protoFilePath
char protoFilePath[_PATH_MAX]
Holds the pathname of the prototxt file.
Definition: nvdsinfer_context.h:243
_NvDsInferContextInitParams::netInputOrder
NvDsInferTensorOrder netInputOrder
Holds the original input order for the network.
Definition: nvdsinfer_context.h:270
_NvDsInferContextInitParams::maxBatchSize
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch.
Definition: nvdsinfer_context.h:283
NVDSINFER_CLUSTER_GROUP_RECTANGLES
@ NVDSINFER_CLUSTER_GROUP_RECTANGLES
Definition: nvdsinfer_context.h:224
_NvDsInferContextInitParams::customEngineCreateFuncName
char customEngineCreateFuncName[_MAX_STR_LENGTH]
Name of the custom engine creation function in the custom library.
Definition: nvdsinfer_context.h:365
_NvDsInferContextInitParams::layerDevicePrecisions
char ** layerDevicePrecisions
Can be used to specify the device type and inference precision of layers.
Definition: nvdsinfer_context.h:397
NvDsInferUffOrder_kNHWC
@ NvDsInferUffOrder_kNHWC
Definition: nvdsinfer_context.h:175
_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:345
NvDsInferDetectionParams::preClusterThreshold
float preClusterThreshold
Definition: nvdsinfer_context.h:192
NvDsInferNetworkMode_FP16
@ NvDsInferNetworkMode_FP16
Definition: nvdsinfer_context.h:119
NVDSINFER_CLUSTER_DBSCAN
@ NVDSINFER_CLUSTER_DBSCAN
Definition: nvdsinfer_context.h:225
_NvDsInferContextInitParams::networkType
NvDsInferNetworkType networkType
Holds the network type.
Definition: nvdsinfer_context.h:307
_NvDsInferContextInitParams::uffDimsCHW
NvDsInferDimsCHW uffDimsCHW
Holds the input dimensions for the UFF model.
Definition: nvdsinfer_context.h:261
NVDSINFER_CLUSTER_NONE
@ NVDSINFER_CLUSTER_NONE
Definition: nvdsinfer_context.h:228
_NvDsInferContextInitParams::int8CalibrationFilePath
char int8CalibrationFilePath[_PATH_MAX]
Holds the pathname of the INT8 calibration file.
Definition: nvdsinfer_context.h:255
NvDsInferDetectionOutput::numObjects
unsigned int numObjects
Holds the number of objects in objects.
Definition: nvdsinfer_context.h:498
NvDsInferUffOrder_kNC
@ NvDsInferUffOrder_kNC
Definition: nvdsinfer_context.h:176
NvDsInferContextBatchPreprocessedInput::returnInputFunc
NvDsInferContextReturnInputAsyncFunc returnInputFunc
Holds a callback for returning the input buffers to the client.
Definition: nvdsinfer_context.h:454
_NvDsInferContextInitParams::gpuID
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
Definition: nvdsinfer_context.h:348
NvDsInferContextBatchOutput::hostBuffers
void ** hostBuffers
Holds a pointer to an array of pointers to host buffers for this batch.
Definition: nvdsinfer_context.h:582
NvDsInferSegmentationOutput
Holds information parsed from segmentation network output for one frame.
Definition: nvdsinfer_context.h:521
NvDsInferContextBatchInput::returnInputFunc
NvDsInferContextReturnInputAsyncFunc returnInputFunc
Holds a callback for returning the input buffers to the client.
Definition: nvdsinfer_context.h:442
NvDsInferObject::mask_size
unsigned int mask_size
Holds size of mask in bytes.
Definition: nvdsinfer_context.h:486
_NvDsInferContextInitParams::numDetectedClasses
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
Definition: nvdsinfer_context.h:315
_NvDsInferContextInitParams::disableOutputHostCopy
int disableOutputHostCopy
Boolean flag indicating that wheather we will post processing on GPU if this flag enabled,...
Definition: nvdsinfer_context.h:414
NvDsInferContextBatchPreprocessedInput::numInputTensors
unsigned int numInputTensors
Holds the number of input tensors.
Definition: nvdsinfer_context.h:452
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:570
_NvDsInferContextInitParams::outputBufferPoolSize
unsigned int outputBufferPoolSize
Holds the number of sets of output buffers (host and device) to be allocated.
Definition: nvdsinfer_context.h:357
_NvDsInferContextInitParams::meanImageFilePath
char meanImageFilePath[_PATH_MAX]
Holds the pathname of the mean image file (PPM format).
Definition: nvdsinfer_context.h:292
_NvDsInferContextInitParams::dlaCore
int dlaCore
Holds the ID of the DLA core to use.
Definition: nvdsinfer_context.h:353
_NvDsInferContextInitParams::uniqueID
unsigned int uniqueID
Holds a unique identifier for the instance.
Definition: nvdsinfer_context.h:237
NvDsInferLogLevel
NvDsInferLogLevel
Enum for the log levels of NvDsInferContext.
Definition: nvdsinfer.h:246
_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:312
NvDsInferContextBatchOutput::outputDeviceBuffers
void ** outputDeviceBuffers
Holds a pointer to an array of pointers to output device buffers for this batch.
Definition: nvdsinfer_context.h:576
NvDsInferContextBatchInput::numInputFrames
unsigned int numInputFrames
Holds the number of input frames, i.e.
Definition: nvdsinfer_context.h:436
_NvDsInferContextInitParams::networkInputFormat
NvDsInferFormat networkInputFormat
Holds the network input format.
Definition: nvdsinfer_context.h:298
NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID
@ NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID
Definition: nvdsinfer_context.h:227
NvDsInferContextBatchOutput::numFrames
unsigned int numFrames
Holds the number of elements in frames.
Definition: nvdsinfer_context.h:572
_NvDsInferContextInitParams::offsets
float offsets[_MAX_CHANNELS]
Holds the per-channel offsets for mean subtraction.
Definition: nvdsinfer_context.h:303
_MAX_STR_LENGTH
#define _MAX_STR_LENGTH
Defines the maximum length of string parameters.
Definition: nvdsinfer_context.h:103
NvDsInferClassificationOutput
Holds information on all attributes classifed by a classifier network for one frame.
Definition: nvdsinfer_context.h:505
_NvDsInferContextInitParams::segmentationThreshold
float segmentationThreshold
Definition: nvdsinfer_context.h:325
_NvDsInferContextInitParams::tltEncodedModelFilePath
char tltEncodedModelFilePath[_PATH_MAX]
Holds the pathname of the TLT encoded model file.
Definition: nvdsinfer_context.h:251
NvDsInferNetworkType_Detector
@ NvDsInferNetworkType_Detector
Specifies a detector.
Definition: nvdsinfer_context.h:129
_NvDsInferContextInitParams::outputLayerNames
char ** outputLayerNames
Holds a pointer to an array of pointers to output layer names.
Definition: nvdsinfer_context.h:328
NvDsInferNetworkMode
NvDsInferNetworkMode
Defines internal data formats used by the inference engine.
Definition: nvdsinfer_context.h:115
NvDsInferContextBatchInput
Holds information about one batch to be inferred.
Definition: nvdsinfer_context.h:430
NVDSINFER_CLUSTER_NMS
@ NVDSINFER_CLUSTER_NMS
Definition: nvdsinfer_context.h:226
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:204
NvDsInferContextReturnInputAsyncFunc
void(* NvDsInferContextReturnInputAsyncFunc)(void *data)
Defines a callback function type for asynchronously returning the input client buffers to the NvDsInf...
Definition: nvdsinfer_context.h:425
NvDsInferContextBatchPreprocessedInput::tensors
NvDsInferLayerInfo * tensors
Definition: nvdsinfer_context.h:450
NvDsInferFormat_RGB
@ NvDsInferFormat_RGB
Specifies 24-bit interleaved R-G-B format.
Definition: nvdsinfer_context.h:153
NvDsInferClusterMode
NvDsInferClusterMode
Enum for clustering mode for detectors.
Definition: nvdsinfer_context.h:222
NvDsInferTensorOrder_kNC
@ NvDsInferTensorOrder_kNC
Definition: nvdsinfer_context.h:173
NvDsInferNetworkMode_FP32
@ NvDsInferNetworkMode_FP32
Definition: nvdsinfer_context.h:117
NvDsInferObject::label
char * label
Holds a pointer to a string containing a label for the object.
Definition: nvdsinfer_context.h:476
NvDsInferObject::height
float height
Holds the object's height.
Definition: nvdsinfer_context.h:472
_NvDsInferContextInitParams::onnxFilePath
char onnxFilePath[_PATH_MAX]
Holds the pathname of the ONNX model file.
Definition: nvdsinfer_context.h:249
NvDsInferDetectionOutput
Holds information on all objects detected by a detector network in one frame.
Definition: nvdsinfer_context.h:493
NvDsInferSegmentationOutput::width
unsigned int width
Holds the width of the output.
Definition: nvdsinfer_context.h:524
_NvDsInferContextInitParams::numOutputLayers
unsigned int numOutputLayers
Holds the number of output layer names.
Definition: nvdsinfer_context.h:330
NvDsInferFrameOutput::segmentationOutput
NvDsInferSegmentationOutput segmentationOutput
Holds classifier output.
Definition: nvdsinfer_context.h:559
NvDsInferObject::top
float top
Holds the object's offset from the top boundary of the frame.
Definition: nvdsinfer_context.h:468
_NvDsInferContextInitParams::customNetworkConfigFilePath
char customNetworkConfigFilePath[_PATH_MAX]
Holds the pathname of the configuration file for custom network creation.
Definition: nvdsinfer_context.h:362
NvDsInferNetworkInfo
Holds information about the model network.
Definition: nvdsinfer.h:109
NvDsInferClassificationOutput::numAttributes
unsigned int numAttributes
Holds the size of the attributes array.
Definition: nvdsinfer_context.h:512
_NvDsInferContextInitParams::labelsFilePath
char labelsFilePath[_PATH_MAX]
Holds the pathname of the labels file containing strings for the class labels.
Definition: nvdsinfer_context.h:288
_NvDsInferContextInitParams::classifierThreshold
float classifierThreshold
Holds the minimum confidence threshold for the classifier to consider a label valid.
Definition: nvdsinfer_context.h:323
NvDsInferLayerInfo
Holds information about one layer in the model.
Definition: nvdsinfer.h:86
NvDsInferTensorOrder_kNHWC
@ NvDsInferTensorOrder_kNHWC
Definition: nvdsinfer_context.h:172
NvDsInferObject::left
float left
Holds the object's offset from the left boundary of the frame.
Definition: nvdsinfer_context.h:466
NvDsInferDetectionParams::postClusterThreshold
float postClusterThreshold
Hold the bounding box detection threshold to be applied post clustering operation.
Definition: nvdsinfer_context.h:197
NvDsInferObject::mask_height
unsigned int mask_height
Holds height of mask.
Definition: nvdsinfer_context.h:484
NvDsInferContextHandle
struct INvDsInferContext * NvDsInferContextHandle
An opaque pointer type to be used as a handle for a context instance.
Definition: nvdsinfer_context.h:591
_PATH_MAX
#define _PATH_MAX
Maximum length of a file path parameter.
Definition: nvdsinfer_context.h:96
_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:370
NvDsInferContextBatchInput::inputFormat
NvDsInferFormat inputFormat
Holds the format of the frame contents.
Definition: nvdsinfer_context.h:438
NvDsInferFormat_GRAY
@ NvDsInferFormat_GRAY
Specifies 8-bit Luma format.
Definition: nvdsinfer_context.h:157
NvDsInferDetectionParams::minScore
float minScore
Minimum score in a cluster for the cluster to be considered an object during grouping.
Definition: nvdsinfer_context.h:211
_NvDsInferContextInitParams::numOutputIOFormats
unsigned int numOutputIOFormats
Holds number of output IO formats specified.
Definition: nvdsinfer_context.h:392
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:399
NvDsInferContext_ResetInitParams
void NvDsInferContext_ResetInitParams(NvDsInferContextInitParams *initParams)
Resets a context parameter structure to default values.
NvDsInferTensorOrder_kNCHW
@ NvDsInferTensorOrder_kNCHW
Definition: nvdsinfer_context.h:171
_NvDsInferContextInitParams::customBBoxParseFuncName
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
Definition: nvdsinfer_context.h:338
NvDsInferSegmentationOutput::class_map
int * class_map
Holds a pointer to an array for the 2D pixel class map.
Definition: nvdsinfer_context.h:531
NvDsInferDimsCHW
Holds the dimensions of a three-dimensional layer.
Definition: nvdsinfer.h:58
NvDsInferFormat_RGBA
@ NvDsInferFormat_RGBA
Specifies 32-bit interleaved R-G-B-A format.
Definition: nvdsinfer_context.h:159
NvDsInferContextBatchInput::inputPitch
unsigned int inputPitch
Holds the pitch of the input frames, in bytes.
Definition: nvdsinfer_context.h:440
_MAX_CHANNELS
#define _MAX_CHANNELS
Defines the maximum number of channels supported by the API for image input layers.
Definition: nvdsinfer_context.h:100
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:335
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:402
NvDsInferNetworkType_InstanceSegmentation
@ NvDsInferNetworkType_InstanceSegmentation
Specifies a instance segmentation network.
Definition: nvdsinfer_context.h:139
_NvDsInferContextInitParams
Holds the initialization parameters required for the NvDsInferContext interface.
Definition: nvdsinfer_context.h:233
NvDsInferContextBatchOutput::numOutputDeviceBuffers
unsigned int numOutputDeviceBuffers
Holds the number of elements in *outputDeviceBuffers.
Definition: nvdsinfer_context.h:578
NvDsInferFormat_Unknown
@ NvDsInferFormat_Unknown
Definition: nvdsinfer_context.h:164
NvDsInferFrameOutput::outputType
NvDsInferNetworkType outputType
Holds an output type indicating the valid member in the union of detectionOutput, classificationOutpu...
Definition: nvdsinfer_context.h:546
NvDsInferUffOrder_kNCHW
@ NvDsInferUffOrder_kNCHW
Definition: nvdsinfer_context.h:174
nvdsinfer.h
NvDsInferObject::mask
float * mask
Definition: nvdsinfer_context.h:480
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:213
NvDsInferContextBatchOutput::priv
void * priv
Holds a private context pointer for the set of output buffers.
Definition: nvdsinfer_context.h:587
_NvDsInferContextInitParams::networkScaleFactor
float networkScaleFactor
Holds the normalization factor with which to scale the input pixels.
Definition: nvdsinfer_context.h:295
_NvDsInferContextInitParams::useDLA
int useDLA
Holds a Boolean; true if DLA is to be used.
Definition: nvdsinfer_context.h:351
NvDsInferFormat_Tensor
@ NvDsInferFormat_Tensor
NCHW planar.
Definition: nvdsinfer_context.h:163
_NvDsInferContextInitParams::tltModelKey
char tltModelKey[_MAX_STR_LENGTH]
Holds the string key for decoding the TLT encoded model.
Definition: nvdsinfer_context.h:273
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:609
_DS_DEPRECATED_
#define _DS_DEPRECATED_(STR)
Definition: nvdsinfer.h:40
NvDsInferNetworkType_Segmentation
@ NvDsInferNetworkType_Segmentation
Specifies a segmentation network.
Definition: nvdsinfer_context.h:135
NvDsInferContextBatchInput::returnFuncData
void * returnFuncData
A pointer to the data to be supplied with the callback in returnInputFunc.
Definition: nvdsinfer_context.h:445
NvDsInferClassificationOutput::attributes
NvDsInferAttribute * attributes
Holds a pointer to an array of attributes.
Definition: nvdsinfer_context.h:510
_NvDsInferContextInitParams::modelFilePath
char modelFilePath[_PATH_MAX]
Holds the pathname of the caffemodel file.
Definition: nvdsinfer_context.h:245
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:186
NvDsInferFrameOutput
Holds the information inferred by the network on one frame.
Definition: nvdsinfer_context.h:541
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:207
_NvDsInferContextInitParams::outputIOFormats
char ** outputIOFormats
Can be used to specify the format and datatype for bound output layers.
Definition: nvdsinfer_context.h:390
NvDsInferNetworkType
NvDsInferNetworkType
Defines network types.
Definition: nvdsinfer_context.h:125
NvDsInferObject::width
float width
Holds the object's width.
Definition: nvdsinfer_context.h:470
NvDsInferFormat_BGR
@ NvDsInferFormat_BGR
Specifies 24-bit interleaved B-G-R format.
Definition: nvdsinfer_context.h:155
NvDsInferContextBatchPreprocessedInput
Definition: nvdsinfer_context.h:448
_NvDsInferContextInitParams::inputDims
NvDsInferDimsCHW inputDims
Holds the input dimensions for the model.
Definition: nvdsinfer_context.h:259
NvDsInferContextBatchOutput
Holds the output for all of the frames in a batch (an array of frame), and related buffer information...
Definition: nvdsinfer_context.h:567
_NvDsInferContextInitParams::inferInputDims
NvDsInferDimsCHW inferInputDims
Inference input dimensions for runtime engine.
Definition: nvdsinfer_context.h:378
NvDsInferClassificationOutput::label
char * label
Holds a pointer to a string containing a label for the classified output.
Definition: nvdsinfer_context.h:515
NvDsInferNetworkType_Other
@ NvDsInferNetworkType_Other
Specifies other.
Definition: nvdsinfer_context.h:144
NvDsInferObject
Holds information about one detected object.
Definition: nvdsinfer_context.h:463
_NvDsInferContextInitParams::uffFilePath
char uffFilePath[_PATH_MAX]
Holds the pathname of the UFF model file.
Definition: nvdsinfer_context.h:247
NvDsInferFrameOutput::detectionOutput
NvDsInferDetectionOutput detectionOutput
Holds detector output.
Definition: nvdsinfer_context.h:553
NvDsInferDetectionOutput::objects
NvDsInferObject * objects
Holds a pointer to an array of objects.
Definition: nvdsinfer_context.h:496
_NvDsInferContextInitParams::numOffsets
unsigned int numOffsets
Definition: nvdsinfer_context.h:304
NvDsInferAttribute
Holds information about one classified attribute.
Definition: nvdsinfer.h:198
NvDsInferContextBatchInput::inputFrames
void ** inputFrames
Holds a pointer to an array of pointers to input frame buffers.
Definition: nvdsinfer_context.h:434
NvDsInferDetectionParams::eps
float eps
Holds the epsilon to control merging of overlapping boxes.
Definition: nvdsinfer_context.h:201
NvDsInferDetectionParams::topK
int topK
Number of objects with objects to be filtered in the decensding order of probability.
Definition: nvdsinfer_context.h:216
_NvDsInferContextInitParams::uffInputBlobName
char uffInputBlobName[_MAX_STR_LENGTH]
Holds the name of the input layer for the UFF model.
Definition: nvdsinfer_context.h:267
_NvDsInferContextInitParams::networkMode
NvDsInferNetworkMode networkMode
Holds an internal data format specifier used by the inference engine.
Definition: nvdsinfer_context.h:240
NvDsInferContextBatchPreprocessedInput::returnFuncData
void * returnFuncData
A pointer to the data to be supplied with the callback in returnInputFunc.
Definition: nvdsinfer_context.h:457
NvDsInferSegmentationOutput::class_probability_map
float * class_probability_map
Holds a pointer to an array containing raw probabilities.
Definition: nvdsinfer_context.h:535
NvDsInferFormat_BGRx
@ NvDsInferFormat_BGRx
Specifies 32-bit interleaved B-G-R-x format.
Definition: nvdsinfer_context.h:161
_NvDsInferContextInitParams::modelEngineFilePath
char modelEngineFilePath[_PATH_MAX]
Holds the pathname of the serialized model engine file.
Definition: nvdsinfer_context.h:278
NvDsInferContextBatchOutput::numHostBuffers
unsigned int numHostBuffers
Holds the number of elements in hostBuffers.
Definition: nvdsinfer_context.h:584
_NvDsInferContextInitParams::clusterMode
NvDsInferClusterMode clusterMode
Holds the type of clustering mode.
Definition: nvdsinfer_context.h:381
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:217