16 #include "fastdeploy/vision/common/processors/transform.h" 17 #include "fastdeploy/vision/common/result.h" 37 bool Run(std::vector<FDMat>* images, std::vector<FDTensor>* outputs);
40 void SetSize(
const std::vector<int>& size) { size_ = size; }
43 std::vector<int>
GetSize()
const {
return size_; }
47 padding_value_ = padding_value;
55 void SetScaleUp(
bool is_scale_up) { is_scale_up_ = is_scale_up; }
60 std::vector<std::vector<int>> GetPadHWValues()
const {
61 return pad_hw_values_;
63 std::vector<float> GetScale()
const {
return scale_; }
68 void LetterBox(
FDMat* mat);
71 std::vector<int> size_;
74 std::vector<float> padding_value_;
93 std::vector<std::vector<int>> pad_hw_values_;
94 std::vector<float> scale_;
void SetPaddingValue(const std::vector< float > &padding_value)
Set padding value, size should be the same as channels.
Definition: preprocessor.h:46
std::vector< float > GetPaddingValue() const
Get padding value, size should be the same as channels.
Definition: preprocessor.h:51
void SetSize(const std::vector< int > &size)
Set target size, tuple of (width, height), default size = {640, 640}.
Definition: preprocessor.h:40
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
void SetScaleUp(bool is_scale_up)
Definition: preprocessor.h:55
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
Preprocessor object for YOLOv5 serials model.
Definition: preprocessor.h:24
bool GetScaleUp() const
Get is_scale_up, default true.
Definition: preprocessor.h:58
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
std::vector< int > GetSize() const
Get target size, tuple of (width, height), default size = {640, 640}.
Definition: preprocessor.h:43