From 5760f73be62b7d181f95d559edb12d4b2ab03b9c Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Mon, 19 Oct 2020 11:54:33 +0000 Subject: [PATCH] fix 1e-5 --- deploy/cpp_infer/src/preprocess_op.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/cpp_infer/src/preprocess_op.cpp b/deploy/cpp_infer/src/preprocess_op.cpp index b44e9d02..494b774a 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 -- GitLab