NVIDIA DeepStream SDK API Reference

6.4 Release
post_processor_struct.h File Reference

Go to the source code of this file.

Data Structures

struct  NvDsPostProcessDetectionFilterParams
 
struct  NvDsPostProcessColorParams
 Holds the bounding box coloring information for one class;. More...
 
struct  NvDsPostProcessDetectionParams
 Holds detection and bounding box grouping parameters. More...
 
struct  _NvDsPostProcessContextInitParams
 Holds the initialization parameters required for the NvDsPostProcessContext interface. More...
 
struct  NvDsPostProcessObjectDetectionInfo
 Holds information about one parsed object from a detector's output. More...
 
struct  NvDsPostProcessAttribute
 Holds information about one classified attribute. More...
 
struct  NvDsPostProcessInstanceMaskInfo
 Holds information about one parsed object and instance mask from a detector's output. More...
 
struct  NvDsPostProcessObject
 Holds information about one detected object. More...
 
struct  NvDsPostProcessDetectionOutput
 Holds information on all objects detected by a detector network in one frame. More...
 
struct  NvDsPostProcessClassificationOutput
 Holds information on all attributes classifed by a classifier network for one frame. More...
 
struct  NvDsPostProcessSegmentationOutput
 Holds information parsed from segmentation network output for one frame. More...
 
struct  NvDsPostProcessFrameOutput
 Holds the information inferred by the network on one frame. More...
 
struct  NvDsPostProcessBatchOutput
 Holds the output for all of the frames in a batch (an array of frame), and related buffer information. More...
 
struct  NvDsPostProcessParseDetectionParams
 Holds the detection parameters required for parsing objects. More...
 
struct  NvDsPostProcessObjectInfo
 Holds the cached information of an object. More...
 
struct  _NvDsPostProcessObjectHistory
 Holds the inference information/history for one object based on it's tracking id. More...
 

Macros

#define _PATH_MAX   4096
 
#define _MAX_STR_LENGTH   1024
 
#define getDimsCHWFromDims(dimsCHW, dims)
 Sets values on a NvDsInferDimsCHW structure from a NvDsInferDims structure. More...
 
#define getDimsHWCFromDims(dimsCHW, dims)
 
#define DIVIDE_AND_ROUND_UP(a, b)   ((a + b - 1) / b)
 
#define printMsg(level, tag_str, fmt, ...)
 
#define printError(fmt, ...)
 
#define printWarning(fmt, ...)
 
#define printInfo(fmt, ...)
 
#define printDebug(fmt, ...)
 

Typedefs

typedef struct _NvDsPostProcessContextInitParams NvDsPostProcessContextInitParams
 Holds the initialization parameters required for the NvDsPostProcessContext interface. More...
 
typedef NvDsPostProcessObjectDetectionInfo NvDsPostProcessParseObjectInfo
 A typedef defined to maintain backward compatibility. More...
 
typedef struct _NvDsPostProcessObjectHistory NvDsPostProcessObjectHistory
 Holds the inference information/history for one object based on it's tracking id. More...
 

Enumerations

enum  NvDsPostProcessStatus {
  NVDSPOSTPROCESS_SUCCESS = 0,
  NVDSPOSTPROCESS_CONFIG_FAILED,
  NVDSPOSTPROCESS_CUSTOM_LIB_FAILED,
  NVDSPOSTPROCESS_INVALID_PARAMS,
  NVDSPOSTPROCESS_OUTPUT_PARSING_FAILED,
  NVDSPOSTPROCESS_CUDA_ERROR,
  NVDSPOSTPROCESS_RESOURCE_ERROR,
  NVDSPOSTPROCESS_UNKNOWN_ERROR
}
 Enum for the status codes returned by NvDsPostProcessAlgorithm. More...
 
enum  NvDsPostProcesLogLevel {
  NVDSPOSTPROCESS_LOG_ERROR = 0,
  NVDSPOSTPROCESS_LOG_WARNING,
  NVDSPOSTPROCESS_LOG_INFO,
  NVDSPOSTPROCESS_LOG_DEBUG
}
 
