docling-ibm-models 2.0.1__py3-none-any.whl → 2.0.3__py3-none-any.whl

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.
@@ -153,11 +153,15 @@ class LayoutPredictor:
153
153
 
154
154
  # Check against threshold
155
155
  if score > self._threshold:
156
+ l = min(w, max(0, box[0]))
157
+ t = min(h, max(0, box[1]))
158
+ r = min(w, max(0, box[2]))
159
+ b = min(h, max(0, box[3]))
156
160
  yield {
157
- "l": box[0],
158
- "t": box[1],
159
- "r": box[2],
160
- "b": box[3],
161
+ "l": l,
162
+ "t": t,
163
+ "r": r,
164
+ "b": b,
161
165
  "label": label,
162
166
  "confidence": score,
163
167
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling-ibm-models
3
- Version: 2.0.1
3
+ Version: 2.0.3
4
4
  Summary: This package contains the AI models used by the Docling PDF conversion package
5
5
  License: MIT
6
6
  Keywords: docling,convert,document,pdf,layout model,segmentation,table structure,table former
@@ -26,10 +26,8 @@ Requires-Dist: mean_average_precision (>=2021.4.26.0,<2022.0.0.0)
26
26
  Requires-Dist: numpy (>=1.24.4,<2.0.0) ; python_version < "3.13"
27
27
  Requires-Dist: numpy (>=2.1.0,<3.0.0) ; python_version >= "3.13"
28
28
  Requires-Dist: opencv-python-headless (>=4.6.0.66,<5.0.0.0)
29
- Requires-Dist: torch (>=2.2.2,<2.3.0) ; sys_platform == "darwin" and platform_machine == "x86_64"
30
- Requires-Dist: torch (>=2.2.2,<3.0.0) ; sys_platform != "darwin" or platform_machine != "x86_64"
31
- Requires-Dist: torchvision (>=0,<1) ; sys_platform != "darwin" or platform_machine != "x86_64"
32
- Requires-Dist: torchvision (>=0.17.2,<0.18.0) ; sys_platform == "darwin" and platform_machine == "x86_64"
29
+ Requires-Dist: torch (>=2.2.2,<3.0.0)
30
+ Requires-Dist: torchvision (>=0,<1)
33
31
  Requires-Dist: tqdm (>=4.64.0,<5.0.0)
34
32
  Description-Content-Type: text/markdown
35
33
 
@@ -88,6 +86,14 @@ To update or add new dependencies from `pyproject.toml`, rebuild `poetry.lock`
88
86
  poetry update
89
87
  ```
90
88
 
89
+ #### MacOS Intel
90
+
91
+ When in development mode on MacOS with Intel chips, one can use compatible dependencies with
92
+
93
+ ```console
94
+ poetry update --with mac_intel
95
+ ```
96
+
91
97
 
92
98
  ## Pipeline Overview
93
99
  ![Architecture](docs/tablemodel_overview_color.png)
@@ -1,4 +1,4 @@
1
- docling_ibm_models/layoutmodel/layout_predictor.py,sha256=IDIT8UVzj-U3spWe4nWNxKZqcHkY58teiX_quRu1e0M,5253
1
+ docling_ibm_models/layoutmodel/layout_predictor.py,sha256=5JijEajVGy-vwMDOxDemcbtqlyjFWfWfnCcjMyj5Y_A,5405
2
2
  docling_ibm_models/tableformer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  docling_ibm_models/tableformer/common.py,sha256=2zgGZBFf4fXytEaXrZR2NU6FWdX2kxO0DHlGZmuvpNQ,3230
4
4
  docling_ibm_models/tableformer/data_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -22,7 +22,7 @@ docling_ibm_models/tableformer/utils/app_profiler.py,sha256=Pb7o1zcikKXh7ninaNt4
22
22
  docling_ibm_models/tableformer/utils/mem_monitor.py,sha256=ycZ07fUBVVKKLTVGF54jGPDM2aTkKuZWk1kMbOS0wwQ,6353
23
23
  docling_ibm_models/tableformer/utils/torch_utils.py,sha256=uN0rK9mSXy1ewBnBnILrWebJhhVU4N-XJZBqNiLJwlQ,8893
24
24
  docling_ibm_models/tableformer/utils/utils.py,sha256=8Bxf1rEn977lFbY9NX0r5xh9PvxIRipQZX_EZW92XfA,10980
25
- docling_ibm_models-2.0.1.dist-info/LICENSE,sha256=mBb7ErEcM8VS9OhiGHnQ2kk75HwPhr54W1Oiz3965MY,1088
26
- docling_ibm_models-2.0.1.dist-info/METADATA,sha256=zi08HVzwHCOZHZJLu_ZEjihF_XWPjwOicAXFx5N7h-Y,7134
27
- docling_ibm_models-2.0.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
- docling_ibm_models-2.0.1.dist-info/RECORD,,
25
+ docling_ibm_models-2.0.3.dist-info/LICENSE,sha256=mBb7ErEcM8VS9OhiGHnQ2kk75HwPhr54W1Oiz3965MY,1088
26
+ docling_ibm_models-2.0.3.dist-info/METADATA,sha256=Jsj7RDyKoRjrtCNegy-NSfXTpWC22la_3LRSYWYozk4,6971
27
+ docling_ibm_models-2.0.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
+ docling_ibm_models-2.0.3.dist-info/RECORD,,