docling-ibm-models 0.1.0__py3-none-any.whl → 1.0.0__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.
@@ -177,7 +177,7 @@ class TFPredictor:
177
177
  self._model_type = self._config["model"]["type"]
178
178
  # Added import here to avoid loading turbotransformer library unnecessarily
179
179
  if self._model_type == "TableModel04_rs":
180
- from docling_ibm_models.tableformer.models.table04_rs.tablemodel04_rs import ( # noqa: F401
180
+ from docling_ibm_models.tableformer.models.table04_rs.tablemodel04_rs import ( # noqa
181
181
  TableModel04_rs,
182
182
  )
183
183
  for candidate in BaseModel.__subclasses__():
@@ -437,10 +437,10 @@ class TFPredictor:
437
437
  for pdf_cell in pdf_cells:
438
438
  if pdf_cell["id"] == docling_item["cell_id"]:
439
439
  text_cell_bbox = {
440
- "b": pdf_cell["bbox"][1],
440
+ "b": pdf_cell["bbox"][3],
441
441
  "l": pdf_cell["bbox"][0],
442
442
  "r": pdf_cell["bbox"][2],
443
- "t": pdf_cell["bbox"][3],
443
+ "t": pdf_cell["bbox"][1],
444
444
  "token": pdf_cell["text"],
445
445
  }
446
446
  tf_cells_map[cell_key]["text_cell_bboxes"].append(
@@ -468,10 +468,10 @@ class TFPredictor:
468
468
  for pdf_cell in pdf_cells:
469
469
  if pdf_cell["id"] == docling_item["cell_id"]:
470
470
  text_cell_bbox = {
471
- "b": pdf_cell["bbox"][1],
471
+ "b": pdf_cell["bbox"][3],
472
472
  "l": pdf_cell["bbox"][0],
473
473
  "r": pdf_cell["bbox"][2],
474
- "t": pdf_cell["bbox"][3],
474
+ "t": pdf_cell["bbox"][1],
475
475
  "token": pdf_cell["text"],
476
476
  }
477
477
  tf_cells_map[cell_key]["text_cell_bboxes"].append(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling-ibm-models
3
- Version: 0.1.0
3
+ Version: 1.0.0
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
@@ -27,22 +27,21 @@ Requires-Dist: numpy (>=1.24.4,<2.0.0)
27
27
  Requires-Dist: onnxruntime (>=1.16.2,<2.0.0)
28
28
  Requires-Dist: opencv-python (>=4.9.0.80,<5.0.0.0) ; sys_platform != "linux"
29
29
  Requires-Dist: opencv-python-headless (>=4.9.0.80,<5.0.0.0) ; sys_platform == "linux"
30
- Requires-Dist: torch @ https://download.pytorch.org/whl/cpu/torch-2.2.2%2Bcpu-cp311-cp311-linux_x86_64.whl ; python_version == "3.11" and platform_machine == "x86_64" and sys_platform == "linux"
31
- Requires-Dist: torch @ https://download.pytorch.org/whl/cpu/torch-2.2.2%2Bcpu-cp312-cp312-linux_x86_64.whl ; python_version == "3.12" and platform_machine == "x86_64" and sys_platform == "linux"
32
- Requires-Dist: torch @ https://download.pytorch.org/whl/cpu/torch-2.2.2-cp311-none-macosx_10_9_x86_64.whl ; python_version == "3.11" and platform_machine == "x86_64" and sys_platform == "darwin"
33
- Requires-Dist: torch @ https://download.pytorch.org/whl/cpu/torch-2.2.2-cp311-none-macosx_11_0_arm64.whl ; python_version == "3.11" and platform_machine == "arm64" and sys_platform == "darwin"
34
- Requires-Dist: torch @ https://download.pytorch.org/whl/cpu/torch-2.2.2-cp312-none-macosx_10_9_x86_64.whl ; python_version == "3.12" and platform_machine == "x86_64" and sys_platform == "darwin"
35
- Requires-Dist: torch @ https://download.pytorch.org/whl/cpu/torch-2.2.2-cp312-none-macosx_11_0_arm64.whl ; python_version == "3.12" and platform_machine == "arm64" and sys_platform == "darwin"
36
- Requires-Dist: torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.17.2%2Bcpu-cp311-cp311-linux_x86_64.whl ; python_version == "3.11" and platform_machine == "x86_64" and sys_platform == "linux"
37
- Requires-Dist: torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.17.2%2Bcpu-cp312-cp312-linux_x86_64.whl ; python_version == "3.12" and platform_machine == "x86_64" and sys_platform == "linux"
38
- Requires-Dist: torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.17.2-cp311-cp311-macosx_10_13_x86_64.whl ; python_version == "3.11" and platform_machine == "x86_64" and sys_platform == "darwin"
39
- Requires-Dist: torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.17.2-cp311-cp311-macosx_11_0_arm64.whl ; python_version == "3.11" and platform_machine == "arm64" and sys_platform == "darwin"
40
- Requires-Dist: torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.17.2-cp312-cp312-macosx_10_13_x86_64.whl ; python_version == "3.12" and platform_machine == "x86_64" and sys_platform == "darwin"
41
- Requires-Dist: torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.17.2-cp312-cp312-macosx_11_0_arm64.whl ; python_version == "3.12" and platform_machine == "arm64" and sys_platform == "darwin"
30
+ Requires-Dist: torch (==2.2.2)
31
+ Requires-Dist: torchvision (==0.17.2)
42
32
  Requires-Dist: tqdm (>=4.64.0,<5.0.0)
43
33
  Description-Content-Type: text/markdown
44
34
 
45
- # Docling-models
35
+ [![PyPI version](https://img.shields.io/pypi/v/docling-ibm-models)](https://pypi.org/project/docling-ibm-models/)
36
+ ![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue)
37
+ [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
38
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
39
+ [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
40
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
41
+ [![Models on Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue)](https://huggingface.co/ds4sd/docling-models/)
42
+ [![License MIT](https://img.shields.io/github/license/ds4sd/deepsearch-toolkit)](https://opensource.org/licenses/MIT)
43
+
44
+ # Docling IBM models
46
45
 
47
46
  AI modules to support the Dockling PDF document conversion project.
48
47
 
@@ -51,7 +50,7 @@ AI modules to support the Dockling PDF document conversion project.
51
50
 
52
51
 
53
52
  ## Installation Instructions
54
-
53
+
55
54
  ### MacOS / Linux
56
55
 
57
56
  To install `poetry` locally, use either `pip` or `homebrew`.
@@ -59,8 +58,8 @@ To install `poetry` locally, use either `pip` or `homebrew`.
59
58
  To install `poetry` on a docker container, do the following:
60
59
  ```
61
60
  ENV POETRY_NO_INTERACTION=1 \
62
- POETRY_VIRTUALENVS_CREATE=false
63
-
61
+ POETRY_VIRTUALENVS_CREATE=false
62
+
64
63
  # Install poetry
65
64
  RUN curl -sSL 'https://install.python-poetry.org' > install-poetry.py \
66
65
  && python install-poetry.py \
@@ -68,7 +67,7 @@ RUN curl -sSL 'https://install.python-poetry.org' > install-poetry.py \
68
67
  && rm install-poetry.py
69
68
  ```
70
69
 
71
- To install and run the package, simply set up a poetry environment
70
+ To install and run the package, simply set up a poetry environment
72
71
 
73
72
  ```
74
73
  poetry env use $(which python3.11)
@@ -115,7 +114,7 @@ Example configuration can be seen inside test `tests/test_tf_predictor.py`
115
114
  These are the main sections of the configuration file:
116
115
 
117
116
  - `dataset`: The directory for prepared data and the parameters used during the data loading.
118
- - `model`: The type, name and hyperparameters of the model. Also the directory to save/load the
117
+ - `model`: The type, name and hyperparameters of the model. Also the directory to save/load the
119
118
  trained checkpoint files.
120
119
  - `train`: Parameters for the training of the model.
121
120
  - `predict`: Parameters for the evaluation of the model.
@@ -141,7 +140,7 @@ First download the model weights (see above), then run:
141
140
  ./devtools/check_code.sh
142
141
  ```
143
142
 
144
- This will also generate prediction and matching visualizations that can be found here:
143
+ This will also generate prediction and matching visualizations that can be found here:
145
144
  `tests\test_data\viz\`
146
145
 
147
146
  Visualization outlines:
@@ -7,7 +7,7 @@ docling_ibm_models/tableformer/data_management/functional.py,sha256=UrXsEm4DSc1Q
7
7
  docling_ibm_models/tableformer/data_management/matching_post_processor.py,sha256=HYG-wx5PQC38hTQfyXr3zUnZ6--aSs55x8g9PdsROGU,54207
8
8
  docling_ibm_models/tableformer/data_management/tf_cell_matcher.py,sha256=DFu428Cr84maT9WehdoZkpkJKeahwe5JlclvTC6fuVY,20870
9
9
  docling_ibm_models/tableformer/data_management/tf_dataset.py,sha256=6_qSsYt6qoE2JBzUNrJfCDX3Kgg7tyrv3kimGLdEQ5o,49890
10
- docling_ibm_models/tableformer/data_management/tf_predictor.py,sha256=I317-qMK13eqUvT4Ix2Q02uzkKQDCoKcf9GqIGVBy70,38508
10
+ docling_ibm_models/tableformer/data_management/tf_predictor.py,sha256=3e7ICgs3r9YclOLWuoOvqSveQHcERvZYmOBMtmslJqU,38502
11
11
  docling_ibm_models/tableformer/data_management/transforms.py,sha256=_i1HXkX8LAuHbeGRrg8kF9yFNJRQZOKmWzxKt559ABQ,13268
12
12
  docling_ibm_models/tableformer/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  docling_ibm_models/tableformer/models/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -26,7 +26,7 @@ docling_ibm_models/tableformer/utils/app_profiler.py,sha256=13dvwo5byzfP2ejqGBFw
26
26
  docling_ibm_models/tableformer/utils/torch_utils.py,sha256=uN0rK9mSXy1ewBnBnILrWebJhhVU4N-XJZBqNiLJwlQ,8893
27
27
  docling_ibm_models/tableformer/utils/utils.py,sha256=8Bxf1rEn977lFbY9NX0r5xh9PvxIRipQZX_EZW92XfA,10980
28
28
  docling_ibm_models/tableformer/utils/variance.py,sha256=USjRwaMsCmzvc6PeWskaAJnUjbliRVd_MqNKLjMDQw8,4675
29
- docling_ibm_models-0.1.0.dist-info/LICENSE,sha256=ACwmltkrXIz5VsEQcrqljq-fat6ZXAMepjXGoe40KtE,1069
30
- docling_ibm_models-0.1.0.dist-info/METADATA,sha256=a1WTE9WZmQAkRhvb3VD9DtuJE64XL5Z5WdQ9Q0f1R6Q,8350
31
- docling_ibm_models-0.1.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
- docling_ibm_models-0.1.0.dist-info/RECORD,,
29
+ docling_ibm_models-1.0.0.dist-info/LICENSE,sha256=ACwmltkrXIz5VsEQcrqljq-fat6ZXAMepjXGoe40KtE,1069
30
+ docling_ibm_models-1.0.0.dist-info/METADATA,sha256=x4XQzAxVvgbNsVzMTFQGcvEQlDxfqx3l6thHcsL-apg,6968
31
+ docling_ibm_models-1.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ docling_ibm_models-1.0.0.dist-info/RECORD,,