16 #include "fastdeploy/vision/common/processors/transform.h" 17 #include "fastdeploy/vision/common/result.h" 38 bool Run(std::vector<FDMat>* images, std::vector<FDTensor>* outputs,
39 std::vector<std::map<std::string, std::array<float, 2>>>* ims_info);
42 void SetSize(
const std::vector<int>& size) { size_ = size; }
45 std::vector<int>
GetSize()
const {
return size_; }
49 padding_value_ = padding_value;
58 is_scale_up_ = is_scale_up;
67 is_mini_pad_ = is_mini_pad;
83 std::map<std::string, std::array<float, 2>>* im_info);
85 void LetterBox(
FDMat* mat);
88 std::vector<int> size_;
91 std::vector<float> padding_value_;
void SetScaleUp(bool is_scale_up)
Definition: preprocessor.h:57
std::vector< float > GetPaddingValue() const
Get padding value, size should be the same as channels.
Definition: preprocessor.h:53
bool GetMiniPad() const
Get is_mini_pad, default false.
Definition: preprocessor.h:71
void SetStride(int stride)
Set padding stride, only for mini_pad mode.
Definition: preprocessor.h:74
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
bool GetScaleUp() const
Get is_scale_up, default true.
Definition: preprocessor.h:62
void SetMiniPad(bool is_mini_pad)
Definition: preprocessor.h:66
std::vector< int > GetSize() const
Get target size, tuple of (width, height), default size = {640, 640}.
Definition: preprocessor.h:45
bool GetStride() const
Get padding stride, default 32.
Definition: preprocessor.h:79
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
void SetPaddingValue(const std::vector< float > &padding_value)
Set padding value, size should be the same as channels.
Definition: preprocessor.h:48
Preprocessor object for YOLOv5 serials model.
Definition: preprocessor.h:25
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
void SetSize(const std::vector< int > &size)
Set target size, tuple of (width, height), default size = {640, 640}.
Definition: preprocessor.h:42