|
NVIDIA DeepStream SDK API Reference
|
7.1 Release
|
Go to the documentation of this file.
24 #ifndef __POSTPROCESSLIB_HPP__
25 #define __POSTPROCESSLIB_HPP__
28 #include <cuda_runtime.h>
32 #include "post_processor_bodypose.h"
37 #define FORMAT_NV12 "NV12"
38 #define FORMAT_RGBA "RGBA"
39 #define FORMAT_I420 "I420"
40 #define GST_CAPS_FEATURE_MEMORY_NVMM "memory:NVMM"
66 m_preprocessor_support = FALSE;
69 m_outputThread =
new std::thread(&PostProcessAlgorithm::OutputThread,
this);
102 m_initParams.
gpuID = 0;
121 std::vector<std::string>
SplitString (std::string input);
125 bool GetAbsFilePath (
const gchar * cfg_file_path,
const gchar * file_path,
138 void OutputThread(
void);
143 bool ParseLabelsFile(
const std::string& labelsFilePath);
149 gfloat m_classifierThreshold;
150 gfloat m_segmentationThreshold;
151 gint m_numDetectedClasses;
152 gint m_processMode = 1;
153 guint m_gieUniqueId = 0;
154 gboolean m_isClassifier = 0;
155 gboolean m_releaseTensorMeta = FALSE;
156 gboolean m_outputInstanceMask = FALSE;
157 gboolean m_preprocessor_support = FALSE;
158 std::string m_classifierType;
159 std::set <gint> m_filterOutClassIds;
160 std::set <gint> m_operateOnClassIds;
161 std::vector <std::string> m_outputBlobNames;
163 std::vector<NvDsPostProcessInstanceMaskInfo> m_InstanceMaskList;
164 std::unordered_map <gint, NvDsPostProcessDetectionParams> m_detectorClassAttr;
166 std::vector<std::vector<NvDsPostProcessInstanceMaskInfo>> m_PerClassInstanceMaskList;
167 std::vector<std::vector<std::string>> m_Labels;
169 std::unique_ptr<ModelPostProcessor> m_Postprocessor;
PostProcessAlgorithm(DSPostProcess_CreateParams *createParams)
std::vector< Property > m_vectorProperty
NvDsPostProcessClusterMode clusterMode
Holds the type of clustering mode.
char labelsFilePath[_PATH_MAX]
Holds the pathname of the labels file containing strings for the class labels.
char customBBoxInstanceMaskParseFuncName[_MAX_STR_LENGTH]
Holds the name of the bounding box and instance mask parse function in the custom library.
float classifierThreshold
Holds the minimum confidence threshold for the classifier to consider a label valid.
NvDsInferDimsCHW inferInputDims
Inference input dimensions for runtime engine.
virtual bool HandleEvent(GstEvent *event)
Holds detection and bounding box grouping parameters.
NvDsPostProcessNetworkType
Defines network types.
Holds information about batched buffers.
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
NvDsPostProcessDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
unsigned int uniqueID
Holds a unique identifier for the instance.
NvDsPostProcessStatus
Enum for the status codes returned by NvDsPostProcessAlgorithm.
cudaStream_t m_cudaStream
bool GetAbsFilePath(const gchar *cfg_file_path, const gchar *file_path, char *abs_path_str)
cudaStream_t m_cudaStream
bool m_preprocessor_support
GstBaseTransform * m_element
float segmentationThreshold
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
virtual bool SetConfigFile(const gchar *config_file)
std::queue< PacketInfo > m_processQ
NvDsPostProcessClusterMode
Enum for clustering mode for detectors.
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.
guint m_gpuId
GPU ID on which we expect to execute the algorithm.
GstBaseTransform * m_element
bool outputthread_stopped
NvDsPostProcessNetworkType networkType
Holds the network type.
char ** outputLayerNames
Holds a pointer to an array of pointers to output layer names.
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch.
gboolean preprocessor_support
Holds boolean value to show whether preprocessor support is there.
std::set< gint > SplitStringInt(std::string input)
struct _GstBuffer GstBuffer
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
std::thread * m_outputThread
@ NvDsPostProcessNetworkType_Other
Specifies other.
unsigned int numOutputLayers
Holds the number of output layer names.
@ NVDSPOSTPROCESS_CLUSTER_NMS
virtual BufferResult ProcessBuffer(GstBuffer *inbuf)
IDSPostProcessLibrary * CreateCustomAlgoCtx(DSPostProcess_CreateParams *params)
std::vector< std::string > SplitString(std::string input)
std::condition_variable m_processCV