NVIDIA DeepStream SDK API Reference

9.0 Release
nvdsinfer::InferPostprocessor Class Referenceabstract

Detailed Description

Base class for post-processing on inference output.

Definition at line 116 of file sources/libs/nvdsinfer/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)
 
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)
 
 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() [1/2]

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

◆ ~InferPostprocessor() [1/2]

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

◆ InferPostprocessor() [2/2]

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

◆ ~InferPostprocessor() [2/2]

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

Member Function Documentation

◆ allocDeviceResource() [1/2]

NvDsInferStatus nvdsinfer::InferPostprocessor::allocDeviceResource ( )
protected

◆ allocDeviceResource() [2/2]

NvDsInferStatus nvdsinfer::InferPostprocessor::allocDeviceResource ( )
protected

◆ copyBuffersToHostMemory() [1/2]

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

◆ copyBuffersToHostMemory() [2/2]

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

◆ freeBatchOutput() [1/2]

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

◆ freeBatchOutput() [2/2]

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

◆ getLabels() [1/2]

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

Definition at line 146 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

References m_Labels.

◆ getLabels() [2/2]

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

Definition at line 146 of file 9.0/sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

References m_Labels.

◆ initResource() [1/2]

◆ initResource() [2/2]

◆ needInputCopy() [1/2]

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

◆ needInputCopy() [2/2]

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

◆ needOutputCopyB4Processing() [1/2]

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

◆ needOutputCopyB4Processing() [2/2]

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

◆ parseLabelsFile() [1/2]

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

◆ parseLabelsFile() [2/2]

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

◆ postProcessHost() [1/2]

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

◆ postProcessHost() [2/2]

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

◆ releaseFrameOutput() [1/2]

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

◆ releaseFrameOutput() [2/2]

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

◆ setAllLayerInfo() [1/2]

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

◆ setAllLayerInfo() [2/2]

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

Definition at line 132 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

References m_AllLayerInfo.

◆ setDlHandle() [1/2]

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

◆ setDlHandle() [2/2]

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

◆ setLoggingFunc() [1/2]

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

◆ setLoggingFunc() [2/2]

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

Definition at line 142 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

References m_LoggingFunc.

◆ setNetworkInfo() [1/2]

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

◆ setNetworkInfo() [2/2]

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

Definition at line 128 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

References m_NetworkInfo.

◆ setOutputLayerInfo() [1/2]

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

◆ setOutputLayerInfo() [2/2]

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

Field Documentation

◆ m_AllLayerInfo

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

Definition at line 199 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by setAllLayerInfo().

◆ m_CopyInputToHostBuffers

bool nvdsinfer::InferPostprocessor::m_CopyInputToHostBuffers = false
protected

Definition at line 190 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by needInputCopy().

◆ m_CustomLibHandle

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

Definition at line 189 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by setDlHandle().

◆ m_disableOutputHostCopy

bool nvdsinfer::InferPostprocessor::m_disableOutputHostCopy = false
protected

◆ m_DumpOpTensor

bool nvdsinfer::InferPostprocessor::m_DumpOpTensor = false
protected

◆ m_DumpOpTensorFiles

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

◆ m_GpuID

uint32_t nvdsinfer::InferPostprocessor::m_GpuID = 0
protected

◆ m_Labels

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

Definition at line 203 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by getLabels().

◆ m_LoggingFunc

NvDsInferLoggingFunc nvdsinfer::InferPostprocessor::m_LoggingFunc
protected

Definition at line 186 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by setLoggingFunc().

◆ m_NetworkInfo

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

Definition at line 198 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by setNetworkInfo().

◆ m_NetworkType

NvDsInferNetworkType nvdsinfer::InferPostprocessor::m_NetworkType = NvDsInferNetworkType_Other
protected

◆ m_OutputLayerInfo

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

Definition at line 200 of file sources/libs/nvdsinfer/nvdsinfer_context_impl.h.

Referenced by setOutputLayerInfo().

◆ m_OverwriteOpTensor

bool nvdsinfer::InferPostprocessor::m_OverwriteOpTensor = false
protected

◆ m_OverwriteOpTensorFilePairs

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

◆ m_OverwriteOpTensorFiles

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

◆ m_UniqueID

int nvdsinfer::InferPostprocessor::m_UniqueID = 0
protected

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