mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-13 14:31:00 +08:00
Update rapidocr to v1.3.0
This commit is contained in:
1 parent
db51a18f5c
commit
310be555e9
4 files changed
+4
-6
No files matched your search
+2
-3
@@ -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):
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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] == "韩国小馆"
|
||||
Reference in new issue
Block a user