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;
66 std::map<std::string, std::array<float, 2>>* im_info);
68 void LetterBox(
FDMat* mat);
71 std::vector<int> size_;
74 std::vector<float> padding_value_;
std::vector< float > GetPaddingValue() const
Get padding value, size should be the same as channels.
Definition: preprocessor.h:53
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
void SetScaleUp(bool is_scale_up)
Definition: preprocessor.h:57
Preprocessor object for YOLOv7 serials model.
Definition: preprocessor.h:25
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
std::vector< int > GetSize() const
Get target size, tuple of (width, height), default size = {640, 640}.
Definition: preprocessor.h:45
void SetPaddingValue(const std::vector< float > &padding_value)
Set padding value, size should be the same as channels.
Definition: preprocessor.h:48
bool GetScaleUp() const
Get is_scale_up, default true.
Definition: preprocessor.h:62
void SetSize(const std::vector< int > &size)
Set target size, tuple of (width, height), default size = {640, 640}.
Definition: preprocessor.h:42
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16