NVIDIA DeepStream SDK API Reference

8.0 Release
nvdsinferserver::OtherPostprocessor Class Reference

Detailed Description

Post processor class for tensor output for custom post processing.

Definition at line 270 of file sources/libs/nvdsinferserver/infer_postprocess.h.

Inheritance diagram for nvdsinferserver::OtherPostprocessor:
Collaboration diagram for nvdsinferserver::OtherPostprocessor:

Public Types

using TensorAllocator = std::function< SharedSysMem(const std::string &name, size_t bytes)>
 
using TensorAllocator = std::function< SharedSysMem(const std::string &name, size_t bytes)>
 
using EventAllocator = std::function< SharedCuEvent()>
 
using EventAllocator = std::function< SharedCuEvent()>
 
using PostprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)>
 
using PostprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)>
 

Public Member Functions

 OtherPostprocessor (int uid, const ic::OtherNetworkParams &params)
 
 OtherPostprocessor (int uid, const ic::OtherNetworkParams &params)
 
void setDllHandle (const SharedDllHandle &dlHandle)
 
void setDllHandle (const SharedDllHandle &dlHandle)
 
void setLabelPath (const std::string &path)
 
void setLabelPath (const std::string &path)
 
void setNetworkInfo (const NvDsInferNetworkInfo &info)
 
void setNetworkInfo (const NvDsInferNetworkInfo &info)
 
void setOutputLayerCount (uint32_t num)
 
void setOutputLayerCount (uint32_t num)
 
void setInputCopy (bool enable)
 
void setInputCopy (bool enable)
 
const std::vector< std::vector< std::string > > & getLabels () const
 
const std::vector< std::vector< std::string > > & getLabels () const
 
void setAllocator (TensorAllocator cpuAlloc, EventAllocator event)
 
void setAllocator (TensorAllocator cpuAlloc, EventAllocator event)
 
bool needInputCopy () const
 
bool needInputCopy () const
 
virtual NvDsInferStatus allocateResource (const std::vector< int > &devIds) override
 
virtual NvDsInferStatus allocateResource (const std::vector< int > &devIds) override
 
NvDsInferStatus postCudaProcess (SharedBatchArray inBuf, SharedCuStream mainStream, PostprocessDone done) override
 Acquire an output buffer array and call CUDA post processing steps. More...
 
NvDsInferStatus postCudaProcess (SharedBatchArray inBuf, SharedCuStream mainStream, PostprocessDone done) override
 Acquire an output buffer array and call CUDA post processing steps. More...
 
NvDsInferStatus postHostProcess (SharedBatchArray inBuf, SharedCuStream mainStream, PostprocessDone done) override
 Acquire an output buffer array and call host side processing steps. More...
 
NvDsInferStatus postHostProcess (SharedBatchArray inBuf, SharedCuStream mainStream, PostprocessDone done) override
 Acquire an output buffer array and call host side processing steps. More...
 

Protected Member Functions

NvDsInferStatus postCudaImpl (SharedBatchArray &inBuf, SharedBatchArray &outbuf, SharedCuStream &mainStream) override
 
NvDsInferStatus postCudaImpl (SharedBatchArray &inBuf, SharedBatchArray &outbuf, SharedCuStream &mainStream) override
 
NvDsInferStatus postHostImpl (SharedBatchArray &inBuf, SharedBatchArray &outbuf, SharedCuStream &mainStream) override
 
NvDsInferStatus postHostImpl (SharedBatchArray &inBuf, SharedBatchArray &outbuf, SharedCuStream &mainStream) override
 
SharedBatchArray requestCudaOutBufs (const SharedBatchArray &inBuf) override
 
SharedBatchArray requestCudaOutBufs (const SharedBatchArray &inBuf) override
 
SharedBatchArray requestHostOutBufs (const SharedBatchArray &inBuf) override
 
SharedBatchArray requestHostOutBufs (const SharedBatchArray &inBuf) override
 