enum  NvDsPostProcessClusterMode {
  NVDSPOSTPROCESS_CLUSTER_GROUP_RECTANGLES = 0,
  NVDSPOSTPROCESS_CLUSTER_DBSCAN,
  NVDSPOSTPROCESS_CLUSTER_NMS,
  NVDSPOSTPROCESS_CLUSTER_DBSCAN_NMS_HYBRID,
  NVDSPOSTPROCESS_CLUSTER_NONE
}
 Enum for clustering mode for detectors. More...
 
enum  NvDsPostProcessTensorOrder {
  NvDsPostProcessTensorOrder_kNCHW,
  NvDsPostProcessTensorOrder_kNHWC,
  NvDsPostProcessTensorOrder_kNC
}
 Defines UFF layer orders. More...
 
enum  NvDsPostProcessNetworkType {
  NvDsPostProcessNetworkType_Detector,
  NvDsPostProcessNetworkType_Classifier,
  NvDsPostProcessNetworkType_Segmentation,
  NvDsPostProcessNetworkType_InstanceSegmentation,
  NvDsPostProcessNetworkType_Other = 100
}
 Defines network types. More...
 

Functions

const char * safeStr (const std::string &str)
 
bool string_empty (const char *str)
 

Variables

constexpr float DEFAULT_PRE_CLUSTER_THRESHOLD = 0.2
 
constexpr float DEFAULT_POST_CLUSTER_THRESHOLD = 0.0
 
constexpr float DEFAULT_EPS = 0.0
 
constexpr int DEFAULT_GROUP_THRESHOLD = 0
 
constexpr int DEFAULT_MIN_BOXES = 0
 
constexpr float DEFAULT_DBSCAN_MIN_SCORE = 0
 
constexpr float DEFAULT_NMS_IOU_THRESHOLD = 0.3
 
constexpr int DEFAULT_TOP_K = -1
 
constexpr bool ATHR_ENABLED = true
 
constexpr float ATHR_THRESHOLD = 60.0
 
constexpr int PROCESS_MODEL_FULL_FRAME = 1
 
constexpr int PROCESS_MODEL_OBJECTS = 2
 

Macro Definition Documentation

◆ _MAX_STR_LENGTH

#define _MAX_STR_LENGTH   1024

Definition at line 38 of file post_processor_struct.h.

◆ _PATH_MAX

#define _PATH_MAX   4096

Definition at line 37 of file post_processor_struct.h.

◆ DIVIDE_AND_ROUND_UP

#define DIVIDE_AND_ROUND_UP (   a,
 
)    ((a + b - 1) / b)

Definition at line 57 of file post_processor_struct.h.

◆ getDimsCHWFromDims

#define getDimsCHWFromDims (   dimsCHW,
  dims 
)
Value:
do { \
(dimsCHW).c = (dims).d[0]; \
(dimsCHW).h = (dims).d[1]; \
(dimsCHW).w = (dims).d[2]; \
} while (0)

Sets values on a NvDsInferDimsCHW structure from a NvDsInferDims structure.

Definition at line 43 of file post_processor_struct.h.

◆ getDimsHWCFromDims

#define getDimsHWCFromDims (   dimsCHW,
  dims 
)
Value:
do { \
(dimsCHW).h = (dims).d[0]; \
(dimsCHW).w = (dims).d[1]; \
(dimsCHW).c = (dims).d[2]; \
} while (0)

Definition at line 50 of file post_processor_struct.h.

◆ printDebug

