π Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.
Update rapidocr to v1.3.0
SWHL1ce9a00e08e6
diff --git a/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml b/.github/workflows/gen_whl_to_pypi_rapidocr_ort.ymlindex c203447..821a8b4 100644--- a/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml+++ b/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml@@ -10,7 +10,7 @@ on:- '.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml'env:- RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.1.0.zip+ RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.3.0.zipjobs:UnitTesting:diff --git a/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml b/.github/workflows/gen_whl_to_pypi_rapidocr_vino.ymlindex daf19ec..f6b5b16 100644--- a/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml+++ b/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml@@ -10,7 +10,7 @@ on:- '.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml'env:- RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.1.0.zip+ RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.3.0.zipjobs:UnitTesting:diff --git a/python/rapidocr_onnxruntime/config.yaml b/python/rapidocr_onnxruntime/config.yamlindex 4607d7d..988e49e 100644--- a/python/rapidocr_onnxruntime/config.yaml+++ b/python/rapidocr_onnxruntime/config.yaml@@ -9,7 +9,7 @@ Global:Det:use_cuda: false- model_path: models/ch_PP-OCRv3_det_infer.onnx+ model_path: models/ch_PP-OCRv4_det_infer.onnxlimit_side_len: 736limit_type: min@@ -34,7 +34,7 @@ Cls:Rec:use_cuda: false- model_path: models/ch_PP-OCRv3_rec_infer.onnx+ model_path: models/ch_PP-OCRv4_rec_infer.onnxrec_img_shape: [3, 48, 320]rec_batch_num: 6diff --git a/python/rapidocr_openvino/config.yaml b/python/rapidocr_openvino/config.yamlindex 4607d7d..988e49e 100644--- a/python/rapidocr_openvino/config.yaml+++ b/python/rapidocr_openvino/config.yaml@@ -9,7 +9,7 @@ Global:Det:use_cuda: false- model_path: models/ch_PP-OCRv3_det_infer.onnx+ model_path: models/ch_PP-OCRv4_det_infer.onnxlimit_side_len: 736limit_type: min@@ -34,7 +34,7 @@ Cls:Rec:use_cuda: false- model_path: models/ch_PP-OCRv3_rec_infer.onnx+ model_path: models/ch_PP-OCRv4_rec_infer.onnxrec_img_shape: [3, 48, 320]rec_batch_num: 6diff --git a/python/tests/test_all_ort.py b/python/tests/test_all_ort.pyindex 4427c6c..99f818d 100644--- a/python/tests/test_all_ort.py+++ b/python/tests/test_all_ort.py@@ -4,16 +4,15 @@import sysfrom pathlib import Path-import numpy as npimport cv2+import numpy as npimport pytest-root_dir = Path(__file__).resolve().parent.parentprint(root_dir)sys.path.append(str(root_dir))-from rapidocr_onnxruntime import RapidOCR, LoadImageError+from rapidocr_onnxruntime import LoadImageError, RapidOCRrapid_ocr = RapidOCR()tests_dir = root_dir / "tests" / "test_files"@@ -24,7 +23,7 @@ def test_normal():img = cv2.imread(str(image_path))result, _ = rapid_ocr(img)assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_empty():@@ -45,7 +44,7 @@ def test_input_str():image_path = tests_dir / "ch_en_num.jpg"result, _ = rapid_ocr(str(image_path))assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_input_bytes():@@ -53,14 +52,14 @@ def test_input_bytes():with open(image_path, "rb") as f:result, _ = rapid_ocr(f.read())assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_input_path():image_path = tests_dir / "ch_en_num.jpg"result, _ = rapid_ocr(image_path)assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_input_parameters():diff --git a/python/tests/test_all_vino.py b/python/tests/test_all_vino.pyindex 530f04a..1ef92b8 100644--- a/python/tests/test_all_vino.py+++ b/python/tests/test_all_vino.py@@ -4,15 +4,14 @@import sysfrom pathlib import Path-import numpy as npimport cv2+import numpy as npimport pytest-root_dir = Path(__file__).resolve().parent.parentsys.path.append(str(root_dir))-from rapidocr_openvino import RapidOCR, LoadImageError+from rapidocr_openvino import LoadImageError, RapidOCRrapid_ocr = RapidOCR()@@ -24,7 +23,7 @@ def test_normal():img = cv2.imread(str(image_path))result, _ = rapid_ocr(img)assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_empty():@@ -45,7 +44,7 @@ def test_input_str():image_path = tests_dir / "ch_en_num.jpg"result, _ = rapid_ocr(str(image_path))assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_input_bytes():@@ -53,14 +52,14 @@ def test_input_bytes():with open(image_path, "rb") as f:result, _ = rapid_ocr(f.read())assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_input_path():image_path = tests_dir / "ch_en_num.jpg"result, _ = rapid_ocr(image_path)assert result[0][1] == "ζ£εδΏι"- assert len(result) == 17+ assert len(result) == 16def test_input_parameters():