NVIDIA DeepStream SDK API Reference

6.4 Release
nvdsinfer::InferPostprocessor Class Referenceabstract

Detailed Description

Base class for post-processing on inference output.

Definition at line 116 of file nvdsinfer_context_impl.h.

Inheritance diagram for nvdsinfer::InferPostprocessor:
Collaboration diagram for nvdsinfer::InferPostprocessor:

Public Member Functions

virtual ~InferPostprocessor ()
 
void setDlHandle (const std::shared_ptr< DlLibHandle > &dlHandle)
 
void setNetworkInfo (const NvDsInferNetworkInfo &info)
 
void setAllLayerInfo (std::vector< NvDsInferBatchDimsLayerInfo > &info)
 
void setOutputLayerInfo (std::vector< NvDsInferBatchDimsLayerInfo > &info)
 
void setLoggingFunc (const NvDsInferLoggingFunc &func)
 
const std::vector< std::vector< std::string > > & getLabels () const
 
bool needInputCopy () const
 
bool needOutputCopyB4Processing () const
 
virtual NvDsInferStatus initResource (const NvDsInferContextInitParams &initParams)
 
virtual NvDsInferStatus copyBuffersToHostMemory (NvDsInferBatch &buffer, CudaStream &mainStream)
 
virtual NvDsInferStatus postProcessHost (NvDsInferBatch &buffer, NvDsInferContextBatchOutput &output)
 
void freeBatchOutput (NvDsInferContextBatchOutput &batchOutput)
 

Protected Member Functions

 InferPostprocessor (NvDsInferNetworkType type, int id, int gpuId)
 
NvDsInferStatus parseLabelsFile (const std::string &path)
 
NvDsInferStatus allocDeviceResource ()
 
void releaseFrameOutput (NvDsInferFrameOutput &frameOutput)
 

Protected Attributes

NvDsInferNetworkType m_NetworkType = NvDsInferNetworkType_Other
 
int m_UniqueID = 0
 
uint32_t m_GpuID = 0
 
NvDsInferLoggingFunc m_LoggingFunc
 
std::shared_ptr< DlLibHandlem_CustomLibHandle
 
bool m_CopyInputToHostBuffers = false
 
bool m_disableOutputHostCopy = false
 
bool m_DumpOpTensor = false
 
std::vector< std::pair< std::string, std::string > > m_DumpOpTensorFiles
 
bool m_OverwriteOpTensor = false
 
std::vector< std::pair< std::string, int > > m_OverwriteOpTensorFilePairs
 
std::vector< std::ifstream * > m_OverwriteOpTensorFiles
 
NvDsInferNetworkInfo m_NetworkInfo = {0}
 
std::vector< NvDsInferLayerInfom_AllLayerInfo
 
std::vector< NvDsInferLayerInfom_OutputLayerInfo
 
std::vector< std::vector< std::string > > m_Labels
 

Constructor & Destructor Documentation

◆ InferPostprocessor()

nvdsinfer::InferPostprocessor::InferPostprocessor ( NvDsInferNetworkType  type,
int  id,
int  gpuId 
)
inlineprotected

Definition at line 119 of file nvdsinfer_context_impl.h.

◆ ~InferPostprocessor()

virtual nvdsinfer::InferPostprocessor::~InferPostprocessor ( )
virtual

Member Function Documentation

◆ allocDeviceResource()

NvDsInferStatus nvdsinfer::InferPostprocessor::allocDeviceResource ( )
protected

◆ copyBuffersToHostMemory()

virtual NvDsInferStatus nvdsinfer::InferPostprocessor::copyBuffersToHostMemory ( NvDsInferBatch buffer,
CudaStream mainStream 
)
virtual

◆ freeBatchOutput()

void nvdsinfer::InferPostprocessor::freeBatchOutput ( NvDsInferContextBatchOutput batchOutput)

◆ getLabels()

const std::vector<std::vector<std::string> >& nvdsinfer::InferPostprocessor::getLabels ( ) const
inline

Definition at line 146 of file nvdsinfer_context_impl.h.

References m_Labels.

◆ initResource()

◆ needInputCopy()

bool nvdsinfer::InferPostprocessor::needInputCopy ( ) const
inline

Definition at line 150 of file nvdsinfer_context_impl.h.

References m_CopyInputToHostBuffers.

◆ needOutputCopyB4Processing()

bool nvdsinfer::InferPostprocessor::needOutputCopyB4Processing ( ) const
inline

Definition at line 152 of file nvdsinfer_context_impl.h.

References m_disableOutputHostCopy.

◆ parseLabelsFile()

NvDsInferStatus nvdsinfer::InferPostprocessor::parseLabelsFile ( const std::string &  path)
protected

◆ postProcessHost()

virtual NvDsInferStatus nvdsinfer::InferPostprocessor::postProcessHost ( NvDsInferBatch buffer,
NvDsInferContextBatchOutput output 
)
virtual

◆ releaseFrameOutput()

void nvdsinfer::InferPostprocessor::releaseFrameOutput ( NvDsInferFrameOutput frameOutput)
protected