#define printDebug (   fmt,
  ... 
)
Value:
do { \
printMsg (NVDSINFER_LOG_DEBUG, "DEBUG", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 138 of file post_processor_struct.h.

◆ printError

#define printError (   fmt,
  ... 
)
Value:
do { \
printMsg (NVDSINFER_LOG_ERROR, "Error in", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 123 of file post_processor_struct.h.

◆ printInfo

#define printInfo (   fmt,
  ... 
)
Value:
do { \
printMsg (NVDSINFER_LOG_INFO, "Info from", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 133 of file post_processor_struct.h.

◆ printMsg

#define printMsg (   level,
  tag_str,
  fmt,
  ... 
)
Value:
do { \
char* baseName = strrchr((char*)__FILE__, '/'); \
baseName = (baseName) ? (baseName + 1) : (char*)__FILE__; \
char logMsgBuffer[5 * _MAX_STR_LENGTH + 1]; \
snprintf(logMsgBuffer, 5 * _MAX_STR_LENGTH, \
tag_str " NvDsPostProcess::%s() <%s:%d> : " fmt, \
__func__, baseName, __LINE__, ##__VA_ARGS__); \
fprintf(stderr, "%s\n", logMsgBuffer); \
} while (0)

Definition at line 112 of file post_processor_struct.h.

◆ printWarning

#define printWarning (   fmt,
  ... 
)
Value:
do { \
printMsg (NVDSINFER_LOG_WARNING, "Warning from", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 128 of file post_processor_struct.h.

Typedef Documentation

◆ NvDsPostProcessContextInitParams

Holds the initialization parameters required for the NvDsPostProcessContext interface.

◆ NvDsPostProcessObjectHistory

Holds the inference information/history for one object based on it's tracking id.

◆ NvDsPostProcessParseObjectInfo

A typedef defined to maintain backward compatibility.

Definition at line 369 of file post_processor_struct.h.

Enumeration Type Documentation

◆ NvDsPostProcesLogLevel

Enumerator
NVDSPOSTPROCESS_LOG_ERROR 
NVDSPOSTPROCESS_LOG_WARNING 
NVDSPOSTPROCESS_LOG_INFO 
NVDSPOSTPROCESS_LOG_DEBUG 

Definition at line 105 of file post_processor_struct.h.

◆ NvDsPostProcessClusterMode

Enum for clustering mode for detectors.

Enumerator
NVDSPOSTPROCESS_CLUSTER_GROUP_RECTANGLES 
NVDSPOSTPROCESS_CLUSTER_DBSCAN 
NVDSPOSTPROCESS_CLUSTER_NMS 
NVDSPOSTPROCESS_CLUSTER_DBSCAN_NMS_HYBRID 
NVDSPOSTPROCESS_CLUSTER_NONE 

Definition at line 169 of file post_processor_struct.h.

◆ NvDsPostProcessNetworkType

Defines network types.

Enumerator
NvDsPostProcessNetworkType_Detector 

Specifies a detector.

Detectors find objects and their coordinates, and their classes in an input frame.

NvDsPostProcessNetworkType_Classifier 

Specifies a classifier.

Classifiers classify an entire frame into one of several classes.

NvDsPostProcessNetworkType_Segmentation 

Specifies a segmentation network.

A segmentation network classifies each pixel into one of several classes.

NvDsPostProcessNetworkType_InstanceSegmentation 

Specifies a instance segmentation network.

A instance segmentation network detects objects, bounding box and mask for objects, and their classes in an input frame

NvDsPostProcessNetworkType_Other 

Specifies other.

Output layers of an "other" network are not parsed by NvDsPostProcessContext. This is useful for networks that produce custom output. Output can be parsed by the NvDsPostProcessContext client or can be combined with the Gst-nvinfer feature to flow output tensors as metadata.

Definition at line 191 of file post_processor_struct.h.

◆ NvDsPostProcessStatus

Enum for the status codes returned by NvDsPostProcessAlgorithm.

Enumerator
NVDSPOSTPROCESS_SUCCESS 

operation succeeded.

NVDSPOSTPROCESS_CONFIG_FAILED 

Failed to configure the instance possibly due to an erroneous initialization property.

NVDSPOSTPROCESS_CUSTOM_LIB_FAILED 

Custom Library interface implementation failed.

NVDSPOSTPROCESS_INVALID_PARAMS 

Invalid parameters were supplied.

NVDSPOSTPROCESS_OUTPUT_PARSING_FAILED 

Output parsing failed.

NVDSPOSTPROCESS_CUDA_ERROR 

CUDA error was encountered.

NVDSPOSTPROCESS_RESOURCE_ERROR 

Resource error was encountered.

NVDSPOSTPROCESS_UNKNOWN_ERROR 

Unknown error was encountered.

Definition at line 84 of file post_processor_struct.h.

◆ NvDsPostProcessTensorOrder

Defines UFF layer orders.

Enumerator
NvDsPostProcessTensorOrder_kNCHW 
NvDsPostProcessTensorOrder_kNHWC 
NvDsPostProcessTensorOrder_kNC 

Definition at line 181 of file post_processor_struct.h.

Function Documentation

◆ safeStr()

const char* safeStr ( const std::string &  str)
inline

Definition at line 59 of file post_processor_struct.h.

◆ string_empty()

bool string_empty ( const char *  str)
inline

Definition at line 64 of file post_processor_struct.h.

Referenced by INFER_EXPORT_API::DlLibHandle::symbol().

Variable Documentation

◆ ATHR_ENABLED

constexpr bool ATHR_ENABLED = true
constexpr

Definition at line 76 of file post_processor_struct.h.

◆ ATHR_THRESHOLD

constexpr float ATHR_THRESHOLD = 60.0
constexpr

Definition at line 77 of file post_processor_struct.h.

◆ DEFAULT_DBSCAN_MIN_SCORE

constexpr float DEFAULT_DBSCAN_MIN_SCORE = 0
constexpr

Definition at line 73 of file post_processor_struct.h.

◆ DEFAULT_EPS

constexpr float DEFAULT_EPS = 0.0
constexpr

Definition at line 70 of file post_processor_struct.h.

◆ DEFAULT_GROUP_THRESHOLD

constexpr int DEFAULT_GROUP_THRESHOLD = 0
constexpr

Definition at line 71 of file post_processor_struct.h.

◆ DEFAULT_MIN_BOXES

constexpr int DEFAULT_MIN_BOXES = 0
constexpr

Definition at line 72 of file post_processor_struct.h.

◆ DEFAULT_NMS_IOU_THRESHOLD

constexpr float DEFAULT_NMS_IOU_THRESHOLD = 0.3
constexpr

Definition at line 74 of file post_processor_struct.h.

◆ DEFAULT_POST_CLUSTER_THRESHOLD

constexpr float DEFAULT_POST_CLUSTER_THRESHOLD = 0.0
constexpr

Definition at line 69 of file post_processor_struct.h.

◆ DEFAULT_PRE_CLUSTER_THRESHOLD

constexpr float DEFAULT_PRE_CLUSTER_THRESHOLD = 0.2
constexpr

Definition at line 68 of file post_processor_struct.h.

◆ DEFAULT_TOP_K

constexpr int DEFAULT_TOP_K = -1
constexpr

Definition at line 75 of file post_processor_struct.h.

◆ PROCESS_MODEL_FULL_FRAME

constexpr int PROCESS_MODEL_FULL_FRAME = 1
constexpr

Definition at line 78 of file post_processor_struct.h.

◆ PROCESS_MODEL_OBJECTS

constexpr int PROCESS_MODEL_OBJECTS = 2
constexpr

Definition at line 79 of file post_processor_struct.h.

NVDSINFER_LOG_ERROR
@ NVDSINFER_LOG_ERROR
Definition: nvdsinfer.h:250
NVDSINFER_LOG_INFO
@ NVDSINFER_LOG_INFO
Definition: nvdsinfer.h:252
NVDSINFER_LOG_WARNING
@ NVDSINFER_LOG_WARNING
Definition: nvdsinfer.h:251
NVDSINFER_LOG_DEBUG
@ NVDSINFER_LOG_DEBUG
Definition: nvdsinfer.h:253
_MAX_STR_LENGTH
#define _MAX_STR_LENGTH
Definition: post_processor_struct.h:38