diff --git a/deploy/cpp_infer/src/preprocess_op.cpp b/deploy/cpp_infer/src/preprocess_op.cpp index b44e9d022f2dcfb390cb28a7f34e0ba4b031832d..494b774ad0b2ecf73e555b2c31c250b7b0730c65 100644 --- a/deploy/cpp_infer/src/preprocess_op.cpp +++ b/deploy/cpp_infer/src/preprocess_op.cpp @@ -85,7 +85,7 @@ void ResizeImgType0::Run(const cv::Mat &img, cv::Mat &resize_img, if (resize_w % 32 == 0) resize_w = resize_w; - else if (resize_w / 32 < 1) + else if (resize_w / 32 < 1 + 1e-5) resize_w = 32; else resize_w = (resize_w / 32 - 1) * 32; @@ -138,4 +138,4 @@ void ClsResizeImg::Run(const cv::Mat &img, cv::Mat &resize_img, } } -} // namespace PaddleOCR \ No newline at end of file +} // namespace PaddleOCR