|
|
NVIDIA DeepStream SDK API Reference
|
9.1 Release
|
Go to the documentation of this file.
18 #ifndef __POSTPROCESSLIB_HPP__
19 #define __POSTPROCESSLIB_HPP__
22 #include <cuda_runtime.h>
29 #include "nvdspostprocesslib_base.hpp"
31 #define FORMAT_NV12 "NV12"
32 #define FORMAT_RGBA "RGBA"
33 #define FORMAT_I420 "I420"
34 #define GST_CAPS_FEATURE_MEMORY_NVMM "memory:NVMM"
60 m_preprocessor_support = FALSE;
63 m_outputThread =
new std::thread(&PostProcessAlgorithm::OutputThread,
this);
96 m_initParams.
gpuID = 0;
115 std::vector<std::string>
SplitString (std::string input);
119 bool GetAbsFilePath (
const gchar * cfg_file_path,
const gchar * file_path,
132 void OutputThread(
void);
137 bool ParseLabelsFile(
const std::string& labelsFilePath);
143 gfloat m_classifierThreshold;
144 gfloat m_segmentationThreshold;
145 gint m_numDetectedClasses;
146 gint m_processMode = 1;
147 guint m_gieUniqueId = 0;
148 gboolean m_isClassifier = 0;
149 gboolean m_releaseTensorMeta = FALSE;
150 gboolean m_outputInstanceMask = FALSE;
151 gboolean m_preprocessor_support = FALSE;
152 std::string m_classifierType;
153 std::set <gint> m_filterOutClassIds;
154 std::set <gint> m_operateOnClassIds;
155 std::vector <std::string> m_outputBlobNames;
157 std::vector<NvDsPostProcessInstanceMaskInfo> m_InstanceMaskList;
158 std::unordered_map <gint, NvDsPostProcessDetectionParams> m_detectorClassAttr;
160 std::vector<std::vector<NvDsPostProcessInstanceMaskInfo>> m_PerClassInstanceMaskList;
161 std::vector<std::vector<std::string>> m_Labels;
163 std::unique_ptr<ModelPostProcessor> m_Postprocessor;
PostProcessAlgorithm(DSPostProcess_CreateParams *createParams)
NvDsPostProcessClusterMode clusterMode
Holds the type of clustering mode.
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.
Holds information about batched buffers.
char customBBoxParseFuncName[_MAX_STR_LENGTH]
Holds the name of the custom bounding box function in the custom library.
unsigned int numDetectedClasses
Holds the number of classes detected by a detector network.
NvDsPostProcessClusterMode
Enum for clustering mode for detectors.
NvDsPostProcessNetworkType
Defines network types.
unsigned int uniqueID
Holds a unique identifier for the instance.
NvDsPostProcessStatus
Enum for the status codes returned by NvDsPostProcessAlgorithm.
IDSPostProcessLibrary * CreateCustomAlgoCtx(DSPostProcess_CreateParams *params)
std::queue< PacketInfo > m_processQ
cudaStream_t m_cudaStream
bool GetAbsFilePath(const gchar *cfg_file_path, const gchar *file_path, char *abs_path_str)
NvDsPostProcessDetectionParams * perClassDetectionParams
Holds per-class detection parameters.
GstBaseTransform * m_element
cudaStream_t m_cudaStream
bool m_preprocessor_support
float segmentationThreshold
unsigned int gpuID
Holds the ID of the GPU which is to run the inference.
virtual bool SetConfigFile(const gchar *config_file)
char customClassifierParseFuncName[_MAX_STR_LENGTH]
Name of the custom classifier attribute parsing function in the custom library.
Holds the initialization parameters required for the NvDsPostProcessContext interface.
std::thread * m_outputThread
guint m_gpuId
GPU ID on which we expect to execute the algorithm.
bool outputthread_stopped
NvDsPostProcessNetworkType networkType
Holds the network type.
char customBBoxInstanceMaskParseFuncName[_MAX_STR_LENGTH]
Holds the name of the bounding box and instance mask parse function in the custom library.
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.
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.
std::set< gint > SplitStringInt(std::string input)
std::vector< Property > m_vectorProperty
@ NvDsPostProcessNetworkType_Other
Specifies other.
GstBaseTransform * m_element
unsigned int numOutputLayers
Holds the number of output layer names.
virtual BufferResult ProcessBuffer(GstBuffer *inbuf)
@ NVDSPOSTPROCESS_CLUSTER_NMS
std::vector< std::string > SplitString(std::string input)
struct _GstBuffer GstBuffer
std::condition_variable m_processCV