deepdoctection 1.2.6__tar.gz → 1.2.8__tar.gz
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.
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/PKG-INFO +1 -1
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/pyproject.toml +1 -1
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/__init__.py +1 -1
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/anngen.py +13 -7
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection.egg-info/PKG-INFO +1 -1
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/README.md +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/setup.cfg +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/analyzer/__init__.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/analyzer/config.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/analyzer/dd.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/analyzer/factory.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/configs/__init__.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/configs/conf_dd_one.yaml +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/configs/conf_tesseract.yaml +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/configs/profiles.jsonl +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/__init__.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/accmetric.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/base.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/cocometric.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/eval.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/registry.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/eval/tedsmetric.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/__init__.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/base.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/d2detect.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/deskew.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/doctrocr.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/hfdetr.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/hflayoutlm.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/hflm.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/model.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/pdftext.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/tessocr.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/extern/texocr.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/__init__.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/base.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/common.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/concurrency.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/doctectionpipe.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/language.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/layout.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/lm.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/order.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/refine.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/registry.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/segment.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/sub_layout.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/text.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/pipe/transform.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/py.typed +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/train/__init__.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/train/d2_frcnn_train.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/train/hf_detr_train.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/train/hf_layoutlm_train.py +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection.egg-info/SOURCES.txt +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection.egg-info/dependency_links.txt +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection.egg-info/requires.txt +0 -0
- {deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection.egg-info/top_level.txt +0 -0
|
@@ -12,7 +12,7 @@ from dd_core.utils.env_info import collect_env_info
|
|
|
12
12
|
from dd_core.utils.file_utils import _LazyModule
|
|
13
13
|
from dd_core.utils.logger import LoggingRecord, logger
|
|
14
14
|
|
|
15
|
-
__version__ = "1.2.
|
|
15
|
+
__version__ = "1.2.8"
|
|
16
16
|
_IMPORT_STRUCTURE = {
|
|
17
17
|
"analyzer": ["config_sanity_checks", "get_dd_analyzer", "ServiceFactory", "update_cfg_from_defaults"],
|
|
18
18
|
"eval": [
|
|
@@ -95,9 +95,15 @@ def _set_image_keys_to_none(d: Any) -> None:
|
|
|
95
95
|
_set_image_keys_to_none(item)
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
def
|
|
98
|
+
def image_to_cache_dict(image: Image) -> dict[str, Any]:
|
|
99
|
+
"""
|
|
100
|
+
Converting image to dict, by adding extras and removing higher hierarchies
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
image (Image): The image object to serialize and store.
|
|
104
|
+
"""
|
|
99
105
|
image.remove_image_from_lower_hierarchy()
|
|
100
|
-
export_dict = image.as_dict()
|
|
106
|
+
export_dict = image.as_dict(add_extras=True)
|
|
101
107
|
_set_image_keys_to_none(export_dict)
|
|
102
108
|
return export_dict
|
|
103
109
|
|
|
@@ -121,7 +127,7 @@ class LocalDataPointCacheStore(DataPointCacheStore):
|
|
|
121
127
|
Args:
|
|
122
128
|
max_pages (int): Maximum number of pages to keep per document.
|
|
123
129
|
"""
|
|
124
|
-
self.
|
|
130
|
+
self.max_pages = max_pages
|
|
125
131
|
self._pages: dict[str, dict[int, dict[str, Any]]] = {}
|
|
126
132
|
|
|
127
133
|
def _get_cache_key(self, document_id: str, job_id: str | None) -> str:
|
|
@@ -158,9 +164,9 @@ class LocalDataPointCacheStore(DataPointCacheStore):
|
|
|
158
164
|
if pages is None:
|
|
159
165
|
pages = {}
|
|
160
166
|
self._pages[cache_key] = pages
|
|
161
|
-
pages[page_number] =
|
|
162
|
-
if self.
|
|
163
|
-
for k in sorted(pages.keys())[: -self.
|
|
167
|
+
pages[page_number] = image_to_cache_dict(image)
|
|
168
|
+
if self.max_pages > 0 and len(pages) > self.max_pages:
|
|
169
|
+
for k in sorted(pages.keys())[: -self.max_pages]:
|
|
164
170
|
pages.pop(k, None)
|
|
165
171
|
|
|
166
172
|
def get_datapoints(self, document_id: str, last_d: int, job_id: str | None = None) -> tuple[Image, ...]:
|
|
@@ -224,10 +230,10 @@ class DatapointManager:
|
|
|
224
230
|
|
|
225
231
|
if num_cached_datapoints < 0:
|
|
226
232
|
raise ValueError("num_cached_datapoints must be >= 0")
|
|
227
|
-
self.num_cached_datapoints = num_cached_datapoints
|
|
228
233
|
self.remove_pixel_values_from_cache = remove_pixel_values_from_cache
|
|
229
234
|
|
|
230
235
|
self._cache_store = cache_store or LocalDataPointCacheStore(max_pages=num_cached_datapoints)
|
|
236
|
+
self.num_cached_datapoints = self._cache_store.max_pages
|
|
231
237
|
|
|
232
238
|
def maybe_cache_datapoint(self, image: Optional[Image], job_id: str | None = None) -> None:
|
|
233
239
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection/configs/conf_tesseract.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{deepdoctection-1.2.6 → deepdoctection-1.2.8}/src/deepdoctection.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|