π Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.
Fix bug
SWHL162f7f99fd04
diff --git a/.github/workflows/gen_whl_to_pypi_rapid_orientation.yml b/.github/workflows/gen_whl_to_pypi_rapid_orientation.ymlindex 8e56b00..07195ce 100644--- a/.github/workflows/gen_whl_to_pypi_rapid_orientation.yml+++ b/.github/workflows/gen_whl_to_pypi_rapid_orientation.yml@@ -12,12 +12,8 @@ on:jobs:UnitTesting:- runs-on: windows-latest+ runs-on: ubuntu-lateststeps:- - name: Install 7Zip PowerShell Module- shell: powershell- run: Install-Module 7Zip4PowerShell -Force -Verbose-- name: Pull latest codeuses: actions/checkout@v3@@ -33,13 +29,7 @@ jobs:run: |Expand-7Zip -ArchiveFileName ./rapid_orientation_models.zip -TargetPath .\- - name: List all file- shell: cmd- run: |- dir .-- name: Unit testings- shell: cmdrun: |set git_keep_path=%cur_dir%\python\rapid_structure\rapid_orientation\models\.gitkeepdel %git_keep_path%diff --git a/python/rapid_structure/demo.py b/python/rapid_structure/demo.pyindex d69a5d5..a1879f0 100644--- a/python/rapid_structure/demo.py+++ b/python/rapid_structure/demo.py@@ -74,7 +74,7 @@ def demo_table():def demo_orientation():orientation_engine = RapidOrientation()- img = cv2.imread('test_images/table.jpg')+ img = cv2.imread('tests/test_files/img_rot180_demo.jpg')cls_result, _ = orientation_engine(img)print(cls_result)diff --git a/python/rapid_structure/rapid_orientation/rapid_orientation.py b/python/rapid_structure/rapid_orientation/rapid_orientation.pyindex 3fd712a..a2f35dd 100644--- a/python/rapid_structure/rapid_orientation/rapid_orientation.py+++ b/python/rapid_structure/rapid_orientation/rapid_orientation.py@@ -47,6 +47,7 @@ class RapidOrientation():for ops in self.preprocess_ops:images = ops(images)image = np.array(images)+ image = image[np.newaxis, ...]input_dict = {self.input_name: image}pred_output = self.predictor.run(None, input_feed=input_dict)[0]