120 #ifndef _NVDSINFER_CUSTOM_IMPL_H_ 
  121 #define _NVDSINFER_CUSTOM_IMPL_H_ 
  126 #pragma GCC diagnostic push 
  127 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 
  128 #include "NvCaffeParser.h" 
  129 #include "NvUffParser.h" 
  130 #pragma GCC diagnostic pop 
  151     IModelParser() = 
default;
 
  154     virtual ~IModelParser() = 
default;
 
  165         nvinfer1::INetworkDefinition& network) = 0;
 
  170     virtual bool hasFullDimsSupported() 
const = 0;
 
  176     virtual const char* getModelName() 
const = 0;
 
  209   std::vector<float> &perClassThreshold = perClassPreclusterThreshold;
 
  224         std::vector<NvDsInferLayerInfo> 
const &outputLayersInfo,
 
  227         std::vector<NvDsInferObjectDetectionInfo> &objectList);
 
  233 #define CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(customParseFunc) \ 
  234     static void checkFunc_ ## customParseFunc (NvDsInferParseCustomFunc func = customParseFunc) \ 
  235         { checkFunc_ ## customParseFunc (); }; \ 
  236     extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \ 
  237            NvDsInferNetworkInfo  const &networkInfo, \ 
  238            NvDsInferParseDetectionParams const &detectionParams, \ 
  239            std::vector<NvDsInferObjectDetectionInfo> &objectList); 
  255         std::vector<NvDsInferLayerInfo> 
const &outputLayersInfo,
 
  257         float classifierThreshold,
 
  258         std::vector<NvDsInferAttribute> &attrList,
 
  259         std::string &descString);
 
  265 #define CHECK_CUSTOM_CLASSIFIER_PARSE_FUNC_PROTOTYPE(customParseFunc) \ 
  266     static void checkFunc_ ## customParseFunc (NvDsInferClassiferParseCustomFunc func = customParseFunc) \ 
  267         { checkFunc_ ## customParseFunc (); }; \ 
  268     extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \ 
  269            NvDsInferNetworkInfo  const &networkInfo, \ 
  270            float classifierThreshold, \ 
  271            std::vector<NvDsInferAttribute> &attrList, \ 
  272            std::string &descString); 
  307         nvinfer1::IBuilder * 
const builder,
 
  309         nvinfer1::DataType dataType,
 
  310         nvinfer1::ICudaEngine *& cudaEngine);
 
  316 #define CHECK_CUSTOM_ENGINE_CREATE_FUNC_PROTOTYPE(customEngineCreateFunc) \ 
  317     static void checkFunc_ ## customEngineCreateFunc (NvDsInferEngineCreateCustomFunc = customEngineCreateFunc) \ 
  318         { checkFunc_ ## customEngineCreateFunc(); }; \ 
  319     extern "C" bool customEngineCreateFunc (  \ 
  320         nvinfer1::IBuilder * const builder,  \ 
  321         const NvDsInferContextInitParams const *initParams, \ 
  322         nvinfer1::DataType dataType, \ 
  323         nvinfer1::ICudaEngine *& cudaEngine); 
  460         nvinfer1::DataType dataType,
 
  461         nvinfer1::ICudaEngine *& cudaEngine)
 
  462         __attribute__((deprecated(
"Use 'engine-create-func-name' config parameter instead")));
 
unsigned int maxBatchSize
Holds the maximum number of frames to be inferred together in a batch. 
 
std::vector< float > perClassPreclusterThreshold
Holds a per-class vector of detection confidence thresholds to be applied prior to clustering operati...
 
nvcaffeparser1::IPluginFactory * pluginFactory
 
void NvDsInferPluginFactoryRuntimeDestroy(nvinfer1::IPluginFactory *pluginFactory)
Destroys a Plugin Factory instance created by NvDsInferPluginFactoryRuntimeGet(). ...
 
Holds the initialization parameters required for the NvDsInferContext interface. 
 
