A generic post processor class.
Definition at line 54 of file infer_postprocess.h.


Public Types | |
| using | TensorAllocator = std::function< SharedSysMem(const std::string &name, size_t bytes)> |
| using | EventAllocator = std::function< SharedCuEvent()> |
| using | PostprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)> |
Public Member Functions | |
| virtual | ~Postprocessor ()=default |
| void | setDllHandle (const SharedDllHandle &dlHandle) |
| void | setLabelPath (const std::string &path) |
| void | setNetworkInfo (const NvDsInferNetworkInfo &info) |
| void | setOutputLayerCount (uint32_t num) |
| void | setInputCopy (bool enable) |
| const std::vector< std::vector< std::string > > & | getLabels () const |
| void | setAllocator (TensorAllocator cpuAlloc, EventAllocator event) |
| bool | needInputCopy () const |
| 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 | postHostProcess (SharedBatchArray inBuf, SharedCuStream mainStream, PostprocessDone done) override |
| Acquire an output buffer array and call host side processing steps. More... | |
Protected Member Functions | |
| Postprocessor (InferPostprocessType type, int id) | |
| NvDsInferStatus | postCudaImpl (SharedBatchArray &inBuf, SharedBatchArray &outbuf, SharedCuStream &mainStream) override |
| NvDsInferStatus | postHostImpl (SharedBatchArray &inBuf, SharedBatchArray &outbuf, SharedCuStream &mainStream) override |
| SharedBatchArray | requestCudaOutBufs (const SharedBatchArray &inBuf) override |
| SharedBatchArray | requestHostOutBufs (const SharedBatchArray &inBuf) override |
| 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 |
| using nvdsinferserver::Postprocessor::EventAllocator = std::function<SharedCuEvent()> |
Definition at line 57 of file infer_postprocess.h.
|
inherited |
Definition at line 62 of file infer_iprocess.h.
| using nvdsinferserver::Postprocessor::TensorAllocator = std::function<SharedSysMem(const std::string& name, size_t bytes)> |
Definition at line 56 of file infer_postprocess.h.
|
inlineprotected |
Definition at line 60 of file infer_postprocess.h.
|
virtualdefault |
|
overridevirtual |
Implements nvdsinferserver::BasePostprocessor.
Reimplemented in nvdsinferserver::SegmentPostprocessor, nvdsinferserver::ClassifyPostprocessor, and nvdsinferserver::DetectPostprocessor.
|
inline |
Definition at line 74 of file infer_postprocess.h.
References m_Labels.
|
inline |
Definition at line 82 of file infer_postprocess.h.
References m_CopyInputToHostBuffers.
|
inlineinherited |
Definition at line 180 of file infer_iprocess.h.
|
protected |
|
overrideprotectedvirtual |
Implements nvdsinferserver::BasePostprocessor.
|
inlineoverridevirtualinherited |
Acquire an output buffer array and call CUDA post processing steps.
| [in] | inBuf | Pointer to the input batch array. |
| [in] | mainStream | The main CUDA stream to synchronize with. |
| [in] | done | Callback function to be executed. |
Implements nvdsinferserver::IPostprocessor.
Definition at line 190 of file infer_iprocess.h.
|
overrideprotectedvirtual |
Implements nvdsinferserver::BasePostprocessor.
|
inlineoverridevirtualinherited |
Acquire an output buffer array and call host side processing steps.
| [in] | inBuf | Pointer to the input batch array. |
| [in] | mainStream | The main CUDA stream to synchronize with. |
| [in] | done | Callback function to be executed. |
Implements nvdsinferserver::IPostprocessor.
Definition at line 204 of file infer_iprocess.h.
|
overrideprotectedvirtual |
Implements nvdsinferserver::BasePostprocessor.
|
overrideprotectedvirtual |
Implements nvdsinferserver::BasePostprocessor.
|
inline |
Definition at line 77 of file infer_postprocess.h.
References m_CpuAllocator, and m_EventAllocator.
|
inline |
Definition at line 65 of file infer_postprocess.h.
References m_CustomLibHandle.
|
inline |
Definition at line 73 of file infer_postprocess.h.
References m_CopyInputToHostBuffers.
|
inline |
Definition at line 68 of file infer_postprocess.h.
References m_LabelPath.
|
inline |
Definition at line 69 of file infer_postprocess.h.
References m_NetworkInfo.
|
inline |
Definition at line 72 of file infer_postprocess.h.
References m_OutputLayerCount.
|
inlineinherited |
Definition at line 178 of file infer_iprocess.h.
|
inlineinherited |
Definition at line 179 of file infer_iprocess.h.
|
protected |
Definition at line 112 of file infer_postprocess.h.
Referenced by needInputCopy(), and setInputCopy().
|
protected |
Definition at line 121 of file infer_postprocess.h.
Referenced by setAllocator().
|
protected |
Custom library implementation.
Definition at line 111 of file infer_postprocess.h.
Referenced by setDllHandle().
|
protected |
Definition at line 122 of file infer_postprocess.h.
Referenced by setAllocator().
|
protected |
Definition at line 116 of file infer_postprocess.h.
Referenced by setLabelPath().
|
protected |
Holds the string labels for classes.
Definition at line 119 of file infer_postprocess.h.
Referenced by getLabels().
|
protected |
Network input information.
Definition at line 114 of file infer_postprocess.h.
Referenced by setNetworkInfo().
|
protected |
Definition at line 115 of file infer_postprocess.h.
Referenced by setOutputLayerCount().