mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 05:30:58 +08:00
[Model] Update PPOCR code style (#1160)
* 更新代码风格 * 更新代码风格 * 更新代码风格 * 更新代码风格
This commit is contained in:
@@ -31,8 +31,7 @@ class FASTDEPLOY_DECL DBDetectorPreprocessor {
|
||||
* \param[in] batch_det_img_info_ptr The output of preprocess
|
||||
* \return true if the preprocess successed, otherwise false
|
||||
*/
|
||||
bool Run(std::vector<FDMat>* images,
|
||||
std::vector<FDTensor>* outputs,
|
||||
bool Run(std::vector<FDMat>* images, std::vector<FDTensor>* outputs,
|
||||
std::vector<std::array<int, 4>>* batch_det_img_info_ptr);
|
||||
|
||||
/// Set max_side_len for the detection preprocess, default is 960
|
||||
@@ -41,12 +40,12 @@ class FASTDEPLOY_DECL DBDetectorPreprocessor {
|
||||
int GetMaxSideLen() const { return max_side_len_; }
|
||||
|
||||
/// Set mean value for the image normalization in detection preprocess
|
||||
void SetMean(std::vector<float> mean) { mean_ = mean; }
|
||||
void SetMean(const std::vector<float>& mean) { mean_ = mean; }
|
||||
/// Get mean value of the image normalization in detection preprocess
|
||||
std::vector<float> GetMean() const { return mean_; }
|
||||
|
||||
/// Set scale value for the image normalization in detection preprocess
|
||||
void SetScale(std::vector<float> scale) { scale_ = scale; }
|
||||
void SetScale(const std::vector<float>& scale) { scale_ = scale; }
|
||||
/// Get scale value of the image normalization in detection preprocess
|
||||
std::vector<float> GetScale() const { return scale_; }
|
||||
|
||||
@@ -55,6 +54,7 @@ class FASTDEPLOY_DECL DBDetectorPreprocessor {
|
||||
/// Get is_scale of the image normalization in detection preprocess
|
||||
bool GetIsScale() const { return is_scale_; }
|
||||
|
||||
private:
|
||||
int max_side_len_ = 960;
|
||||
std::vector<float> mean_ = {0.485f, 0.456f, 0.406f};
|
||||
std::vector<float> scale_ = {0.229f, 0.224f, 0.225f};
|
||||
|
Reference in New Issue
Block a user