Skip to content

Commit

Permalink
Update rapidocr to v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Aug 27, 2023
1 parent db51a18 commit 310be55
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions python/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import cv2
import numpy as np

from rapidocr_openvino.utils import OpenVINOInferSession, read_yaml

from .utils import CTCLabelDecode
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] == "韩国小馆"

0 comments on commit 310be55

Please sign in to comment.