From ac3768a62f68b2a01abd103748218bb351a9bcd3 Mon Sep 17 00:00:00 2001 From: littletomatodonkey <2120160898@bit.edu.cn> Date: Fri, 28 May 2021 12:00:38 +0800 Subject: [PATCH] fix cpp order (#2948) --- deploy/cpp_infer/src/ocr_rec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/cpp_infer/src/ocr_rec.cpp b/deploy/cpp_infer/src/ocr_rec.cpp index 76873dad..28cd1cb8 100644 --- a/deploy/cpp_infer/src/ocr_rec.cpp +++ b/deploy/cpp_infer/src/ocr_rec.cpp @@ -25,8 +25,9 @@ void CRNNRecognizer::Run(std::vector>> boxes, std::cout << "The predicted text is :" << std::endl; int index = 0; - for (int i = boxes.size() - 1; i >= 0; i--) { + for (int i = 0; i < boxes.size(); i++) { crop_img = GetRotateCropImage(srcimg, boxes[i]); + if (cls != nullptr) { crop_img = cls->Run(crop_img); }