From 3573388b7fd1bc6024d70b4ccf36f42d9004b36f Mon Sep 17 00:00:00 2001 From: zhoujun Date: Tue, 27 Oct 2020 20:17:55 +0800 Subject: [PATCH] update image shape for angle class from [3,32,100] to [3,48,192] (#1021) --- deploy/cpp_infer/include/preprocess_op.h | 2 +- deploy/cpp_infer/src/ocr_cls.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/cpp_infer/include/preprocess_op.h b/deploy/cpp_infer/include/preprocess_op.h index 5cbc5cd7..bda7d123 100644 --- a/deploy/cpp_infer/include/preprocess_op.h +++ b/deploy/cpp_infer/include/preprocess_op.h @@ -59,7 +59,7 @@ public: class ClsResizeImg { public: virtual void Run(const cv::Mat &img, cv::Mat &resize_img, - const std::vector &rec_image_shape = {3, 32, 320}); + const std::vector &rec_image_shape = {3, 48, 192}); }; } // namespace PaddleOCR \ No newline at end of file diff --git a/deploy/cpp_infer/src/ocr_cls.cpp b/deploy/cpp_infer/src/ocr_cls.cpp index 7cdaaab4..0e92fbe5 100644 --- a/deploy/cpp_infer/src/ocr_cls.cpp +++ b/deploy/cpp_infer/src/ocr_cls.cpp @@ -21,7 +21,7 @@ cv::Mat Classifier::Run(cv::Mat &img) { img.copyTo(src_img); cv::Mat resize_img; - std::vector rec_image_shape = {3, 32, 100}; + std::vector rec_image_shape = {3, 48, 192}; int index = 0; float wh_ratio = float(img.cols) / float(img.rows);