VART-X  0.3.0
vart::PostProcessImplBase Class Referenceabstract

Abstract interface for post-processing implementation used by PostProcess. More...

#include <vart_postprocess_impl_base.hpp>

Public Member Functions

 PostProcessImplBase ()=default
 Default construction is allowed for derived implementations. More...
 
virtual ~PostProcessImplBase ()
 Virtual destructor to ensure proper cleanup of derived implementations. More...
 
virtual void set_config (std::vector< TensorInfo > &info, uint32_t batch_size)=0
 set_config() - Set PostProcessInfo config data before start doing the post-process. More...
 
virtual std::vector< std::vector< std::shared_ptr< InferResult > > > process (std::vector< int8_t * > data, uint32_t current_batch_size)=0
 process() - Process/parse tensors data from ML network output to create infer results. More...
 
virtual std::vector< std::vector< std::shared_ptr< InferResult > > > process (std::vector< std::vector< std::shared_ptr< vart::Memory >>> tensor_memory, uint32_t current_batch_size)=0
 process() - Process/parse tensors data from ML network output to create infer results. More...
 

Detailed Description

Abstract interface for post-processing implementation used by PostProcess.

Note
Applications should use vart::PostProcess rather than this type directly, unless extending or integrating a new backend.

Constructor & Destructor Documentation

◆ PostProcessImplBase()

vart::PostProcessImplBase::PostProcessImplBase ( )
default

Default construction is allowed for derived implementations.

◆ ~PostProcessImplBase()

virtual vart::PostProcessImplBase::~PostProcessImplBase ( )
inlinevirtual

Virtual destructor to ensure proper cleanup of derived implementations.

Member Function Documentation

◆ process() [1/2]

virtual std::vector<std::vector<std::shared_ptr<InferResult> > > vart::PostProcessImplBase::process ( std::vector< int8_t * >  data,
uint32_t  current_batch_size 
)
pure virtual

process() - Process/parse tensors data from ML network output to create infer results.

Parameters
[in]dataArray of tensors data. Each tensor will have the data for the entire batch of images.
[in]current_batch_sizeNumber of inputs in the current batch.
Returns
Vector of inference result objects for every image in the batch.

◆ process() [2/2]

virtual std::vector<std::vector<std::shared_ptr<InferResult> > > vart::PostProcessImplBase::process ( std::vector< std::vector< std::shared_ptr< vart::Memory >>>  tensor_memory,
uint32_t  current_batch_size 
)
pure virtual

process() - Process/parse tensors data from ML network output to create infer results.

Parameters
[in]tensor_memoryVector of vart::Memory pointer groups. Each outer entry corresponds to one batch element; each inner entry is the set of output-tensor buffers for that element.
[in]current_batch_sizeNumber of inputs in the current batch.
Returns
Vector of inference result objects for every image in the batch.

◆ set_config()

virtual void vart::PostProcessImplBase::set_config ( std::vector< TensorInfo > &  info,
uint32_t  batch_size 
)
pure virtual

set_config() - Set PostProcessInfo config data before start doing the post-process.

Parameters
[in]infoTensorInfo to be set.
[in]batch_sizeSupported batch size.

Use this method to set batch size and tensor information required to parse/process the ML network output. Call this method before the first call to process() to ensure proper configuration of the post-processing logic.


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