onnxtr 0.8.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. {onnxtr-0.8.0 → onnxtr-0.8.1}/PKG-INFO +7 -6
  2. {onnxtr-0.8.0 → onnxtr-0.8.1}/README.md +4 -3
  3. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/contrib/artefacts.py +1 -1
  4. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/contrib/base.py +1 -1
  5. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/file_utils.py +1 -2
  6. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/io/elements.py +1 -1
  7. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/io/html.py +1 -1
  8. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/io/image.py +1 -1
  9. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/io/pdf.py +1 -1
  10. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/io/reader.py +1 -1
  11. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/_utils.py +55 -17
  12. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/builder.py +1 -1
  13. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/classification/models/mobilenet.py +1 -1
  14. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/classification/predictor/base.py +1 -1
  15. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/classification/zoo.py +1 -1
  16. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/_utils/base.py +1 -1
  17. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/core.py +1 -1
  18. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/models/differentiable_binarization.py +1 -1
  19. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/models/fast.py +1 -1
  20. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/models/linknet.py +1 -1
  21. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/postprocessor/base.py +1 -1
  22. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/predictor/base.py +1 -1
  23. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/zoo.py +1 -1
  24. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/engine.py +3 -1
  25. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/factory/hub.py +18 -13
  26. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/predictor/base.py +1 -1
  27. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/predictor/predictor.py +1 -1
  28. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/preprocessor/base.py +1 -1
  29. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/core.py +1 -1
  30. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/crnn.py +1 -1
  31. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/master.py +1 -1
  32. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/parseq.py +1 -1
  33. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/sar.py +1 -1
  34. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/viptr.py +1 -1
  35. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/vitstr.py +1 -1
  36. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/predictor/_utils.py +1 -1
  37. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/predictor/base.py +1 -1
  38. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/utils.py +1 -1
  39. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/zoo.py +1 -1
  40. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/zoo.py +1 -1
  41. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/transforms/base.py +1 -1
  42. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/common_types.py +1 -1
  43. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/data.py +1 -2
  44. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/fonts.py +1 -1
  45. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/geometry.py +1 -1
  46. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/multithreading.py +1 -1
  47. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/reconstitution.py +1 -1
  48. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/repr.py +1 -1
  49. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/visualization.py +1 -1
  50. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/vocabs.py +1 -1
  51. onnxtr-0.8.1/onnxtr/version.py +1 -0
  52. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr.egg-info/PKG-INFO +7 -6
  53. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr.egg-info/requires.txt +2 -2
  54. {onnxtr-0.8.0 → onnxtr-0.8.1}/pyproject.toml +2 -2
  55. {onnxtr-0.8.0 → onnxtr-0.8.1}/setup.py +2 -2
  56. onnxtr-0.8.0/onnxtr/version.py +0 -1
  57. {onnxtr-0.8.0 → onnxtr-0.8.1}/LICENSE +0 -0
  58. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/__init__.py +0 -0
  59. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/contrib/__init__.py +0 -0
  60. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/io/__init__.py +0 -0
  61. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/__init__.py +0 -0
  62. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/classification/__init__.py +0 -0
  63. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/classification/models/__init__.py +0 -0
  64. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/classification/predictor/__init__.py +0 -0
  65. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/__init__.py +0 -0
  66. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/_utils/__init__.py +0 -0
  67. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/models/__init__.py +0 -0
  68. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/postprocessor/__init__.py +0 -0
  69. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/detection/predictor/__init__.py +0 -0
  70. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/factory/__init__.py +0 -0
  71. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/predictor/__init__.py +0 -0
  72. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/preprocessor/__init__.py +0 -0
  73. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/__init__.py +0 -0
  74. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/models/__init__.py +0 -0
  75. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/models/recognition/predictor/__init__.py +0 -0
  76. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/py.typed +0 -0
  77. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/transforms/__init__.py +0 -0
  78. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr/utils/__init__.py +0 -0
  79. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr.egg-info/SOURCES.txt +0 -0
  80. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr.egg-info/dependency_links.txt +0 -0
  81. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr.egg-info/top_level.txt +0 -0
  82. {onnxtr-0.8.0 → onnxtr-0.8.1}/onnxtr.egg-info/zip-safe +0 -0
  83. {onnxtr-0.8.0 → onnxtr-0.8.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onnxtr
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Onnx Text Recognition (OnnxTR): docTR Onnx-Wrapper for high-performance OCR on documents.
5
5
  Author-email: Felix Dittrich <felixdittrich92@gmail.com>
6
6
  Maintainer: Felix Dittrich
@@ -227,11 +227,11 @@ Description-Content-Type: text/markdown
227
227
  License-File: LICENSE
228
228
  Requires-Dist: numpy<3.0.0,>=1.16.0
229
229
  Requires-Dist: scipy<2.0.0,>=1.4.0
230
- Requires-Dist: pypdfium2<5.0.0,>=4.11.0
230
+ Requires-Dist: pypdfium2<6.0.0,>=4.11.0
231
231
  Requires-Dist: pyclipper<2.0.0,>=1.2.0
232
232
  Requires-Dist: rapidfuzz<4.0.0,>=3.0.0
233
233
  Requires-Dist: langdetect<2.0.0,>=1.0.9
234
- Requires-Dist: huggingface-hub<1.0.0,>=0.23.0
234
+ Requires-Dist: huggingface-hub<2.0.0,>=0.23.0
235
235
  Requires-Dist: Pillow>=9.2.0
236
236
  Requires-Dist: defusedxml>=0.7.0
237
237
  Requires-Dist: anyascii>=0.3.2
@@ -294,8 +294,8 @@ Dynamic: license-file
294
294
  [![codecov](https://codecov.io/gh/felixdittrich92/OnnxTR/graph/badge.svg?token=WVFRCQBOLI)](https://codecov.io/gh/felixdittrich92/OnnxTR)
295
295
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4fff4d764bb14fb8b4f4afeb9587231b)](https://app.codacy.com/gh/felixdittrich92/OnnxTR/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
296
296
  [![CodeFactor](https://www.codefactor.io/repository/github/felixdittrich92/onnxtr/badge)](https://www.codefactor.io/repository/github/felixdittrich92/onnxtr)
297
- [![Socket Badge](https://socket.dev/api/badge/pypi/package/onnxtr/0.8.0?artifact_id=tar-gz)](https://socket.dev/pypi/package/onnxtr/overview/0.8.0/tar-gz)
298
- [![Pypi](https://img.shields.io/badge/pypi-v0.8.0-blue.svg)](https://pypi.org/project/OnnxTR/)
297
+ [![Socket Badge](https://socket.dev/api/badge/pypi/package/onnxtr/0.8.1?artifact_id=tar-gz)](https://socket.dev/pypi/package/onnxtr/overview/0.8.1/tar-gz)
298
+ [![Pypi](https://img.shields.io/badge/pypi-v0.8.1-blue.svg)](https://pypi.org/project/OnnxTR/)
299
299
  [![Docker Images](https://img.shields.io/badge/Docker-4287f5?style=flat&logo=docker&logoColor=white)](https://github.com/felixdittrich92/OnnxTR/pkgs/container/onnxtr)
300
300
  [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Felix92/OnnxTR-OCR)
301
301
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/onnxtr)
@@ -325,7 +325,7 @@ You can then install the latest release of the package using [pypi](https://pypi
325
325
 
326
326
  **NOTE:**
327
327
 
328
- Currently supported execution providers by default are: CPU, CUDA (NVIDIA GPU), OpenVINO (Intel CPU | GPU).
328
+ Currently supported execution providers by default are: CPU, CUDA (NVIDIA GPU), OpenVINO (Intel CPU | GPU), CoreML (Apple Silicon).
329
329
 
330
330
  For GPU support please take a look at: [ONNX Runtime](https://onnxruntime.ai/getting-started).
331
331
 
@@ -355,6 +355,7 @@ If you have:
355
355
 
356
356
  - a NVIDIA GPU, use one of the `gpu` variants
357
357
  - an Intel CPU or GPU, use one of the `openvino` variants
358
+ - an Apple Silicon Mac, use one of the `cpu` variants (CoreML is auto-detected)
358
359
  - otherwise, use one of the `cpu` variants
359
360
 
360
361
  **OpenVINO:**
@@ -7,8 +7,8 @@
7
7
  [![codecov](https://codecov.io/gh/felixdittrich92/OnnxTR/graph/badge.svg?token=WVFRCQBOLI)](https://codecov.io/gh/felixdittrich92/OnnxTR)
8
8
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4fff4d764bb14fb8b4f4afeb9587231b)](https://app.codacy.com/gh/felixdittrich92/OnnxTR/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
9
9
  [![CodeFactor](https://www.codefactor.io/repository/github/felixdittrich92/onnxtr/badge)](https://www.codefactor.io/repository/github/felixdittrich92/onnxtr)
10
- [![Socket Badge](https://socket.dev/api/badge/pypi/package/onnxtr/0.8.0?artifact_id=tar-gz)](https://socket.dev/pypi/package/onnxtr/overview/0.8.0/tar-gz)
11
- [![Pypi](https://img.shields.io/badge/pypi-v0.8.0-blue.svg)](https://pypi.org/project/OnnxTR/)
10
+ [![Socket Badge](https://socket.dev/api/badge/pypi/package/onnxtr/0.8.1?artifact_id=tar-gz)](https://socket.dev/pypi/package/onnxtr/overview/0.8.1/tar-gz)
11
+ [![Pypi](https://img.shields.io/badge/pypi-v0.8.1-blue.svg)](https://pypi.org/project/OnnxTR/)
12
12
  [![Docker Images](https://img.shields.io/badge/Docker-4287f5?style=flat&logo=docker&logoColor=white)](https://github.com/felixdittrich92/OnnxTR/pkgs/container/onnxtr)
13
13
  [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Felix92/OnnxTR-OCR)
14
14
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/onnxtr)
@@ -38,7 +38,7 @@ You can then install the latest release of the package using [pypi](https://pypi
38
38
 
39
39
  **NOTE:**
40
40
 
41
- Currently supported execution providers by default are: CPU, CUDA (NVIDIA GPU), OpenVINO (Intel CPU | GPU).
41
+ Currently supported execution providers by default are: CPU, CUDA (NVIDIA GPU), OpenVINO (Intel CPU | GPU), CoreML (Apple Silicon).
42
42
 
43
43
  For GPU support please take a look at: [ONNX Runtime](https://onnxruntime.ai/getting-started).
44
44
 
@@ -68,6 +68,7 @@ If you have:
68
68
 
69
69
  - a NVIDIA GPU, use one of the `gpu` variants
70
70
  - an Intel CPU or GPU, use one of the `openvino` variants
71
+ - an Apple Silicon Mac, use one of the `cpu` variants (CoreML is auto-detected)
71
72
  - otherwise, use one of the `cpu` variants
72
73
 
73
74
  **OpenVINO:**
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,10 +1,9 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
5
5
 
6
6
  import importlib.metadata
7
- import importlib.util
8
7
  import logging
9
8
 
10
9
  __all__ = ["requires_package"]
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -25,6 +25,8 @@ def get_max_width_length_ratio(contour: np.ndarray) -> float:
25
25
  the maximum shape ratio
26
26
  """
27
27
  _, (w, h), _ = cv2.minAreaRect(contour)
28
+ if w == 0 or h == 0:
29
+ return 0.0
28
30
  return max(w / h, h / w)
29
31
 
30
32
 
@@ -52,7 +54,7 @@ def estimate_orientation(
52
54
  the estimated angle of the page (clockwise, negative for left side rotation, positive for right side rotation)
53
55
  """
54
56
  assert len(img.shape) == 3 and img.shape[-1] in [1, 3], f"Image shape {img.shape} not supported"
55
- thresh = None
57
+
56
58
  # Convert image to grayscale if necessary
57
59
  if img.shape[-1] == 3:
58
60
  gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
@@ -61,11 +63,14 @@ def estimate_orientation(
61
63
  else:
62
64
  thresh = img.astype(np.uint8)
63
65
 
64
- page_orientation, orientation_confidence = general_page_orientation or (None, 0.0)
65
- if page_orientation is not None and orientation_confidence >= min_confidence:
66
+ page_orientation, orientation_confidence = general_page_orientation or (0, 0.0)
67
+ is_confident = page_orientation is not None and orientation_confidence >= min_confidence
68
+ base_angle = page_orientation if is_confident else 0
69
+
70
+ if is_confident:
66
71
  # We rotate the image to the general orientation which improves the detection
67
72
  # No expand needed bitmap is already padded
68
- thresh = rotate_image(thresh, -page_orientation)
73
+ thresh = rotate_image(thresh, -base_angle)
69
74
  else: # That's only required if we do not work on the detection models bin map
70
75
  # try to merge words in lines
71
76
  (h, w) = img.shape[:2]
@@ -87,30 +92,63 @@ def estimate_orientation(
87
92
  angles = []
88
93
  for contour in contours[:n_ct]:
89
94
  _, (w, h), angle = cv2.minAreaRect(contour)
90
- if w / h > ratio_threshold_for_lines: # select only contours with ratio like lines
91
- angles.append(angle)
92
- elif w / h < 1 / ratio_threshold_for_lines: # if lines are vertical, substract 90 degree
93
- angles.append(angle - 90)
95
+
96
+ # OpenCV version-proof normalization: force 'w' to be the long side
97
+ # so the angle is consistently relative to the major axis.
98
+ # https://github.com/opencv/opencv/pull/28051/changes
99
+ if w < h:
100
+ w, h = h, w
101
+ angle -= 90
102
+
103
+ # Normalize angle to be within [-90, 90]
104
+ while angle <= -90:
105
+ angle += 180
106
+ while angle > 90:
107
+ angle -= 180
108
+
109
+ if h > 0:
110
+ if w / h > ratio_threshold_for_lines: # select only contours with ratio like lines
111
+ angles.append(angle)
112
+ elif w / h < 1 / ratio_threshold_for_lines: # if lines are vertical, substract 90 degree
113
+ angles.append(angle - 90)
94
114
 
95
115
  if len(angles) == 0:
96
- estimated_angle = 0 # in case no angles is found
116
+ skew_angle = 0 # in case no angles is found
97
117
  else:
118
+ # median_low picks a value from the data to avoid outliers
98
119
  median = -median_low(angles)
99
- estimated_angle = -round(median) if abs(median) != 0 else 0
120
+ skew_angle = -round(median) if abs(median) != 0 else 0
121
+
122
+ # Resolve the 90-degree flip ambiguity.
123
+ # If the estimation is exactly 90/-90, it's usually a vertical detection of horizontal lines.
124
+ if abs(skew_angle) == 90:
125
+ skew_angle = 0
100
126
 
101
127
  # combine with the general orientation and the estimated angle
102
- if page_orientation is not None and orientation_confidence >= min_confidence:
128
+ # Apply the detected skew to our base orientation
129
+ final_angle = base_angle + skew_angle
130
+
131
+ # Standardize result to [-179, 180] range to handle wrap-around cases (e.g., 180 + -31)
132
+ while final_angle > 180:
133
+ final_angle -= 360
134
+ while final_angle <= -180:
135
+ final_angle += 360
136
+
137
+ if is_confident:
138
+ # If the estimated angle is perpendicular, treat it as 0 to avoid wrong flips
139
+ if abs(skew_angle) % 90 == 0:
140
+ return page_orientation
141
+
103
142
  # special case where the estimated angle is mostly wrong:
104
143
  # case 1: - and + swapped
105
144
  # case 2: estimated angle is completely wrong
106
145
  # so in this case we prefer the general page orientation
107
- if abs(estimated_angle) == abs(page_orientation):
146
+ if abs(skew_angle) == abs(page_orientation) and page_orientation != 0:
108
147
  return page_orientation
109
- estimated_angle = estimated_angle if page_orientation == 0 else page_orientation + estimated_angle
110
- if estimated_angle > 180:
111
- estimated_angle -= 360
112
148
 
113
- return estimated_angle # return the clockwise angle (negative - left side rotation, positive - right side rotation)
149
+ return int(
150
+ final_angle
151
+ ) # return the clockwise angle (negative - left side rotation, positive - right side rotation)
114
152
 
115
153
 
116
154
  def rectify_crops(
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -65,6 +65,8 @@ class EngineConfig:
65
65
  },
66
66
  ),
67
67
  )
68
+ elif "CoreMLExecutionProvider" in available_providers: # pragma: no cover
69
+ providers.insert(0, ("CoreMLExecutionProvider", {}))
68
70
  return providers
69
71
 
70
72
  def _init_sess_opts(self) -> SessionOptions:
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -7,18 +7,16 @@
7
7
 
8
8
  import json
9
9
  import logging
10
- import os
11
10
  import shutil
12
11
  import subprocess
12
+ import tempfile
13
13
  import textwrap
14
14
  from pathlib import Path
15
15
  from typing import Any
16
16
 
17
17
  from huggingface_hub import (
18
18
  HfApi,
19
- Repository,
20
19
  get_token,
21
- get_token_permission,
22
20
  hf_hub_download,
23
21
  login,
24
22
  )
@@ -39,9 +37,9 @@ AVAILABLE_ARCHS = {
39
37
  def login_to_hub() -> None: # pragma: no cover
40
38
  """Login to huggingface hub"""
41
39
  access_token = get_token()
42
- if access_token is not None and get_token_permission(access_token):
40
+ if access_token is not None:
43
41
  logging.info("Huggingface Hub token found and valid")
44
- login(token=access_token, write_permission=True)
42
+ login(token=access_token)
45
43
  else:
46
44
  login()
47
45
  # check if git lfs is installed
@@ -165,16 +163,23 @@ def push_to_hf_hub(
165
163
 
166
164
  commit_message = f"Add {model_name} model"
167
165
 
168
- local_cache_dir = os.path.join(os.path.expanduser("~"), ".cache", "huggingface", "hub", model_name)
169
- repo_url = HfApi().create_repo(model_name, token=get_token(), exist_ok=override)
170
- repo = Repository(local_dir=local_cache_dir, clone_from=repo_url)
166
+ # Create repository
167
+ api = HfApi()
168
+ api.create_repo(model_name, token=get_token(), exist_ok=False)
171
169
 
172
- with repo.commit(commit_message):
173
- _save_model_and_config_for_hf_hub(model, repo.local_dir, arch=arch, task=task)
174
- readme_path = Path(repo.local_dir) / "README.md"
170
+ # Save model files to a temporary directory
171
+ with tempfile.TemporaryDirectory() as tmp_dir:
172
+ _save_model_and_config_for_hf_hub(model, tmp_dir, arch=arch, task=task)
173
+ readme_path = Path(tmp_dir) / "README.md"
175
174
  readme_path.write_text(readme)
176
175
 
177
- repo.git_push()
176
+ # Upload all files to the hub
177
+ api.upload_folder(
178
+ folder_path=tmp_dir,
179
+ repo_id=model_name,
180
+ commit_message=commit_message,
181
+ token=get_token(),
182
+ )
178
183
 
179
184
 
180
185
  def from_hub(repo_id: str, engine_cfg: EngineConfig | None = None, **kwargs: Any):
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -9,7 +9,6 @@ import hashlib
9
9
  import logging
10
10
  import os
11
11
  import re
12
- import urllib
13
12
  import urllib.error
14
13
  import urllib.request
15
14
  from pathlib import Path
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -0,0 +1 @@
1
+ __version__ = 'v0.8.1'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onnxtr
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Onnx Text Recognition (OnnxTR): docTR Onnx-Wrapper for high-performance OCR on documents.
5
5
  Author-email: Felix Dittrich <felixdittrich92@gmail.com>
6
6
  Maintainer: Felix Dittrich
@@ -227,11 +227,11 @@ Description-Content-Type: text/markdown
227
227
  License-File: LICENSE
228
228
  Requires-Dist: numpy<3.0.0,>=1.16.0
229
229
  Requires-Dist: scipy<2.0.0,>=1.4.0
230
- Requires-Dist: pypdfium2<5.0.0,>=4.11.0
230
+ Requires-Dist: pypdfium2<6.0.0,>=4.11.0
231
231
  Requires-Dist: pyclipper<2.0.0,>=1.2.0
232
232
  Requires-Dist: rapidfuzz<4.0.0,>=3.0.0
233
233
  Requires-Dist: langdetect<2.0.0,>=1.0.9
234
- Requires-Dist: huggingface-hub<1.0.0,>=0.23.0
234
+ Requires-Dist: huggingface-hub<2.0.0,>=0.23.0
235
235
  Requires-Dist: Pillow>=9.2.0
236
236
  Requires-Dist: defusedxml>=0.7.0
237
237
  Requires-Dist: anyascii>=0.3.2
@@ -294,8 +294,8 @@ Dynamic: license-file
294
294
  [![codecov](https://codecov.io/gh/felixdittrich92/OnnxTR/graph/badge.svg?token=WVFRCQBOLI)](https://codecov.io/gh/felixdittrich92/OnnxTR)
295
295
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4fff4d764bb14fb8b4f4afeb9587231b)](https://app.codacy.com/gh/felixdittrich92/OnnxTR/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
296
296
  [![CodeFactor](https://www.codefactor.io/repository/github/felixdittrich92/onnxtr/badge)](https://www.codefactor.io/repository/github/felixdittrich92/onnxtr)
297
- [![Socket Badge](https://socket.dev/api/badge/pypi/package/onnxtr/0.8.0?artifact_id=tar-gz)](https://socket.dev/pypi/package/onnxtr/overview/0.8.0/tar-gz)
298
- [![Pypi](https://img.shields.io/badge/pypi-v0.8.0-blue.svg)](https://pypi.org/project/OnnxTR/)
297
+ [![Socket Badge](https://socket.dev/api/badge/pypi/package/onnxtr/0.8.1?artifact_id=tar-gz)](https://socket.dev/pypi/package/onnxtr/overview/0.8.1/tar-gz)
298
+ [![Pypi](https://img.shields.io/badge/pypi-v0.8.1-blue.svg)](https://pypi.org/project/OnnxTR/)
299
299
  [![Docker Images](https://img.shields.io/badge/Docker-4287f5?style=flat&logo=docker&logoColor=white)](https://github.com/felixdittrich92/OnnxTR/pkgs/container/onnxtr)
300
300
  [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Felix92/OnnxTR-OCR)
301
301
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/onnxtr)
@@ -325,7 +325,7 @@ You can then install the latest release of the package using [pypi](https://pypi
325
325
 
326
326
  **NOTE:**
327
327
 
328
- Currently supported execution providers by default are: CPU, CUDA (NVIDIA GPU), OpenVINO (Intel CPU | GPU).
328
+ Currently supported execution providers by default are: CPU, CUDA (NVIDIA GPU), OpenVINO (Intel CPU | GPU), CoreML (Apple Silicon).
329
329
 
330
330
  For GPU support please take a look at: [ONNX Runtime](https://onnxruntime.ai/getting-started).
331
331
 
@@ -355,6 +355,7 @@ If you have:
355
355
 
356
356
  - a NVIDIA GPU, use one of the `gpu` variants
357
357
  - an Intel CPU or GPU, use one of the `openvino` variants
358
+ - an Apple Silicon Mac, use one of the `cpu` variants (CoreML is auto-detected)
358
359
  - otherwise, use one of the `cpu` variants
359
360
 
360
361
  **OpenVINO:**
@@ -1,10 +1,10 @@
1
1
  numpy<3.0.0,>=1.16.0
2
2
  scipy<2.0.0,>=1.4.0
3
- pypdfium2<5.0.0,>=4.11.0
3
+ pypdfium2<6.0.0,>=4.11.0
4
4
  pyclipper<2.0.0,>=1.2.0
5
5
  rapidfuzz<4.0.0,>=3.0.0
6
6
  langdetect<2.0.0,>=1.0.9
7
- huggingface-hub<1.0.0,>=0.23.0
7
+ huggingface-hub<2.0.0,>=0.23.0
8
8
  Pillow>=9.2.0
9
9
  defusedxml>=0.7.0
10
10
  anyascii>=0.3.2
@@ -33,11 +33,11 @@ dependencies = [
33
33
  # Additional typing support is brought by numpy>=1.22.4, but core build sticks to >=1.16.0
34
34
  "numpy>=1.16.0,<3.0.0",
35
35
  "scipy>=1.4.0,<2.0.0",
36
- "pypdfium2>=4.11.0,<5.0.0",
36
+ "pypdfium2>=4.11.0,<6.0.0",
37
37
  "pyclipper>=1.2.0,<2.0.0",
38
38
  "rapidfuzz>=3.0.0,<4.0.0",
39
39
  "langdetect>=1.0.9,<2.0.0",
40
- "huggingface-hub>=0.23.0,<1.0.0",
40
+ "huggingface-hub>=0.23.0,<2.0.0",
41
41
  "Pillow>=9.2.0",
42
42
  "defusedxml>=0.7.0",
43
43
  "anyascii>=0.3.2",
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021-2025, Mindee | Felix Dittrich.
1
+ # Copyright (C) 2021-2026, Mindee | Felix Dittrich.
2
2
 
3
3
  # This program is licensed under the Apache License 2.0.
4
4
  # See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
@@ -9,7 +9,7 @@ from pathlib import Path
9
9
  from setuptools import setup
10
10
 
11
11
  PKG_NAME = "onnxtr"
12
- VERSION = os.getenv("BUILD_VERSION", "0.8.0a0")
12
+ VERSION = os.getenv("BUILD_VERSION", "0.8.1a0")
13
13
 
14
14
 
15
15
  if __name__ == "__main__":
@@ -1 +0,0 @@
1
- __version__ = 'v0.8.0'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes