From ec37732512e238598c128eef11c9f2f012ce5915 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Fri, 18 Dec 2020 14:45:06 +0800 Subject: [PATCH] fix db process --- 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 494b774a..cdb20c31 100644 --- a/deploy/cpp_infer/src/preprocess_op.cpp +++ b/deploy/cpp_infer/src/preprocess_op.cpp @@ -81,14 +81,14 @@ void ResizeImgType0::Run(const cv::Mat &img, cv::Mat &resize_img, else if (resize_h / 32 < 1 + 1e-5) resize_h = 32; else - resize_h = (resize_h / 32 - 1) * 32; + resize_h = (resize_h / 32) * 32; if (resize_w % 32 == 0) resize_w = resize_w; else if (resize_w / 32 < 1 + 1e-5) resize_w = 32; else - resize_w = (resize_w / 32 - 1) * 32; + resize_w = (resize_w / 32) * 32; cv::resize(img, resize_img, cv::Size(resize_w, resize_h)); -- GitLab