|
|
NVIDIA DeepStream SDK API Reference
|
9.0 Release
|
Go to the documentation of this file.
24 #ifndef __POST_PROCESS_STRUCT_HPP__
25 #define __POST_PROCESS_STRUCT_HPP__
30 #include "gstnvdsinfer.h"
37 #define _PATH_MAX 4096
38 #define _MAX_STR_LENGTH 1024
43 #define getDimsCHWFromDims(dimsCHW,dims) \
45 (dimsCHW).c = (dims).d[0]; \
46 (dimsCHW).h = (dims).d[1]; \
47 (dimsCHW).w = (dims).d[2]; \
50 #define getDimsHWCFromDims(dimsCHW,dims) \
52 (dimsCHW).h = (dims).d[0]; \
53 (dimsCHW).w = (dims).d[1]; \
54 (dimsCHW).c = (dims).d[2]; \
57 #define DIVIDE_AND_ROUND_UP(a, b) ((a + b - 1) / b)
59 inline const char *
safeStr(
const std::string &str)
65 return !str || strlen(str) == 0;
112 #define printMsg(level, tag_str, fmt, ...) \
114 char* baseName = strrchr((char*)__FILE__, '/'); \
115 baseName = (baseName) ? (baseName + 1) : (char*)__FILE__; \
116 char logMsgBuffer[5 * _MAX_STR_LENGTH + 1]; \
117 snprintf(logMsgBuffer, 5 * _MAX_STR_LENGTH, \
118 tag_str " NvDsPostProcess::%s() <%s:%d> : " fmt, \
119 __func__, baseName, __LINE__, ##__VA_ARGS__); \
120 fprintf(stderr, "%s\n", logMsgBuffer); \
123 #define printError(fmt, ...) \
125 printMsg (NVDSINFER_LOG_ERROR, "Error in", fmt, ##__VA_ARGS__); \
128 #define printWarning(fmt, ...) \
130 printMsg (NVDSINFER_LOG_WARNING, "Warning from", fmt, ##__VA_ARGS__); \
133 #define printInfo(fmt, ...) \
135 printMsg (NVDSINFER_LOG_INFO, "Info from", fmt, ##__VA_ARGS__); \
138 #define printDebug(fmt, ...) \
140 printMsg (NVDSINFER_LOG_DEBUG, "DEBUG", fmt, ##__VA_ARGS__); \
145 unsigned int roiTopOffset;
146 unsigned int roiBottomOffset;
147 unsigned int detectionMinWidth;
148 unsigned int detectionMinHeight;
149 unsigned int detectionMaxWidth;
150 unsigned int detectionMaxHeight;
158 int have_border_color;
222 float preClusterThreshold;
226 float postClusterThreshold;
242 float nmsIOUThreshold;
247 unsigned int roiTopOffset;
248 unsigned int roiBottomOffset;
249 unsigned int detectionMinWidth;
250 unsigned int detectionMinHeight;
251 unsigned int detectionMaxWidth;
252 unsigned int detectionMaxHeight;
334 unsigned int classId;
347 float detectionConfidence;
358 unsigned int attributeIndex;
360 unsigned int attributeValue;
362 float attributeConfidence;
366 char *attributeLabel;
381 unsigned int classId;
394 float detectionConfidence;
399 unsigned int mask_width;
401 unsigned int mask_height;
403 unsigned int mask_size;
428 unsigned int mask_width;
430 unsigned int mask_height;
432 unsigned int mask_size;
444 unsigned int numObjects;
458 unsigned int numAttributes;
474 unsigned int classes;
481 float *class_probability_map;
500 unsigned int num_key_points;
542 unsigned int numFrames;
546 void **outputDeviceBuffers;
548 unsigned int numOutputDeviceBuffers;
554 unsigned int numHostBuffers;
572 unsigned int numClassesConfigured;
578 std::vector<float> perClassPreclusterThreshold;
580 std::vector<float> perClassPostclusterThreshold;
588 std::vector<NvDsPostProcessAttribute>
attributes;
596 if (attr.attributeLabel)
597 free (attr.attributeLabel);
Holds information about one detected object.
@ NvDsPostProcessTensorOrder_kNC
NvDsPostProcessClusterMode clusterMode
Holds the type of clustering mode.
std::string label
Cached string label.
constexpr float DEFAULT_POST_CLUSTER_THRESHOLD
Holds the box parameters of the box to be overlayed.
@ NVDSPOSTPROCESS_CUSTOM_LIB_FAILED
Custom Library interface implementation failed.
Holds information about one parsed object from a detector's output.
float classifierThreshold
Holds the minimum confidence threshold for the classifier to consider a label valid.
~NvDsPostProcessObjectInfo()
NvDsInferDimsCHW inferInputDims
Inference input dimensions for runtime engine.
Holds information about one classified attribute.
@ NVDSPOSTPROCESS_CLUSTER_DBSCAN_NMS_HYBRID
@ NVDSPOSTPROCESS_OUTPUT_PARSING_FAILED
Output parsing failed.
Holds detection and bounding box grouping parameters.
constexpr float DEFAULT_NMS_IOU_THRESHOLD
int under_inference
Boolean indicating if the object is already being inferred on.
constexpr float DEFAULT_EPS
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
struct NvDsPoint3f NvDsPoint3f
@ NVDSPOSTPROCESS_CUDA_ERROR
CUDA error was encountered.
@ NvDsPostProcessTensorOrder_kNCHW
struct _NvDsPostProcessContextInitParams NvDsPostProcessContextInitParams
Holds the initialization parameters required for the NvDsPostProcessContext interface.
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
NvDsPostProcessClusterMode
Enum for clustering mode for detectors.
@ NVDSPOSTPROCESS_UNKNOWN_ERROR
Unknown error was encountered.
NvDsPostProcessObjectInfo cached_info
Cached object information.
Holds the cached information of an object.
@ NvDsPostProcessTensorOrder_kNHWC
NvDsPostProcessNetworkType
Defines network types.
unsigned int uniqueID
Holds a unique identifier for the instance.
Holds information on all objects detected by a detector network in one frame.
constexpr int PROCESS_MODEL_OBJECTS
NvDsPostProcessObjectDetectionInfo NvDsPostProcessParseObjectInfo
A typedef defined to maintain backward compatibility.
constexpr int DEFAULT_GROUP_THRESHOLD
@ NVDSPOSTPROCESS_CLUSTER_DBSCAN
constexpr float DEFAULT_PRE_CLUSTER_THRESHOLD
Holds information about one parsed object and instance mask from a detector's output.
Holds the bounding box coloring information for one class;.
NvDsPostProcessTensorOrder
Defines UFF layer orders.
NvDsPostProcessNetworkType
Defines network types.
NvDsPostProcessClusterMode
Enum for clustering mode for detectors.
NvDsPostProcessDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
unsigned long last_inferred_frame_num
Number of the frame in the stream when the object was last inferred on.
@ NVDSPOSTPROCESS_LOG_DEBUG
@ NVDSPOSTPROCESS_INVALID_PARAMS
Invalid parameters were supplied.
constexpr bool ATHR_ENABLED
@ NVDSPOSTPROCESS_RESOURCE_ERROR
Resource error was encountered.
float segmentationThreshold
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
char customClassifierParseFuncName[_MAX_STR_LENGTH]
Name of the custom classifier attribute parsing function in the custom library.
@ NvDsPostProcessNetworkType_Classifier
Specifies a classifier.
unsigned long last_accessed_frame_num
Number of the frame in the stream when the object was last accessed.
Holds the initialization parameters required for the NvDsPostProcessContext interface.
const char * safeStr(const std::string &str)
@ NVDSPOSTPROCESS_LOG_INFO
@ NVDSPOSTPROCESS_CLUSTER_GROUP_RECTANGLES
Holds the information inferred by the network on one frame.
Holds the dimensions of a three-dimensional layer.
NvDsPostProcessNetworkType networkType
Holds the network type.
std::vector< NvDsPostProcessAttribute > attributes
Vector of cached classification attributes.
@ NvDsPostProcessNetworkType_Detector
Specifies a detector.
constexpr int DEFAULT_MIN_BOXES
NvDsPostProcessTensorOrder segmentationOutputOrder
Holds output order for segmentation network.
Holds information parsed from segmentation network output for one frame.
@ NVDSPOSTPROCESS_CLUSTER_NONE
Holds the output for all of the frames in a batch (an array of frame), and related buffer information...
Holds information parsed from bodypose network output for one frame.
char customBBoxInstanceMaskParseFuncName[_MAX_STR_LENGTH]
Holds the name of the bounding box and instance mask parse function in the custom library.
struct _NvDsPostProcessObjectHistory NvDsPostProcessObjectHistory
Holds the inference information/history for one object based on it's tracking id.
char labelsFilePath[_PATH_MAX]
Holds the pathname of the labels file containing strings for the class labels.
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch.
constexpr float ATHR_THRESHOLD
char ** outputLayerNames
Holds a pointer to an array of pointers to output layer names.
gboolean preprocessor_support
Holds boolean value to show whether preprocessor support is there.
@ NVDSPOSTPROCESS_SUCCESS
operation succeeded.
@ NvDsPostProcessNetworkType_InstanceSegmentation
Specifies a instance segmentation network.
Holds the color parameters of the box or text to be overlayed.
Holds the inference information/history for one object based on it's tracking id.
bool string_empty(const char *str)
@ NVDSPOSTPROCESS_CONFIG_FAILED
Failed to configure the instance possibly due to an erroneous initialization property.
@ NvDsPostProcessNetworkType_Other
Specifies other.
@ NVDSPOSTPROCESS_LOG_WARNING
constexpr int PROCESS_MODEL_FULL_FRAME
Holds information on all attributes classifed by a classifier network for one frame.
NvDsPostProcessObjectInfo()=default
NvDsPostProcessTensorOrder
Defines UFF layer orders.
unsigned int numOutputLayers
Holds the number of output layer names.
@ NvDsPostProcessNetworkType_BodyPose
Bodypose 3D.
constexpr int DEFAULT_TOP_K
@ NVDSPOSTPROCESS_CLUSTER_NMS
@ NvDsPostProcessNetworkType_Segmentation
Specifies a segmentation network.
Holds the detection parameters required for parsing objects.
NvOSD_RectParams last_inferred_coords
Bounding box co-ordinates of the object when it was last inferred on.
constexpr float DEFAULT_DBSCAN_MIN_SCORE
@ NVDSPOSTPROCESS_LOG_ERROR
NvDsPostProcessStatus
Enum for the status codes returned by NvDsPostProcessAlgorithm.