Skip to content

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

chore(rapidocr_openvino/paddle): Optim code

SWHL81cea705a8c2
diff --git a/python/rapidocr_openvino/ch_ppocr_v2_cls/__init__.py b/python/rapidocr_openvino/ch_ppocr_cls/__init__.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v2_cls/__init__.py
rename to python/rapidocr_openvino/ch_ppocr_cls/__init__.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v2_cls/config.yaml b/python/rapidocr_openvino/ch_ppocr_cls/config.yaml
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v2_cls/config.yaml
rename to python/rapidocr_openvino/ch_ppocr_cls/config.yaml
diff --git a/python/rapidocr_openvino/ch_ppocr_v2_cls/text_cls.py b/python/rapidocr_openvino/ch_ppocr_cls/text_cls.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v2_cls/text_cls.py
rename to python/rapidocr_openvino/ch_ppocr_cls/text_cls.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v2_cls/utils.py b/python/rapidocr_openvino/ch_ppocr_cls/utils.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v2_cls/utils.py
rename to python/rapidocr_openvino/ch_ppocr_cls/utils.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_det/__init__.py b/python/rapidocr_openvino/ch_ppocr_det/__init__.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_det/__init__.py
rename to python/rapidocr_openvino/ch_ppocr_det/__init__.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_det/config.yaml b/python/rapidocr_openvino/ch_ppocr_det/config.yaml
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_det/config.yaml
rename to python/rapidocr_openvino/ch_ppocr_det/config.yaml
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_det/text_detect.py b/python/rapidocr_openvino/ch_ppocr_det/text_detect.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_det/text_detect.py
rename to python/rapidocr_openvino/ch_ppocr_det/text_detect.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_det/utils.py b/python/rapidocr_openvino/ch_ppocr_det/utils.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_det/utils.py
rename to python/rapidocr_openvino/ch_ppocr_det/utils.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/__init__.py b/python/rapidocr_openvino/ch_ppocr_rec/__init__.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_rec/__init__.py
rename to python/rapidocr_openvino/ch_ppocr_rec/__init__.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml b/python/rapidocr_openvino/ch_ppocr_rec/config.yaml
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_rec/config.yaml
rename to python/rapidocr_openvino/ch_ppocr_rec/config.yaml
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/ppocr_keys_v1.txt b/python/rapidocr_openvino/ch_ppocr_rec/ppocr_keys_v1.txt
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_rec/ppocr_keys_v1.txt
rename to python/rapidocr_openvino/ch_ppocr_rec/ppocr_keys_v1.txt
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py b/python/rapidocr_openvino/ch_ppocr_rec/text_recognize.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_rec/text_recognize.py
rename to python/rapidocr_openvino/ch_ppocr_rec/text_recognize.py
diff --git a/python/rapidocr_openvino/ch_ppocr_v3_rec/utils.py b/python/rapidocr_openvino/ch_ppocr_rec/utils.py
similarity index 100%
rename from python/rapidocr_openvino/ch_ppocr_v3_rec/utils.py
rename to python/rapidocr_openvino/ch_ppocr_rec/utils.py
diff --git a/python/rapidocr_openvino/main.py b/python/rapidocr_openvino/main.py
index 262e299..f53a7d7 100644
--- a/python/rapidocr_openvino/main.py
+++ b/python/rapidocr_openvino/main.py
@@ -8,9 +8,9 @@ from typing import Any, List, Optional, Tuple, Union
import cv2
import numpy as np
-from .ch_ppocr_v2_cls import TextClassifier
-from .ch_ppocr_v3_det import TextDetector
-from .ch_ppocr_v3_rec import TextRecognizer
+from .ch_ppocr_cls import TextClassifier
+from .ch_ppocr_det import TextDetector
+from .ch_ppocr_rec import TextRecognizer
from .utils import (
LoadImage,
UpdateParameters,
diff --git a/python/rapidocr_paddle/ch_ppocr_v2_cls/__init__.py b/python/rapidocr_paddle/ch_ppocr_cls/__init__.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v2_cls/__init__.py
rename to python/rapidocr_paddle/ch_ppocr_cls/__init__.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v2_cls/config.yaml b/python/rapidocr_paddle/ch_ppocr_cls/config.yaml
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v2_cls/config.yaml
rename to python/rapidocr_paddle/ch_ppocr_cls/config.yaml
diff --git a/python/rapidocr_paddle/ch_ppocr_v2_cls/text_cls.py b/python/rapidocr_paddle/ch_ppocr_cls/text_cls.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v2_cls/text_cls.py
rename to python/rapidocr_paddle/ch_ppocr_cls/text_cls.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v2_cls/utils.py b/python/rapidocr_paddle/ch_ppocr_cls/utils.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v2_cls/utils.py
rename to python/rapidocr_paddle/ch_ppocr_cls/utils.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_det/__init__.py b/python/rapidocr_paddle/ch_ppocr_det/__init__.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_det/__init__.py
rename to python/rapidocr_paddle/ch_ppocr_det/__init__.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_det/config.yaml b/python/rapidocr_paddle/ch_ppocr_det/config.yaml
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_det/config.yaml
rename to python/rapidocr_paddle/ch_ppocr_det/config.yaml
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_det/text_detect.py b/python/rapidocr_paddle/ch_ppocr_det/text_detect.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_det/text_detect.py
rename to python/rapidocr_paddle/ch_ppocr_det/text_detect.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_det/utils.py b/python/rapidocr_paddle/ch_ppocr_det/utils.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_det/utils.py
rename to python/rapidocr_paddle/ch_ppocr_det/utils.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_rec/__init__.py b/python/rapidocr_paddle/ch_ppocr_rec/__init__.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_rec/__init__.py
rename to python/rapidocr_paddle/ch_ppocr_rec/__init__.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_rec/config.yaml b/python/rapidocr_paddle/ch_ppocr_rec/config.yaml
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_rec/config.yaml
rename to python/rapidocr_paddle/ch_ppocr_rec/config.yaml
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_rec/ppocr_keys_v1.txt b/python/rapidocr_paddle/ch_ppocr_rec/ppocr_keys_v1.txt
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_rec/ppocr_keys_v1.txt
rename to python/rapidocr_paddle/ch_ppocr_rec/ppocr_keys_v1.txt
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_rec/text_recognize.py b/python/rapidocr_paddle/ch_ppocr_rec/text_recognize.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_rec/text_recognize.py
rename to python/rapidocr_paddle/ch_ppocr_rec/text_recognize.py
diff --git a/python/rapidocr_paddle/ch_ppocr_v3_rec/utils.py b/python/rapidocr_paddle/ch_ppocr_rec/utils.py
similarity index 100%
rename from python/rapidocr_paddle/ch_ppocr_v3_rec/utils.py
rename to python/rapidocr_paddle/ch_ppocr_rec/utils.py
diff --git a/python/rapidocr_paddle/main.py b/python/rapidocr_paddle/main.py
index 262e299..f53a7d7 100644
--- a/python/rapidocr_paddle/main.py
+++ b/python/rapidocr_paddle/main.py
@@ -8,9 +8,9 @@ from typing import Any, List, Optional, Tuple, Union
import cv2
import numpy as np
-from .ch_ppocr_v2_cls import TextClassifier
-from .ch_ppocr_v3_det import TextDetector
-from .ch_ppocr_v3_rec import TextRecognizer
+from .ch_ppocr_cls import TextClassifier
+from .ch_ppocr_det import TextDetector
+from .ch_ppocr_rec import TextRecognizer
from .utils import (
LoadImage,
UpdateParameters,
diff --git a/python/tests/test_paddle.py b/python/tests/test_paddle.py
index b07fb88..dc04b87 100644
--- a/python/tests/test_paddle.py
+++ b/python/tests/test_paddle.py
@@ -194,7 +194,7 @@ def test_input_three_ndim_one_channel():
def test_det():
- module_name = "ch_ppocr_v3_det"
+ module_name = "ch_ppocr_det"
class_name = "TextDetector"
base = BaseModule(package_name)
@@ -212,7 +212,7 @@ def test_det():
def test_cls():
- module_name = "ch_ppocr_v2_cls"
+ module_name = "ch_ppocr_cls"
class_name = "TextClassifier"
base = BaseModule(package_name=package_name)
@@ -231,7 +231,7 @@ def test_cls():
def test_rec():
- module_name = "ch_ppocr_v3_rec"
+ module_name = "ch_ppocr_rec"
class_name = "TextRecognizer"
base = BaseModule(package_name)
diff --git a/python/tests/test_vino.py b/python/tests/test_vino.py
index 506ab0e..1929fa7 100644
--- a/python/tests/test_vino.py
+++ b/python/tests/test_vino.py
@@ -194,7 +194,7 @@ def test_input_three_ndim_one_channel():
def test_det():
- module_name = "ch_ppocr_v3_det"
+ module_name = "ch_ppocr_det"
class_name = "TextDetector"
base = BaseModule(package_name)
@@ -212,7 +212,7 @@ def test_det():
def test_cls():
- module_name = "ch_ppocr_v2_cls"
+ module_name = "ch_ppocr_cls"
class_name = "TextClassifier"
base = BaseModule(package_name=package_name)
@@ -231,7 +231,7 @@ def test_cls():
def test_rec():
- module_name = "ch_ppocr_v3_rec"
+ module_name = "ch_ppocr_rec"
class_name = "TextRecognizer"
base = BaseModule(package_name)