FastDeploy  latest
Fast & Easy to Deploy!
Public Member Functions | List of all members
fastdeploy::vision::ProcessorManager Class Referenceabstract

ProcessorManager for Preprocess. More...

#include <manager.h>

Inheritance diagram for fastdeploy::vision::ProcessorManager:
Inheritance graph
[legend]

Public Member Functions

void UseCuda (bool enable_cv_cuda=false, int gpu_id=-1)
 Use CUDA to boost the performance of processors. More...
 
bool Run (std::vector< FDMat > *images, std::vector< FDTensor > *outputs)
 Process the input images and prepare input tensors for runtime. More...
 
virtual bool Apply (FDMatBatch *image_batch, std::vector< FDTensor > *outputs)=0
 Apply() is the body of Run() function, it needs to be implemented by a derived class. More...
 

Detailed Description

ProcessorManager for Preprocess.

Member Function Documentation

◆ Apply()

virtual bool fastdeploy::vision::ProcessorManager::Apply ( FDMatBatch image_batch,
std::vector< FDTensor > *  outputs 
)
pure virtual

Apply() is the body of Run() function, it needs to be implemented by a derived class.

Parameters
[in]image_batchThe input image batch
[in]outputsThe output tensors which will feed in runtime
Returns
true if the preprocess successed, otherwise false

Implemented in fastdeploy::vision::ocr::RecognizerPreprocessor, fastdeploy::vision::ocr::ClassifierPreprocessor, fastdeploy::vision::detection::PaddleDetPreprocessor, fastdeploy::vision::classification::PaddleClasPreprocessor, and fastdeploy::vision::ocr::DBDetectorPreprocessor.

◆ Run()

bool fastdeploy::vision::ProcessorManager::Run ( std::vector< FDMat > *  images,
std::vector< FDTensor > *  outputs 
)

Process the input images and prepare input tensors for runtime.

Parameters
[in]imagesThe input image data list, all the elements are returned by cv::imread()
[in]outputsThe output tensors which will feed in runtime
Returns
true if the preprocess successed, otherwise false

◆ UseCuda()

void fastdeploy::vision::ProcessorManager::UseCuda ( bool  enable_cv_cuda = false,
int  gpu_id = -1 
)

Use CUDA to boost the performance of processors.

Parameters
[in]enable_cv_cudature: use CV-CUDA, false: use CUDA only
[in]gpu_idGPU device id
Returns
true if the preprocess successed, otherwise false

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