NvDsInferStatus parseLabelsFile (const std::string &path)
 
NvDsInferStatus parseLabelsFile (const std::string &path)
 

Protected Attributes

SharedDllHandle m_CustomLibHandle
 Custom library implementation. More...
 
bool m_CopyInputToHostBuffers = false
 
NvDsInferNetworkInfo m_NetworkInfo = {0}
 Network input information. More...
 
uint32_t m_OutputLayerCount = 0
 
std::string m_LabelPath
 
std::vector< std::vector< std::string > > m_Labels
 Holds the string labels for classes. More...
 
TensorAllocator m_CpuAllocator
 
EventAllocator m_EventAllocator
 

Member Typedef Documentation

◆ EventAllocator [1/2]

◆ EventAllocator [2/2]

◆ PostprocessDone [1/2]

◆ PostprocessDone [2/2]

◆ TensorAllocator [1/2]

using nvdsinferserver::Postprocessor::TensorAllocator = std::function<SharedSysMem(const std::string& name, size_t bytes)>
inherited

◆ TensorAllocator [2/2]

using nvdsinferserver::Postprocessor::TensorAllocator = std::function<SharedSysMem(const std::string& name, size_t bytes)>
inherited

Constructor & Destructor Documentation

◆ OtherPostprocessor() [1/2]

nvdsinferserver::OtherPostprocessor::OtherPostprocessor ( int  uid,
const ic::OtherNetworkParams &  params 
)

◆ OtherPostprocessor() [2/2]

nvdsinferserver::OtherPostprocessor::OtherPostprocessor ( int  uid,
const ic::OtherNetworkParams &  params 
)

Member Function Documentation

◆ allocateResource() [1/2]

◆ allocateResource() [2/2]

◆ getLabels() [1/2]

const std::vector<std::vector<std::string> >& nvdsinferserver::Postprocessor::getLabels ( ) const
inlineinherited

◆ getLabels() [2/2]

const std::vector<std::vector<std::string> >& nvdsinferserver::Postprocessor::getLabels ( ) const
inlineinherited

◆ needInputCopy() [1/2]

bool nvdsinferserver::Postprocessor::needInputCopy ( ) const
inlineinherited

◆ needInputCopy() [2/2]

bool nvdsinferserver::Postprocessor::needInputCopy ( ) const
inlineinherited

◆ networkType() [1/2]

InferPostprocessType nvdsinferserver::BasePostprocessor::networkType ( ) const
inlineinherited

◆ networkType() [2/2]

InferPostprocessType nvdsinferserver::BasePostprocessor::networkType ( ) const
inlineinherited

◆ parseLabelsFile() [1/2]

NvDsInferStatus nvdsinferserver::Postprocessor::parseLabelsFile ( const std::string &  path)
protectedinherited

◆ parseLabelsFile() [2/2]

NvDsInferStatus nvdsinferserver::Postprocessor::parseLabelsFile ( const std::string &  path)
protectedinherited

◆ postCudaImpl() [1/2]

NvDsInferStatus nvdsinferserver::Postprocessor::postCudaImpl ( SharedBatchArray inBuf,
SharedBatchArray outbuf,
SharedCuStream mainStream 
)
overrideprotectedvirtualinherited

◆ postCudaImpl() [2/2]

NvDsInferStatus nvdsinferserver::Postprocessor::postCudaImpl ( SharedBatchArray inBuf,
SharedBatchArray outbuf,
SharedCuStream mainStream 
)
overrideprotectedvirtualinherited

◆ postCudaProcess() [1/2]

NvDsInferStatus nvdsinferserver::BasePostprocessor::postCudaProcess ( SharedBatchArray  inBuf,
SharedCuStream  mainStream,
PostprocessDone  done 
)
inlineoverridevirtualinherited

Acquire an output buffer array and call CUDA post processing steps.

