Skip to content

πŸ“„ Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

Update rapidocr to v1.3.0

SWHL310be555e92d
diff --git a/python/demo.py b/python/demo.py
index e33dd6e..5449c28 100644
--- a/python/demo.py
+++ b/python/demo.py
@@ -8,10 +8,9 @@ from pathlib import Path
import cv2
import numpy as np
from PIL import Image, ImageDraw, ImageFont
+from rapidocr_openvino import RapidOCR
-from rapidocr_onnxruntime import RapidOCR
-
-# from rapidocr_openvino import RapidOCR
+# from rapidocr_onnxruntime import RapidOCR
def draw_ocr_box_txt(image, boxes, txts, font_path, scores=None, text_score=0.5):
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml b/python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml
index 70e9573..9453c08 100644
--- a/python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml
+++ b/python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml
@@ -1,4 +1,4 @@
model_path: models/ch_PP-OCRv4_rec_infer.onnx
-rec_img_shape: [3, 32, 320]
+rec_img_shape: [3, 48, 320]
rec_batch_num: 6
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py b/python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py
index ff274f8..d804eb9 100644
--- a/python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py
+++ b/python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py
@@ -22,7 +22,6 @@ from typing import List
import cv2
import numpy as np
-
from rapidocr_openvino.utils import OpenVINOInferSession, read_yaml
from .utils import CTCLabelDecode
diff --git a/python/tests/test_rec.py b/python/tests/test_rec.py
index e75a9d6..ac94289 100644
--- a/python/tests/test_rec.py
+++ b/python/tests/test_rec.py
@@ -22,5 +22,5 @@ def test_det(package_name):
img_path = base.tests_dir / "test_files" / "text_rec.jpg"
img = cv2.imread(str(img_path))
- rec_res, elapse = text_rec([img])
+ rec_res, elapse = text_rec(img)
assert rec_res[0][0] == "ιŸ©ε›½ε°ι¦†"