Holds the detection parameters required for parsing objects. 
 
void NvDsInferPluginFactoryUffDestroy(NvDsInferPluginFactoryUff &pluginFactory)
Destroys a Plugin Factory instance created by NvDsInferPluginFactoryUffGet(). 
 
Specifies nvcaffeparser1::IPluginFactoryExt or nvuffparser::IPluginFactoryExt. 
 
bool NvDsInferPluginFactoryRuntimeGet(nvinfer1::IPluginFactory *&pluginFactory)
Returns a new instance of a Plugin Factory interface to be used during parsing deserialization of CUD...
 
Specifies nvcaffeparser1::IPluginFactory or nvuffparser::IPluginFactory. 
 
Copyright (c) 2017-2020, NVIDIA CORPORATION. 
 
NvDsInferPluginFactoryType
Specifies the type of the Plugin Factory. 
 
Holds a pointer to a heap-allocated Plugin Factory object required during UFF model parsing...
 
bool(* NvDsInferParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, NvDsInferParseDetectionParams const &detectionParams, std::vector< NvDsInferObjectDetectionInfo > &objectList)
Type definition for the custom bounding box parsing function. 
 
bool NvDsInferCudaEngineGet(nvinfer1::IBuilder *builder, NvDsInferContextInitParams *initParams, nvinfer1::DataType dataType, nvinfer1::ICudaEngine *&cudaEngine) __attribute__((deprecated("Use 'engine-create-func-name' config parameter instead")))
The NvDsInferCudaEngineGet interface has been deprecated and has been replaced by NvDsInferEngineCrea...
 
Specifies nvcaffeparser1::IPluginFactoryV2. 
 
Holds a pointer to a heap-allocated Plugin Factory object required during Caffe model parsing...
 
bool NvDsInferPluginFactoryUffGet(NvDsInferPluginFactoryUff &pluginFactory, NvDsInferPluginFactoryType &type)
Returns a new instance of a Plugin Factory interface to be used during parsing of UFF models...
 
bool(* NvDsInferEngineCreateCustomFunc)(nvinfer1::IBuilder *const builder, const NvDsInferContextInitParams *const initParams, nvinfer1::DataType dataType, nvinfer1::ICudaEngine *&cudaEngine)
Type definition for functions that build and return a CudaEngine for custom models. 
 
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext. 
 
unsigned int numClassesConfigured
Holds the number of classes requested to be parsed, starting with class ID 0. 
 
nvuffparser::IPluginFactoryExt * pluginFactoryExt
 
bool(* NvDsInferClassiferParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, float classifierThreshold, std::vector< NvDsInferAttribute > &attrList, std::string &descString)
Type definition for the custom classifier output parsing function. 
 
IModelParser * NvDsInferCreateModelParser(const NvDsInferContextInitParams *initParams)
Create a customized neural network parser for user-defined models. 
 
bool NvDsInferInitializeInputLayers(std::vector< NvDsInferLayerInfo > const &inputLayersInfo, NvDsInferNetworkInfo const &networkInfo, unsigned int maxBatchSize)
Initializes the input layers for inference. 
 
Holds information about the model network. 
 
bool NvDsInferPluginFactoryCaffeGet(NvDsInferPluginFactoryCaffe &pluginFactory, NvDsInferPluginFactoryType &type)
Gets a new instance of a Plugin Factory interface to be used during parsing of Caffe models...
 
std::vector< float > perClassPostclusterThreshold
 
nvcaffeparser1::IPluginFactoryExt * pluginFactoryExt
 
nvuffparser::IPluginFactory * pluginFactory
 
void NvDsInferPluginFactoryCaffeDestroy(NvDsInferPluginFactoryCaffe &pluginFactory)
Destroys a Plugin Factory instance created by NvDsInferPluginFactoryCaffeGet(). 
 
nvcaffeparser1::IPluginFactoryV2 * pluginFactoryV2