From e57e9938d4bc4e2e464e266b49767fb7dc7c5d15 Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Thu, 5 Nov 2020 14:33:33 +0000 Subject: [PATCH] fix -1 in det resize --- deploy/cpp_infer/src/preprocess_op.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/cpp_infer/src/preprocess_op.cpp b/deploy/cpp_infer/src/preprocess_op.cpp index 494b774a..1d3e31a1 100644 --- a/deploy/cpp_infer/src/preprocess_op.cpp +++ b/deploy/cpp_infer/src/preprocess_op.cpp @@ -88,7 +88,7 @@ void ResizeImgType0::Run(const cv::Mat &img, cv::Mat &resize_img, 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