diff --git a/deploy/cpp_infer/src/ocr_rec.cpp b/deploy/cpp_infer/src/ocr_rec.cpp index 76873dad3c871a027c7fccd88409227639edefdf..28cd1cb88216a8aa5e4e6fdc939f7be0169db556 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); }