Parameters
[in]inBufPointer to the input batch array.
[in]mainStreamThe main CUDA stream to synchronize with.
[in]doneCallback function to be executed.
Returns
Error status.

Implements nvdsinferserver::IPostprocessor.

Definition at line 190 of file sources/libs/nvdsinferserver/infer_iprocess.h.

◆ postCudaProcess() [2/2]

NvDsInferStatus nvdsinferserver::BasePostprocessor::postCudaProcess ( SharedBatchArray  inBuf,
SharedCuStream  mainStream,
PostprocessDone  done 
)
inlineoverridevirtualinherited

Acquire an output buffer array and call CUDA post processing steps.

Parameters
[in]inBufPointer to the input batch array.
[in]mainStreamThe main CUDA stream to synchronize with.
[in]doneCallback function to be executed.
Returns
Error status.

Implements nvdsinferserver::IPostprocessor.

Definition at line 190 of file 9.0/sources/libs/nvdsinferserver/infer_iprocess.h.

◆ postHostImpl() [1/2]

NvDsInferStatus nvdsinferserver::Postprocessor::postHostImpl ( SharedBatchArray inBuf,
SharedBatchArray outbuf,
SharedCuStream mainStream 
)
overrideprotectedvirtualinherited

◆ postHostImpl() [2/2]

NvDsInferStatus nvdsinferserver::Postprocessor::postHostImpl ( SharedBatchArray inBuf,
SharedBatchArray outbuf,
SharedCuStream mainStream 
)
overrideprotectedvirtualinherited

◆ postHostProcess() [1/2]

NvDsInferStatus nvdsinferserver::BasePostprocessor::postHostProcess ( SharedBatchArray  inBuf,
SharedCuStream  mainStream,
PostprocessDone  done 
)
inlineoverridevirtualinherited

Acquire an output buffer array and call host side processing steps.

Parameters
[in]inBufPointer to the input batch array.
[in]mainStreamThe main CUDA stream to synchronize with.
[in]doneCallback function to be executed.
Returns
Error status.

Implements nvdsinferserver::IPostprocessor.

Definition at line 204 of file sources/libs/nvdsinferserver/infer_iprocess.h.

◆ postHostProcess() [2/2]

NvDsInferStatus nvdsinferserver::BasePostprocessor::postHostProcess ( SharedBatchArray  inBuf,
SharedCuStream  mainStream,
PostprocessDone  done 
)
inlineoverridevirtualinherited

Acquire an output buffer array and call host side processing steps.

Parameters
[in]inBufPointer to the input batch array.
[in]mainStreamThe main CUDA stream to synchronize with.
[in]doneCallback function to be executed.
Returns
Error status.

Implements nvdsinferserver::IPostprocessor.

Definition at line 204 of file 9.0/sources/libs/nvdsinferserver/infer_iprocess.h.

◆ requestCudaOutBufs() [1/2]

SharedBatchArray nvdsinferserver::Postprocessor::requestCudaOutBufs ( const SharedBatchArray inBuf)
overrideprotectedvirtualinherited

◆ requestCudaOutBufs() [2/2]

SharedBatchArray nvdsinferserver::Postprocessor::requestCudaOutBufs ( const SharedBatchArray inBuf)
overrideprotectedvirtualinherited

◆ requestHostOutBufs() [1/2]

SharedBatchArray nvdsinferserver::Postprocessor::requestHostOutBufs ( const SharedBatchArray inBuf)
overrideprotectedvirtualinherited

◆ requestHostOutBufs() [2/2]

SharedBatchArray nvdsinferserver::Postprocessor::requestHostOutBufs ( const SharedBatchArray inBuf)
overrideprotectedvirtualinherited

◆ setAllocator() [1/2]

void nvdsinferserver::Postprocessor::setAllocator ( TensorAllocator  cpuAlloc,
EventAllocator  event 
)
inlineinherited

◆ setAllocator() [2/2]

