|
NVIDIA DeepStream SDK API Reference
|
7.1 Release
|
Go to the documentation of this file.
24 #ifndef __POST_PROCESS_STRUCT_HPP__
25 #define __POST_PROCESS_STRUCT_HPP__
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__); \
596 if (attr.attributeLabel)
597 free (attr.attributeLabel);
Holds information about one detected object.
NvDsPostProcessClusterMode clusterMode
Holds the type of clustering mode.
unsigned int numFrames
Holds the number of elements in frames.
std::string label
Cached string label.
unsigned int numOutputDeviceBuffers
Holds the number of elements in *outputDeviceBuffers.
struct _NvDsPostProcessContextInitParams NvDsPostProcessContextInitParams
Holds the initialization parameters required for the NvDsPostProcessContext interface.
std::vector< NvDsPostProcessAttribute > attributes
Vector of cached classification attributes.
Holds the box parameters of the box to be overlayed.
NvOSD_ColorParams bg_color
NvDsPostProcessFrameOutput * frames
Holds a pointer to an array of outputs for each frame in the batch.
NvDsPostProcessObjectDetectionInfo NvDsPostProcessParseObjectInfo
A typedef defined to maintain backward compatibility.
char labelsFilePath[_PATH_MAX]
Holds the pathname of the labels file containing strings for the class labels.
Holds information about one parsed object from a detector's output.
char customBBoxInstanceMaskParseFuncName[_MAX_STR_LENGTH]
Holds the name of the bounding box and instance mask parse function in the custom library.
unsigned int classId
Holds the ID of the class to which the object belongs.
float classifierThreshold
Holds the minimum confidence threshold for the classifier to consider a label valid.
~NvDsPostProcessObjectInfo()
NvDsInferDimsCHW inferInputDims
Inference input dimensions for runtime engine.
unsigned int detectionMinHeight
Holds information about one classified attribute.
float height
Holds the height of the object's bounding box.
float left
Holds the horizontal offset of the bounding box shape for the object.
void * priv
Holds a private context pointer for the set of output buffers.
Holds detection and bounding box grouping parameters.
unsigned int roiBottomOffset
NvDsPostProcessNetworkType
Defines network types.
void ** hostBuffers
Holds a pointer to an array of pointers to host buffers for this batch.
int under_inference
Boolean indicating if the object is already being inferred on.
NvDsPostProcessColorParams color_params
constexpr int DEFAULT_MIN_BOXES
@ NVDSPOSTPROCESS_SUCCESS
operation succeeded.
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
constexpr float DEFAULT_POST_CLUSTER_THRESHOLD
unsigned int width
Holds the width of the output.
unsigned int attributeValue
Holds the the attribute's output value.
unsigned int mask_width
Holds width of mask.
unsigned int detectionMaxHeight
std::vector< float > perClassPreclusterThreshold
Holds a per-class vector of detection confidence thresholds to be applied prior to the clustering ope...
unsigned int detectionMaxHeight
constexpr float DEFAULT_EPS
int classIndex
Holds the index for the object's class.
float top
Holds the object's offset from the top boundary of the frame.
float width
Holds the width of the object's bounding box.
float eps
Holds the epsilon to control merging of overlapping boxes.
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
NvDsPostProcessDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
NvDsPostProcessBodyPoseOutput bodyPoseOutput
Holds classifier output.
NvDsPostProcessObjectInfo cached_info
Cached object information.
Holds the cached information of an object.
char * label
Holds a pointer to a string containing a label for the classified output.
unsigned int detectionMinWidth
unsigned int uniqueID
Holds a unique identifier for the instance.
Holds information on all objects detected by a detector network in one frame.
@ NVDSPOSTPROCESS_CLUSTER_NONE
float top
Holds the vertical offset of the object's bounding box.
NvDsPostProcessStatus
Enum for the status codes returned by NvDsPostProcessAlgorithm.
constexpr float DEFAULT_DBSCAN_MIN_SCORE
unsigned int mask_height
Holds height of mask.
Holds information about one parsed object and instance mask from a detector's output.
@ NVDSPOSTPROCESS_OUTPUT_PARSING_FAILED
Output parsing failed.
unsigned int detectionMinWidth
float * mask
Holds object segment mask.
@ NVDSPOSTPROCESS_CLUSTER_DBSCAN_NMS_HYBRID
const char * safeStr(const std::string &str)
Holds the bounding box coloring information for one class;.
@ NvDsPostProcessTensorOrder_kNCHW
constexpr int DEFAULT_GROUP_THRESHOLD
constexpr int PROCESS_MODEL_OBJECTS
float nmsIOUThreshold
IOU threshold to be used with NMS mode of clustering.
int * class_map
Holds a pointer to an array for the 2D pixel class map.
char * attributeLabel
Holds a pointer to a string containing the attribute's label.
unsigned int numHostBuffers
Holds the number of elements in hostBuffers.
float top
Holds the vertical offset of the object's bounding box.
unsigned long last_inferred_frame_num
Number of the frame in the stream when the object was last inferred on.
float detectionConfidence
Holds the object detection confidence level; must in the range [0.0,1.0].
float attributeConfidence
Holds the attribute's confidence level.
float segmentationThreshold
@ NVDSPOSTPROCESS_CUSTOM_LIB_FAILED
Custom Library interface implementation failed.
unsigned int height
Holds the height of the output.
@ NVDSPOSTPROCESS_CLUSTER_DBSCAN
char * label
Holds a pointer to a string containing a label for the object.
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
NvDsPostProcessNetworkType outputType
Holds an output type indicating the valid member in the union of detectionOutput, classificationOutpu...
float postClusterThreshold
Hold the bounding box detection threshold to be applied post clustering operation.
constexpr float DEFAULT_PRE_CLUSTER_THRESHOLD
NvDsPostProcessClusterMode
Enum for clustering mode for detectors.
float width
Holds the width of the object's bounding box.
@ NvDsPostProcessNetworkType_Detector
Specifies a detector.
unsigned long last_accessed_frame_num
Number of the frame in the stream when the object was last accessed.
struct NvDsPoint3f NvDsPoint3f
NvDsPostProcessObject * objects
Holds a pointer to an array of objects.
Holds the initialization parameters required for the NvDsPostProcessContext interface.
char customClassifierParseFuncName[_MAX_STR_LENGTH]
Name of the custom classifier attribute parsing function in the custom library.
@ NVDSPOSTPROCESS_CLUSTER_GROUP_RECTANGLES
unsigned int roiTopOffset
float left
Holds the horizontal offset of the bounding box shape for the object.
Holds the information inferred by the network on one frame.
@ NVDSPOSTPROCESS_INVALID_PARAMS
Invalid parameters were supplied.
void ** outputDeviceBuffers
Holds a pointer to an array of pointers to output device buffers for this batch.
unsigned int mask_size
Holds size of mask in bytes.
unsigned int num_key_points
@ NVDSPOSTPROCESS_LOG_ERROR
Holds the dimensions of a three-dimensional layer.
constexpr bool ATHR_ENABLED
NvDsPostProcessNetworkType networkType
Holds the network type.
@ NvDsPostProcessNetworkType_Segmentation
Specifies a segmentation network.
unsigned int numObjects
Holds the number of objects in objects.
float preClusterThreshold
Holds the bounding box detection threshold to be applied prior to clustering operation.
unsigned int detectionMaxWidth
@ NvDsPostProcessTensorOrder_kNHWC
char ** outputLayerNames
Holds a pointer to an array of pointers to output layer names.
NvDsPostProcessTensorOrder segmentationOutputOrder
Holds output order for segmentation network.
Holds information parsed from segmentation network output for one frame.
constexpr float ATHR_THRESHOLD
unsigned int mask_size
Holds size of mask in bytes.
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.
constexpr int DEFAULT_TOP_K
int groupThreshold
Holds the minimum number boxes in a cluster to be considered an object during grouping using OpenCV g...
unsigned int numAttributes
Holds the size of the attributes array.
unsigned int detectionMaxWidth
unsigned int mask_height
Holds height of mask.
unsigned int roiBottomOffset
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch.
@ NvDsPostProcessNetworkType_BodyPose
Bodypose 3D.
@ NVDSPOSTPROCESS_UNKNOWN_ERROR
Unknown error was encountered.
gboolean preprocessor_support
Holds boolean value to show whether preprocessor support is there.
NvDsPostProcessTensorOrder
Defines UFF layer orders.
unsigned int mask_width
Holds width of mask.
@ NVDSPOSTPROCESS_LOG_WARNING
unsigned int height
Holds the height of the output.
NvDsPostProcessClassificationOutput classificationOutput
Holds classifier output.
Holds the color parameters of the box or text to be overlayed.
NvOSD_ColorParams border_color
Holds the inference information/history for one object based on it's tracking id.
float height
Holds the object's height.
constexpr int PROCESS_MODEL_FULL_FRAME
@ NvDsPostProcessTensorOrder_kNC
int minBoxes
Holds the minimum number of boxes in a cluster to be considered an object during grouping using DBSCA...
NvDsPostProcessSegmentationOutput segmentationOutput
Holds classifier output.
unsigned int detectionMinHeight
std::vector< float > perClassPostclusterThreshold
@ NvDsPostProcessNetworkType_Classifier
Specifies a classifier.
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
unsigned int attributeIndex
Holds the index of the attribute's label.
struct _NvDsPostProcessObjectHistory NvDsPostProcessObjectHistory
Holds the inference information/history for one object based on it's tracking id.
NvDsPostProcessAttribute * attributes
Holds a pointer to an array of attributes.
unsigned int roiTopOffset
float left
Holds the object's offset from the left boundary of the frame.
@ NVDSPOSTPROCESS_LOG_INFO
@ NVDSPOSTPROCESS_RESOURCE_ERROR
Resource error was encountered.
int topK
Number of objects with objects to be filtered in the decensding order of probability.
Holds information on all attributes classifed by a classifier network for one frame.
float minScore
Minimum score in a cluster for the cluster to be considered an object during grouping.
float height
Holds the height of the object's bounding box.
float * class_probability_map
Holds a pointer to an array containing raw probabilities.
NvDsPostProcessObjectInfo()=default
@ NvDsPostProcessNetworkType_Other
Specifies other.
NvDsPostProcessDetectionOutput detectionOutput
Holds detector output.
unsigned int numClassesConfigured
Holds the number of classes requested to be parsed, starting with class ID 0.
unsigned int classId
Holds the ID of the class to which the object belongs.
unsigned int width
Holds the width of the output.
unsigned int numOutputLayers
Holds the number of output layer names.
@ NVDSPOSTPROCESS_CLUSTER_NMS
@ NVDSPOSTPROCESS_CONFIG_FAILED
Failed to configure the instance possibly due to an erroneous initialization property.
@ NVDSPOSTPROCESS_LOG_DEBUG
unsigned int classes
Holds the number of classes supported by the 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.
@ NvDsPostProcessNetworkType_InstanceSegmentation
Specifies a instance segmentation network.
bool string_empty(const char *str)
constexpr float DEFAULT_NMS_IOU_THRESHOLD
float width
Holds the object's width.
@ NVDSPOSTPROCESS_CUDA_ERROR
CUDA error was encountered.