From a981e21743f03d9bbfbe596974123fecfe8a7d62 Mon Sep 17 00:00:00 2001 From: SWHL Date: Wed, 20 Sep 2023 21:54:49 +0800 Subject: [PATCH] Fixed auto_text_det parameter error --- .github/workflows/gen_whl_to_pypi_rapidocr_ort.yml | 14 ++++++++------ .../workflows/gen_whl_to_pypi_rapidocr_vino.yml | 14 ++++++++------ python/rapidocr_onnxruntime/main.py | 2 +- python/rapidocr_openvino/main.py | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml b/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml index aee5d6264..f8b0c9506 100644 --- a/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml +++ b/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml @@ -2,12 +2,14 @@ name: Push rapidocr_onnxruntime to pypi on: push: - branches: [ main ] - paths: - - 'python/rapidocr_onnxruntime/**' - - 'docs/doc_whl_rapidocr_ort.md' - - 'python/setup_onnxruntime.py' - - '.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml' + # branches: [ main ] + # paths: + # - 'python/rapidocr_onnxruntime/**' + # - 'docs/doc_whl_rapidocr_ort.md' + # - 'python/setup_onnxruntime.py' + # - '.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml' + tags: + - v* env: RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.3.0.zip diff --git a/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml b/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml index 5e7255fc1..54b39e7df 100644 --- a/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml +++ b/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml @@ -2,12 +2,14 @@ name: Push rapidocr_openvino to pypi on: push: - branches: [ main ] - paths: - - 'python/rapidocr_openvino/**' - - 'docs/doc_whl_rapidocr_vino.md' - - 'python/setup_openvino.py' - - '.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml' + # branches: [ main ] + # paths: + # - 'python/rapidocr_openvino/**' + # - 'docs/doc_whl_rapidocr_vino.md' + # - 'python/setup_openvino.py' + # - '.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml' + tags: + - v* env: RESOURCES_URL: https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.3.0.zip diff --git a/python/rapidocr_onnxruntime/main.py b/python/rapidocr_onnxruntime/main.py index 483c4a7db..46e06b7d3 100644 --- a/python/rapidocr_onnxruntime/main.py +++ b/python/rapidocr_onnxruntime/main.py @@ -146,7 +146,7 @@ def auto_text_det( else: use_limit_ratio = w / h > self.width_height_ratio - if not self.use_det or h <= self.min_height or use_limit_ratio: + if h <= self.min_height or use_limit_ratio: dt_boxes, img_crop_list = self.get_boxes_img_without_det(img, h, w) return dt_boxes, 0.0, img_crop_list diff --git a/python/rapidocr_openvino/main.py b/python/rapidocr_openvino/main.py index 483c4a7db..46e06b7d3 100644 --- a/python/rapidocr_openvino/main.py +++ b/python/rapidocr_openvino/main.py @@ -146,7 +146,7 @@ def auto_text_det( else: use_limit_ratio = w / h > self.width_height_ratio - if not self.use_det or h <= self.min_height or use_limit_ratio: + if h <= self.min_height or use_limit_ratio: dt_boxes, img_crop_list = self.get_boxes_img_without_det(img, h, w) return dt_boxes, 0.0, img_crop_list