Post processor class for classification output.
Definition at line 208 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 | |
ClassifyPostprocessor (int uid, const ic::ClassificationParams ¶ms) | |
NvDsInferStatus | allocateResource (const std::vector< int > &devIds) override |
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 |
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 | |
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 |
|
inherited |
Definition at line 57 of file infer_postprocess.h.
|
inherited |
Definition at line 62 of file infer_iprocess.h.
|
inherited |
Definition at line 56 of file infer_postprocess.h.
nvdsinferserver::ClassifyPostprocessor::ClassifyPostprocessor | ( | int | uid, |
const ic::ClassificationParams & | params | ||
) |
|
overridevirtual |
Reimplemented from nvdsinferserver::Postprocessor.
|
inlineinherited |
Definition at line 74 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_Labels.
|
inlineinherited |
Definition at line 82 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_CopyInputToHostBuffers.
|
inlineinherited |
Definition at line 180 of file infer_iprocess.h.
|
protectedinherited |
|
overrideprotectedvirtualinherited |
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.
|
overrideprotectedvirtualinherited |
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.
|
overrideprotectedvirtualinherited |
Implements nvdsinferserver::BasePostprocessor.
|
overrideprotectedvirtualinherited |
Implements nvdsinferserver::BasePostprocessor.
|
inlineinherited |
Definition at line 77 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_CpuAllocator, and nvdsinferserver::Postprocessor::m_EventAllocator.
|
inlineinherited |
Definition at line 65 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_CustomLibHandle.
|
inlineinherited |
Definition at line 73 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_CopyInputToHostBuffers.
|
inlineinherited |
Definition at line 68 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_LabelPath.
|
inlineinherited |
Definition at line 69 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_NetworkInfo.
|
inlineinherited |
Definition at line 72 of file infer_postprocess.h.
References nvdsinferserver::Postprocessor::m_OutputLayerCount.
|
inlineinherited |
Definition at line 178 of file infer_iprocess.h.
|
inlineinherited |
Definition at line 179 of file infer_iprocess.h.
|
protectedinherited |
Definition at line 112 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::needInputCopy(), and nvdsinferserver::Postprocessor::setInputCopy().
|
protectedinherited |
Definition at line 121 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::setAllocator().
|
protectedinherited |
Custom library implementation.
Definition at line 111 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::setDllHandle().
|
protectedinherited |
Definition at line 122 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::setAllocator().
|
protectedinherited |
Definition at line 116 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::setLabelPath().
|
protectedinherited |
Holds the string labels for classes.
Definition at line 119 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::getLabels().
|
protectedinherited |
Network input information.
Definition at line 114 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::setNetworkInfo().
|
protectedinherited |
Definition at line 115 of file infer_postprocess.h.
Referenced by nvdsinferserver::Postprocessor::setOutputLayerCount().