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

Preprocessor object for YOLOv7 serials model. More...

#include <preprocessor.h>

Public Member Functions

 YOLOv7Preprocessor ()
 Create a preprocessor instance for YOLOv7 serials model.
 
bool Run (std::vector< FDMat > *images, std::vector< FDTensor > *outputs, std::vector< std::map< std::string, std::array< float, 2 >>> *ims_info)
 Process the input image and prepare input tensors for runtime. More...
 
void SetSize (const std::vector< int > &size)
 Set target size, tuple of (width, height), default size = {640, 640}.
 
std::vector< int > GetSize () const
 Get target size, tuple of (width, height), default size = {640, 640}.
 
void SetPaddingValue (const std::vector< float > &padding_value)
 Set padding value, size should be the same as channels.
 
std::vector< float > GetPaddingValue () const
 Get padding value, size should be the same as channels.
 
void SetScaleUp (bool is_scale_up)
 
bool GetScaleUp () const
 Get is_scale_up, default true.
 

Detailed Description

Preprocessor object for YOLOv7 serials model.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::detection::YOLOv7Preprocessor::Run ( std::vector< FDMat > *  images,
std::vector< FDTensor > *  outputs,
std::vector< std::map< std::string, std::array< float, 2 >>> *  ims_info 
)

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]ims_infoThe shape info list, record input_shape and output_shape
Returns
true if the preprocess successed, otherwise false

◆ SetScaleUp()

void fastdeploy::vision::detection::YOLOv7Preprocessor::SetScaleUp ( bool  is_scale_up)
inline

Set is_scale_up, if is_scale_up is false, the input image only can be zoom out, the maximum resize scale cannot exceed 1.0, default true


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