110 #ifndef _NVDSINFER_CUSTOM_IMPL_H_
111 #define _NVDSINFER_CUSTOM_IMPL_H_
115 #include "NvCaffeParser.h"
116 #include "NvUffParser.h"
149 std::vector<NvDsInferLayerInfo>
const &outputLayersInfo,
152 std::vector<NvDsInferObjectDetectionInfo> &objectList);
158 #define CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(customParseFunc) \
159 static void checkFunc_ ## customParseFunc (NvDsInferParseCustomFunc func = customParseFunc) \
160 { checkFunc_ ## customParseFunc (); }; \
161 extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \
162 NvDsInferNetworkInfo const &networkInfo, \
163 NvDsInferParseDetectionParams const &detectionParams, \
164 std::vector<NvDsInferObjectDetectionInfo> &objectList);
179 std::vector<NvDsInferLayerInfo>
const &outputLayersInfo,
181 float classifierThreshold,
182 std::vector<NvDsInferAttribute> &attrList,
183 std::string &descString);
189 #define CHECK_CUSTOM_CLASSIFIER_PARSE_FUNC_PROTOTYPE(customParseFunc) \
190 static void checkFunc_ ## customParseFunc (NvDsInferClassiferParseCustomFunc func = customParseFunc) \
191 { checkFunc_ ## customParseFunc (); }; \
192 extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \
193 NvDsInferNetworkInfo const &networkInfo, \
194 float classifierThreshold, \
195 std::vector<NvDsInferAttribute> &attrList, \
196 std::string &descString);
320 unsigned int maxBatchSize);
349 nvinfer1::DataType dataType,
350 nvinfer1::ICudaEngine *& cudaEngine);
nvcaffeparser1::IPluginFactory * pluginFactory
Holds the initialization parameters required for the NvDsInferContext interface.
bool NvDsInferInitializeInputLayers(std::vector< NvDsInferLayerInfo > const &inputLayersInfo, NvDsInferNetworkInfo const &networkInfo, unsigned int maxBatchSize)
Initialize the input layers for inference.
Holds the detection parameters required for parsing objects.
bool NvDsInferCudaEngineGet(nvinfer1::IBuilder *builder, NvDsInferContextInitParams *initParams, nvinfer1::DataType dataType, nvinfer1::ICudaEngine *&cudaEngine)
Build and return CudaEngine for custom models.
void NvDsInferPluginFactoryUffDestroy(NvDsInferPluginFactoryUff &pluginFactory)
Destroy the Plugin Factory instance returned in NvDsInferPluginFactoryUffGet
bool NvDsInferPluginFactoryRuntimeGet(nvinfer1::IPluginFactory *&pluginFactory)
Returns an instance of a newly allocated Plugin Factory interface to be used during parsing deseriali...
std::vector< float > perClassThreshold
Per class detection confidence threshold.
NVIDIA DeepStream inference specifications
Holds the pointer to a heap allocated Plugin Factory object required during UFF model parsing...
NvDsInferPluginFactoryType
Specifies the type of the Plugin Factory.
bool(* NvDsInferParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, NvDsInferParseDetectionParams const &detectionParams, std::vector< NvDsInferObjectDetectionInfo > &objectList)
Function definition for the custom bounding box parsing function.
void NvDsInferPluginFactoryRuntimeDestroy(nvinfer1::IPluginFactory *pluginFactory)
Destroy the PluginFactory instance returned in NvDsInferPluginFactoryRuntimeGet
bool NvDsInferPluginFactoryUffGet(NvDsInferPluginFactoryUff &pluginFactory, NvDsInferPluginFactoryType &type)
Returns an instance of a newly allocated Plugin Factory interface to be used during parsing of UFF mo...
Holds the pointer to a heap allocated Plugin Factory object required during Caffemodel parsing...
bool(* NvDsInferClassiferParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, float classifierThreshold, std::vector< NvDsInferAttribute > &attrList, std::string &descString)
Function definition for the custom classifier output parsing function.
unsigned int numClassesConfigured
Number of classes requested to be parsed starting with classID 0.
nvuffparser::IPluginFactoryExt * pluginFactoryExt
nvcaffeparser1::IPluginFactory / nvuffparser::IPluginFactory
bool NvDsInferPluginFactoryCaffeGet(NvDsInferPluginFactoryCaffe &pluginFactory, NvDsInferPluginFactoryType &type)
Returns an instance of a newly allocated Plugin Factory interface to be used during parsing of caffe ...
Holds information about the model network.
nvcaffeparser1::IPluginFactoryExt * pluginFactoryExt
nvuffparser::IPluginFactory * pluginFactory
nvcaffeparser1::IPluginFactoryExt / nvuffparser::IPluginFactoryExt
void NvDsInferPluginFactoryCaffeDestroy(NvDsInferPluginFactoryCaffe &pluginFactory)
Destroy the Plugin Factory instance returned in NvDsInferPluginFactoryCaffeGet
nvcaffeparser1::IPluginFactoryV2 * pluginFactoryV2