docling-ibm-models 3.0.0__py3-none-any.whl → 3.1.1__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.
@@ -5,7 +5,7 @@
5
5
  import logging
6
6
  import os
7
7
  from collections.abc import Iterable
8
- from typing import Union
8
+ from typing import Set, Union
9
9
 
10
10
  import numpy as np
11
11
  import torch
@@ -26,6 +26,8 @@ class LayoutPredictor:
26
26
  artifact_path: str,
27
27
  device: str = "cpu",
28
28
  num_threads: int = 4,
29
+ base_threshold: float = 0.3,
30
+ blacklist_classes: Set[str] = set(),
29
31
  ):
30
32
  """
31
33
  Provide the artifact path that contains the LayoutModel file
@@ -63,10 +65,10 @@ class LayoutPredictor:
63
65
  }
64
66
 
65
67
  # Blacklisted classes
66
- self._black_classes = set() # ["Form", "Key-Value Region"])
68
+ self._black_classes = blacklist_classes # set(["Form", "Key-Value Region"])
67
69
 
68
70
  # Set basic params
69
- self._threshold = 0.3 # Score threshold
71
+ self._threshold = base_threshold # Score threshold
70
72
  self._image_size = 640
71
73
  self._size = np.asarray([[self._image_size, self._image_size]], dtype=np.int64)
72
74
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling-ibm-models
3
- Version: 3.0.0
3
+ Version: 3.1.1
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
@@ -23,7 +23,8 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
23
  Requires-Dist: Pillow (>=10.0.0,<11.0.0)
24
24
  Requires-Dist: huggingface_hub (>=0.23,<1)
25
25
  Requires-Dist: jsonlines (>=3.1.0,<4.0.0)
26
- Requires-Dist: numpy (>=1.24.4,<3.0.0)
26
+ Requires-Dist: numpy (>=1.24.4,<2.0.0) ; sys_platform == "darwin" and platform_machine == "x86_64"
27
+ Requires-Dist: numpy (>=1.24.4,<3.0.0) ; sys_platform != "darwin" or platform_machine != "x86_64"
27
28
  Requires-Dist: opencv-python-headless (>=4.6.0.66,<5.0.0.0)
28
29
  Requires-Dist: safetensors[torch] (>=0.4.3,<1)
29
30
  Requires-Dist: torch (>=2.2.2,<3.0.0)
@@ -1,4 +1,4 @@
1
- docling_ibm_models/layoutmodel/layout_predictor.py,sha256=aVLRsKSR_DBiCyTPCQipvkHdcmUYSPOvhp0KVuuVttM,5567
1
+ docling_ibm_models/layoutmodel/layout_predictor.py,sha256=ArVgs7FBOiu23TC-JoybcaTp7F7a4BgYC8uRVxTgx4E,5681
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-3.0.0.dist-info/LICENSE,sha256=mBb7ErEcM8VS9OhiGHnQ2kk75HwPhr54W1Oiz3965MY,1088
26
- docling_ibm_models-3.0.0.dist-info/METADATA,sha256=Od5o3mMpPJnIh7jaWbI1iqnwayYizM53ALYrqEN5UHQ,7023
27
- docling_ibm_models-3.0.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
28
- docling_ibm_models-3.0.0.dist-info/RECORD,,
25
+ docling_ibm_models-3.1.1.dist-info/LICENSE,sha256=mBb7ErEcM8VS9OhiGHnQ2kk75HwPhr54W1Oiz3965MY,1088
26
+ docling_ibm_models-3.1.1.dist-info/METADATA,sha256=71pKGRH9yv4TvZChCCoyyfOUD1FO4biNy1L3nCVKbIU,7181
27
+ docling_ibm_models-3.1.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
28
+ docling_ibm_models-3.1.1.dist-info/RECORD,,