diff --git a/deploy/lite/ocr_db_crnn.cc b/deploy/lite/ocr_db_crnn.cc index cd1ec4c492ab88fef985ad842d84f1161a9ce076..e59cdcd4f4a415fd144bfe03f88a4a85c5c09ae3 100644 --- a/deploy/lite/ocr_db_crnn.cc +++ b/deploy/lite/ocr_db_crnn.cc @@ -142,14 +142,13 @@ void RunRecModel(std::vector>> boxes, cv::Mat img, // Get output and run postprocess std::unique_ptr output_tensor0( std::move(predictor_crnn->GetOutput(0))); - auto *rec_idx = output_tensor0->data(); + auto *rec_idx = output_tensor0->data(); auto rec_idx_lod = output_tensor0->lod(); auto shape_out = output_tensor0->shape(); std::vector pred_idx; - for (int n = int(rec_idx_lod[0][0]); n < int(rec_idx_lod[0][1] * 2); - n += 2) { + for (int n = int(rec_idx_lod[0][0]); n < int(rec_idx_lod[0][1]); n += 1) { pred_idx.push_back(int(rec_idx[n])); }