void nvdsinferserver::Postprocessor::setAllocator ( TensorAllocator  cpuAlloc,
EventAllocator  event 
)
inlineinherited

◆ setDllHandle() [1/2]

void nvdsinferserver::Postprocessor::setDllHandle ( const SharedDllHandle dlHandle)
inlineinherited

◆ setDllHandle() [2/2]

void nvdsinferserver::Postprocessor::setDllHandle ( const SharedDllHandle dlHandle)
inlineinherited

◆ setInputCopy() [1/2]

void nvdsinferserver::Postprocessor::setInputCopy ( bool  enable)
inlineinherited

◆ setInputCopy() [2/2]

void nvdsinferserver::Postprocessor::setInputCopy ( bool  enable)
inlineinherited

◆ setLabelPath() [1/2]

void nvdsinferserver::Postprocessor::setLabelPath ( const std::string &  path)
inlineinherited

◆ setLabelPath() [2/2]

void nvdsinferserver::Postprocessor::setLabelPath ( const std::string &  path)
inlineinherited

◆ setNetworkInfo() [1/2]

void nvdsinferserver::Postprocessor::setNetworkInfo ( const NvDsInferNetworkInfo info)
inlineinherited

◆ setNetworkInfo() [2/2]

void nvdsinferserver::Postprocessor::setNetworkInfo ( const NvDsInferNetworkInfo info)
inlineinherited

◆ setOutputLayerCount() [1/2]

void nvdsinferserver::Postprocessor::setOutputLayerCount ( uint32_t  num)
inlineinherited

◆ setOutputLayerCount() [2/2]

void nvdsinferserver::Postprocessor::setOutputLayerCount ( uint32_t  num)
inlineinherited

◆ setUniqueId() [1/2]

void nvdsinferserver::BasePostprocessor::setUniqueId ( int  id)
inlineinherited

◆ setUniqueId() [2/2]

void nvdsinferserver::BasePostprocessor::setUniqueId ( int  id)
inlineinherited

◆ uniqueId() [1/2]

int nvdsinferserver::BasePostprocessor::uniqueId ( ) const
inlineinherited

◆ uniqueId() [2/2]

int nvdsinferserver::BasePostprocessor::uniqueId ( ) const
inlineinherited

Field Documentation

◆ m_CopyInputToHostBuffers

bool nvdsinferserver::Postprocessor::m_CopyInputToHostBuffers = false
protectedinherited

◆ m_CpuAllocator

TensorAllocator nvdsinferserver::Postprocessor::m_CpuAllocator
protectedinherited

◆ m_CustomLibHandle

SharedDllHandle nvdsinferserver::Postprocessor::m_CustomLibHandle
protectedinherited

Custom library implementation.

Definition at line 111 of file sources/libs/nvdsinferserver/infer_postprocess.h.

Referenced by nvdsinferserver::Postprocessor::setDllHandle().

◆ m_EventAllocator

EventAllocator nvdsinferserver::Postprocessor::m_EventAllocator
protectedinherited

◆ m_LabelPath

std::string nvdsinferserver::Postprocessor::m_LabelPath
protectedinherited

◆ m_Labels

std::vector< std::vector< std::string > > nvdsinferserver::Postprocessor::m_Labels
protectedinherited

Holds the string labels for classes.

Definition at line 119 of file sources/libs/nvdsinferserver/infer_postprocess.h.

Referenced by nvdsinferserver::Postprocessor::getLabels().

◆ m_NetworkInfo

NvDsInferNetworkInfo nvdsinferserver::Postprocessor::m_NetworkInfo = {0}
protectedinherited

Network input information.

Definition at line 114 of file sources/libs/nvdsinferserver/infer_postprocess.h.

Referenced by nvdsinferserver::Postprocessor::setNetworkInfo().

◆ m_OutputLayerCount

uint32_t nvdsinferserver::Postprocessor::m_OutputLayerCount = 0
protectedinherited

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