◆ setAllLayerInfo()

void nvdsinfer::InferPostprocessor::setAllLayerInfo ( std::vector< NvDsInferBatchDimsLayerInfo > &  info)
inline

Definition at line 132 of file nvdsinfer_context_impl.h.

References m_AllLayerInfo.

◆ setDlHandle()

void nvdsinfer::InferPostprocessor::setDlHandle ( const std::shared_ptr< DlLibHandle > &  dlHandle)
inline

Definition at line 124 of file nvdsinfer_context_impl.h.

References m_CustomLibHandle.

◆ setLoggingFunc()

void nvdsinfer::InferPostprocessor::setLoggingFunc ( const NvDsInferLoggingFunc func)
inline

Definition at line 142 of file nvdsinfer_context_impl.h.

References m_LoggingFunc.

◆ setNetworkInfo()

void nvdsinfer::InferPostprocessor::setNetworkInfo ( const NvDsInferNetworkInfo info)
inline

Definition at line 128 of file nvdsinfer_context_impl.h.

References m_NetworkInfo.

◆ setOutputLayerInfo()

void nvdsinfer::InferPostprocessor::setOutputLayerInfo ( std::vector< NvDsInferBatchDimsLayerInfo > &  info)
inline

Definition at line 137 of file nvdsinfer_context_impl.h.

References m_OutputLayerInfo.

Field Documentation

◆ m_AllLayerInfo

std::vector<NvDsInferLayerInfo> nvdsinfer::InferPostprocessor::m_AllLayerInfo
protected

Definition at line 199 of file nvdsinfer_context_impl.h.

Referenced by setAllLayerInfo().

◆ m_CopyInputToHostBuffers

bool nvdsinfer::InferPostprocessor::m_CopyInputToHostBuffers = false
protected

Definition at line 190 of file nvdsinfer_context_impl.h.

Referenced by needInputCopy().

◆ m_CustomLibHandle

std::shared_ptr<DlLibHandle> nvdsinfer::InferPostprocessor::m_CustomLibHandle
protected

Definition at line 189 of file nvdsinfer_context_impl.h.

Referenced by setDlHandle().

◆ m_disableOutputHostCopy

bool nvdsinfer::InferPostprocessor::m_disableOutputHostCopy = false
protected

Definition at line 191 of file nvdsinfer_context_impl.h.

Referenced by needOutputCopyB4Processing().

◆ m_DumpOpTensor

bool nvdsinfer::InferPostprocessor::m_DumpOpTensor = false
protected

Definition at line 192 of file nvdsinfer_context_impl.h.

◆ m_DumpOpTensorFiles

std::vector<std::pair<std::string, std::string> > nvdsinfer::InferPostprocessor::m_DumpOpTensorFiles
protected

Definition at line 193 of file nvdsinfer_context_impl.h.

◆ m_GpuID

uint32_t nvdsinfer::InferPostprocessor::m_GpuID = 0
protected

Definition at line 185 of file nvdsinfer_context_impl.h.

◆ m_Labels

std::vector<std::vector<std::string> > nvdsinfer::InferPostprocessor::m_Labels
protected

Definition at line 203 of file nvdsinfer_context_impl.h.

Referenced by getLabels().

◆ m_LoggingFunc

NvDsInferLoggingFunc nvdsinfer::InferPostprocessor::m_LoggingFunc
protected

Definition at line 186 of file nvdsinfer_context_impl.h.

Referenced by setLoggingFunc().

◆ m_NetworkInfo

NvDsInferNetworkInfo nvdsinfer::InferPostprocessor::m_NetworkInfo = {0}
protected

Definition at line 198 of file nvdsinfer_context_impl.h.

Referenced by setNetworkInfo().

◆ m_NetworkType

NvDsInferNetworkType nvdsinfer::InferPostprocessor::m_NetworkType = NvDsInferNetworkType_Other
protected

Definition at line 182 of file nvdsinfer_context_impl.h.

◆ m_OutputLayerInfo

std::vector<NvDsInferLayerInfo> nvdsinfer::InferPostprocessor::m_OutputLayerInfo
protected

Definition at line 200 of file nvdsinfer_context_impl.h.

Referenced by setOutputLayerInfo().

◆ m_OverwriteOpTensor

bool nvdsinfer::InferPostprocessor::m_OverwriteOpTensor = false
protected

Definition at line 194 of file nvdsinfer_context_impl.h.

◆ m_OverwriteOpTensorFilePairs

std::vector<std::pair<std::string, int> > nvdsinfer::InferPostprocessor::m_OverwriteOpTensorFilePairs
protected

Definition at line 195 of file nvdsinfer_context_impl.h.

◆ m_OverwriteOpTensorFiles

std::vector<std::ifstream *> nvdsinfer::InferPostprocessor::m_OverwriteOpTensorFiles
protected

Definition at line 196 of file nvdsinfer_context_impl.h.

◆ m_UniqueID

int nvdsinfer::InferPostprocessor::m_UniqueID = 0
protected

Definition at line 184 of file nvdsinfer_context_impl.h.


The documentation for this class was generated from the following file: