Skip to content

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

Remove PIL package related

SWHL67972d1437d2
diff --git a/.github/workflows/gen_whl_to_pypi_layout.yml b/.github/workflows/gen_whl_to_pypi_layout.yml
index 0643c46..da23f4e 100644
--- a/.github/workflows/gen_whl_to_pypi_layout.yml
+++ b/.github/workflows/gen_whl_to_pypi_layout.yml
@@ -1,4 +1,4 @@
-name: push rapidocr_onnxruntime to pypi
+name: Push rapidocr_layout to pypi
on:
push:
diff --git a/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml b/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml
index 89084f0..f1baa9f 100644
--- a/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml
+++ b/.github/workflows/gen_whl_to_pypi_rapidocr_ort.yml
@@ -1,4 +1,4 @@
-name: push rapidocr_onnxruntime to pypi
+name: Push rapidocr_onnxruntime to pypi
on:
push:
diff --git a/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml b/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml
index 212d302..2b7fa30 100644
--- a/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml
+++ b/.github/workflows/gen_whl_to_pypi_rapidocr_vino.yml
@@ -1,4 +1,4 @@
-name: push rapidocr_openvino to pypi
+name: Push rapidocr_openvino to pypi
on:
push:
diff --git a/python/rapid_structure/rapid_layout/utils.py b/python/rapid_structure/rapid_layout/utils.py
index 0df8081..15be16d 100644
--- a/python/rapid_structure/rapid_layout/utils.py
+++ b/python/rapid_structure/rapid_layout/utils.py
@@ -121,10 +121,7 @@ class NormalizeImage(object):
self.std = np.array(std).reshape(shape).astype('float32')
def __call__(self, data):
- img = data['image']
- from PIL import Image
- if isinstance(img, Image.Image):
- img = np.array(img)
+ img = np.array(data['image'])
assert isinstance(img,
np.ndarray), "invalid input 'img' in NormalizeImage"
data['image'] = (