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 d720066667b60ee87bc1a1227ad720074254074e..e7de9b0b1c7c228ba7e00ad912cdfedcce7812a1 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 5cbc5cd7134238c4f09f536ca6b1153d2d703023..bda7d1230fdc11c3b1a7d99130df755d26895de8 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 7cdaaab40108026edffe5cb1ca53ac3972768cc6..0e92fbe54963e4257e92cf529bd8dc5882c1f5dd 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 f522e4bc5a9050c981a91bcbd8dfefd719f034c2..9f5c3e9406cfe82fd1ded523d88890b6448ad5f1 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;