docling-ibm-models 2.0.1__py3-none-any.whl → 2.0.2__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.2
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
@@ -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.2.dist-info/LICENSE,sha256=mBb7ErEcM8VS9OhiGHnQ2kk75HwPhr54W1Oiz3965MY,1088
26
+ docling_ibm_models-2.0.2.dist-info/METADATA,sha256=a5MK74QYubU0RurogzwGuKlKC-HLkYzYKD8tpDKrbE0,7134
27
+ docling_ibm_models-2.0.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
+ docling_ibm_models-2.0.2.dist-info/RECORD,,