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

Preprocessor object for PaddleSeg serials model. More...

#include <preprocessor.h>

Public Member Functions

 PaddleSegPreprocessor (const std::string &config_file)
 Create a preprocessor instance for PaddleSeg serials model. More...
 
virtual bool Run (std::vector< FDMat > *images, std::vector< FDTensor > *outputs, std::map< std::string, std::vector< std::array< int, 2 >>> *imgs_info)
 Process the input image and prepare input tensors for runtime. More...
 
bool GetIsVerticalScreen () const
 Get is_vertical_screen property of PP-HumanSeg model, default is false.
 
void SetIsVerticalScreen (bool value)
 Set is_vertical_screen value, bool type required.
 
void DisableNormalize ()
 This function will disable normalize in preprocessing step.
 
void DisablePermute ()
 This function will disable hwc2chw in preprocessing step.
 

Detailed Description

Preprocessor object for PaddleSeg serials model.

Constructor & Destructor Documentation

◆ PaddleSegPreprocessor()

fastdeploy::vision::segmentation::PaddleSegPreprocessor::PaddleSegPreprocessor ( const std::string &  config_file)
explicit

Create a preprocessor instance for PaddleSeg serials model.

Parameters
[in]config_filePath of configuration file for deployment, e.g ppliteseg/deploy.yaml

Member Function Documentation

◆ Run()

bool fastdeploy::vision::segmentation::PaddleSegPreprocessor::Run ( std::vector< FDMat > *  images,
std::vector< FDTensor > *  outputs,
std::map< std::string, std::vector< std::array< int, 2 >>> *  imgs_info 
)
virtual

Process the input image 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
[in]imgs_infoThe original input images shape info map, key is "shape_info", value is vector<array<int, 2>> a{{height, width}}
Returns
true if the preprocess successed, otherwise false

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