|
NVIDIA DeepStream SDK API Reference
|
6.4 Release
|
Go to the documentation of this file.
24 #ifndef __POSTPROCESSLIB_HPP__
25 #define __POSTPROCESSLIB_HPP__
28 #include <cuda_runtime.h>
36 #define FORMAT_NV12 "NV12"
37 #define FORMAT_RGBA "RGBA"
38 #define FORMAT_I420 "I420"
39 #define GST_CAPS_FEATURE_MEMORY_NVMM "memory:NVMM"
65 m_outputThread =
new std::thread(&PostProcessAlgorithm::OutputThread,
this);
98 m_initParams.
gpuID = 0;
117 std::vector<std::string>
SplitString (std::string input);
121 bool GetAbsFilePath (
const gchar * cfg_file_path,
const gchar * file_path,
134 void OutputThread(
void);
139 bool ParseLabelsFile(
const std::string& labelsFilePath);
145 gfloat m_classifierThreshold;
146 gfloat m_segmentationThreshold;
147 gint m_numDetectedClasses;
148 gint m_processMode = 1;
149 guint m_gieUniqueId = 0;
150 gboolean m_isClassifier = 0;
151 gboolean m_releaseTensorMeta = FALSE;
152 gboolean m_outputInstanceMask = FALSE;
153 std::string m_classifierType;
154 std::set <gint> m_filterOutClassIds;
155 std::set <gint> m_operateOnClassIds;
156 std::vector <std::string> m_outputBlobNames;
158 std::vector<NvDsPostProcessInstanceMaskInfo> m_InstanceMaskList;
159 std::unordered_map <gint, NvDsPostProcessDetectionParams> m_detectorClassAttr;
161 std::vector<std::vector<NvDsPostProcessInstanceMaskInfo>> m_PerClassInstanceMaskList;
162 std::vector<std::vector<std::string>> m_Labels;
164 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.
BufferResult
Copyright (c) 2023, NVIDIA CORPORATION.
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
Copyright (c) 2022, NVIDIA CORPORATION.
bool GetAbsFilePath(const gchar *cfg_file_path, const gchar *file_path, char *abs_path_str)
cudaStream_t m_cudaStream
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.
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