NVIDIA DeepStream SDK API Reference

5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvdsinfer_context.h File Reference

Detailed Description

Copyright (c) 2018-2020, NVIDIA CORPORATION.

All rights reserved.

NVIDIA Corporation and its licensors retain all intellectual property and proprietary rights in and to this software, related documentation and any modifications thereto. Any use, reproduction, disclosure or distribution of this software and related documentation without an express license agreement from NVIDIA Corporation is strictly prohibited.

NVIDIA DeepStream Inference Interface

Description: This file specifies the DeepStream inference interface API.

Definition in file nvdsinfer_context.h.

Go to the source code of this file.

Data Structures

struct  NvDsInferDetectionParams
 Holds detection and bounding box grouping parameters. More...
 
struct  _NvDsInferContextInitParams
 Holds the initialization parameters required for the NvDsInferContext interface. More...
 
struct  NvDsInferContextBatchInput
 Holds information about one batch to be inferred. More...
 
struct  NvDsInferObject
 Holds information about one detected object. More...
 
struct  NvDsInferDetectionOutput
 Holds information on all objects detected by a detector network in one frame. More...
 
struct  NvDsInferClassificationOutput
 Holds information on all attributes classifed by a classifier network for one frame. More...
 
struct  NvDsInferSegmentationOutput
 Holds information parsed from segmentation network output for one frame. More...
 
struct  NvDsInferFrameOutput
 Holds the information inferred by the network on one frame. More...
 
struct  NvDsInferContextBatchOutput
 Holds the output for all of the frames in a batch (an array of frame), and related buffer information. More...
 

Functions

NvDsInferContext API C-interface

This section describes the C interface for the NvDsInferContext class.

NvDsInferStatus NvDsInferContext_Create (NvDsInferContextHandle *handle, NvDsInferContextInitParams *initParams, void *userCtx, NvDsInferContextLoggingFunc logFunc)
 Creates a new NvDsInferContext object with specified initialization parameters. More...
 
void NvDsInferContext_Destroy (NvDsInferContextHandle handle)
 Destroys an NvDsInferContext instance and releases its resources. More...
 
NvDsInferStatus NvDsInferContext_QueueInputBatch (NvDsInferContextHandle handle, NvDsInferContextBatchInput *batchInput)
 Queues a batch of input frames for preprocessing and inferencing. More...
 
NvDsInferStatus NvDsInferContext_DequeueOutputBatch (NvDsInferContextHandle handle, NvDsInferContextBatchOutput *batchOutput)
 Dequeues output for a batch of frames. More...
 
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 context for reuse. More...
 
void NvDsInferContext_GetNetworkInfo (NvDsInferContextHandle handle, NvDsInferNetworkInfo *networkInfo)
 Gets network input information. More...
 
unsigned int NvDsInferContext_GetNumLayersInfo (NvDsInferContextHandle handle)
 Gets the number of the bound layers of the inference engine in an NvDsInferContext instance. More...
 
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 NvDsInferContext instance. More...
 
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 value for classifiers. More...
 

Variables

NvDsInferDimsCHW inputDims
 Holds the input dimensions for the model. More...
 
NvDsInferDimsCHW uffDimsCHW
 Holds the input dimensions for the UFF model. More...
 

NvDsInferContext API common types and functions.

This section describes the common types and functions for both the C and C++ interfaces for the NvDsInferContext class.

#define _PATH_MAX   4096
 Maximum length of a file path parameter. More...
 
#define _MAX_CHANNELS   4
 Defines the maximum number of channels supported by the API for image input layers. More...
 
#define _MAX_STR_LENGTH   1024
 Defines the maximum length of string parameters. More...
 
#define NVDSINFER_MAX_BATCH_SIZE   1024
 Defines the maximum batch size supported by nvdsinfer. More...
 
#define NVDSINFER_MIN_OUTPUT_BUFFERPOOL_SIZE   2
 Defines the minimum number of sets of output buffers that must be allocated. More...
 
#define NvDsInferUffOrder
 
enum  NvDsInferNetworkMode {
  NvDsInferNetworkMode_FP32,
  NvDsInferNetworkMode_INT8,
  NvDsInferNetworkMode_FP16
}
 Defines internal data formats used by the inference engine. More...
 
enum  NvDsInferNetworkType {
  NvDsInferNetworkType_Detector,
  NvDsInferNetworkType_Classifier,
  NvDsInferNetworkType_Segmentation,
  NvDsInferNetworkType_InstanceSegmentation,
  NvDsInferNetworkType_Other = 100
}
 Defines network types. More...
 
enum  NvDsInferFormat {
  NvDsInferFormat_RGB,
  NvDsInferFormat_BGR,
  NvDsInferFormat_GRAY,
  NvDsInferFormat_RGBA,
  NvDsInferFormat_BGRx,
  NvDsInferFormat_Tensor,
  NvDsInferFormat_Unknown = 0xFFFFFFFF
}
 Defines color formats. More...
 
enum  NvDsInferTensorOrder {
  NvDsInferTensorOrder_kNCHW,
  NvDsInferTensorOrder_kNHWC,
  NvDsInferTensorOrder_kNC,
  NvDsInferUffOrder_kNCHW =("Use NvDsInferTensorOrder_kNCHW instead") = NvDsInferTensorOrder_kNCHW,
  NvDsInferUffOrder_kNHWC =("Use NvDsInferTensorOrder_kNCWH instead") = NvDsInferTensorOrder_kNHWC,
  NvDsInferUffOrder_kNC =("Use NvDsInferTensorOrder_kNC instead") = NvDsInferTensorOrder_kNC
}
 Defines UFF input layer orders. More...
 
enum  NvDsInferClusterMode {
  NVDSINFER_CLUSTER_GROUP_RECTANGLES = 0,
  NVDSINFER_CLUSTER_DBSCAN,
  NVDSINFER_CLUSTER_NMS,
  NVDSINFER_CLUSTER_DBSCAN_NMS_HYBRID,
  NVDSINFER_CLUSTER_NONE
}
 Enum for clustering mode for detectors. More...
 
typedef struct
_NvDsInferContextInitParams 
NvDsInferContextInitParams
 Holds the initialization parameters required for the NvDsInferContext interface. More...
 
typedef void(* NvDsInferContextReturnInputAsyncFunc )(void *data)
 Defines a callback function type for asynchronously returning the input client buffers to the NvDsInferContext client. More...
 
typedef struct INvDsInferContext * NvDsInferContextHandle
 An opaque pointer type to be used as a handle for a context instance. More...
 
typedef void(* NvDsInferContextLoggingFunc )(NvDsInferContextHandle handle, unsigned int uniqueID, NvDsInferLogLevel logLevel, const char *logMessage, void *userCtx)
 Type declaration for a logging callback. More...
 
void NvDsInferContext_ResetInitParams (NvDsInferContextInitParams *initParams)
 Resets a context parameter structure to default values. More...
 
NvDsInferContext_GetStatusName
is deprecated Use
NvDsInferStatus2Str instead
const char * 
NvDsInferContext_GetStatusName (NvDsInferStatus status)
 Gets the string name of the status. More...
 

Variable Documentation

NvDsInferDimsCHW inputDims

Holds the input dimensions for the model.

Definition at line 264 of file nvdsinfer_context.h.

NvDsInferDimsCHW uffDimsCHW

Holds the input dimensions for the UFF model.

Definition at line 266 of file nvdsinfer_context.h.