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.
- docling_ibm_models/layoutmodel/layout_predictor.py +5 -3
- {docling_ibm_models-3.0.0.dist-info → docling_ibm_models-3.1.1.dist-info}/METADATA +3 -2
- {docling_ibm_models-3.0.0.dist-info → docling_ibm_models-3.1.1.dist-info}/RECORD +5 -5
- {docling_ibm_models-3.0.0.dist-info → docling_ibm_models-3.1.1.dist-info}/LICENSE +0 -0
- {docling_ibm_models-3.0.0.dist-info → docling_ibm_models-3.1.1.dist-info}/WHEEL +0 -0
@@ -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 =
|
68
|
+
self._black_classes = blacklist_classes # set(["Form", "Key-Value Region"])
|
67
69
|
|
68
70
|
# Set basic params
|
69
|
-
self._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.
|
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,<
|
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=
|
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.
|
26
|
-
docling_ibm_models-3.
|
27
|
-
docling_ibm_models-3.
|
28
|
-
docling_ibm_models-3.
|
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,,
|
File without changes
|
File without changes
|