From 5e1b7a184ab21b6c752999562ee4f2a09e6ad839 Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Tue, 27 Oct 2020 16:20:17 +0800 Subject: [PATCH] update image shape for angle class from [3,32,100] to [3,48,192] --- deploy/android_demo/app/src/main/cpp/ocr_cls_process.cpp | 2 +- deploy/cpp_infer/include/preprocess_op.h | 2 +- deploy/cpp_infer/src/ocr_cls.cpp | 2 +- deploy/lite/cls_process.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/android_demo/app/src/main/cpp/ocr_cls_process.cpp b/deploy/android_demo/app/src/main/cpp/ocr_cls_process.cpp index d7200666..e7de9b0b 100644 --- a/deploy/android_demo/app/src/main/cpp/ocr_cls_process.cpp +++ b/deploy/android_demo/app/src/main/cpp/ocr_cls_process.cpp @@ -20,7 +20,7 @@ #include #include -const std::vector CLS_IMAGE_SHAPE = {3, 32, 100}; +const std::vector CLS_IMAGE_SHAPE = {3, 48, 192}; cv::Mat cls_resize_img(const cv::Mat &img) { int imgC = CLS_IMAGE_SHAPE[0]; 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); diff --git a/deploy/lite/cls_process.cc b/deploy/lite/cls_process.cc index f522e4bc..9f5c3e94 100644 --- a/deploy/lite/cls_process.cc +++ b/deploy/lite/cls_process.cc @@ -17,7 +17,7 @@ #include #include -const std::vector rec_image_shape{3, 32, 100}; +const std::vector rec_image_shape{3, 48, 192}; cv::Mat ClsResizeImg(cv::Mat img) { int imgC, imgH, imgW; -- GitLab