deepdoctection 0.39.1__tar.gz → 0.39.2__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.
Potentially problematic release.
This version of deepdoctection might be problematic. Click here for more details.
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/PKG-INFO +1 -1
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/__init__.py +1 -1
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/analyzer/_config.py +1 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/analyzer/factory.py +5 -1
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datapoint/view.py +29 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/base.py +2 -3
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/common.py +1 -1
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/lm.py +5 -6
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/train/hf_layoutlm_train.py +1 -3
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection.egg-info/PKG-INFO +1 -1
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/setup.py +0 -1
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/LICENSE +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/README.md +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/analyzer/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/analyzer/dd.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/configs/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/configs/conf_dd_one.yaml +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/configs/conf_tesseract.yaml +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/base.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/common.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/custom.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/custom_serialize.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/parallel_map.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/serialize.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/dataflow/stats.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datapoint/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datapoint/annotation.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datapoint/box.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datapoint/convert.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datapoint/image.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/adapter.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/base.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/dataflow_builder.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/info.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/doclaynet.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/fintabnet.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/funsd.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/iiitar13k.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/layouttest.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/publaynet.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/pubtables1m.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/pubtabnet.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/rvlcdip.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/xfund.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/xsl/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/xsl/pascal_voc.xsl +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/registry.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/save.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/accmetric.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/base.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/cocometric.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/eval.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/registry.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/tedsmetric.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/eval/tp_eval_callback.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/base.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/d2detect.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/deskew.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/doctrocr.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/fastlang.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/hfdetr.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/hflayoutlm.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/hflm.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/model.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/pdftext.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/pt/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/pt/nms.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/pt/ptutils.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tessocr.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/texocr.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tfutils.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpcompat.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/common.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/config/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/config/config.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/backbone.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/generalized_rcnn.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/model_box.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/model_cascade.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/model_fpn.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/model_frcnn.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/model_mrcnn.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/modeling/model_rpn.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/predict.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/preproc.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/utils/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/utils/box_ops.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/utils/np_box_ops.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tpdetect.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/cats.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/cocostruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/d2struct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/hfstruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/laylmstruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/maputils.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/match.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/misc.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/pascalstruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/prodigystruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/pubstruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/tpstruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/mapper/xfundstruct.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/anngen.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/concurrency.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/doctectionpipe.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/language.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/layout.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/order.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/refine.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/registry.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/segment.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/sub_layout.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/text.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/pipe/transform.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/py.typed +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/train/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/train/d2_frcnn_train.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/train/hf_detr_train.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/train/tp_frcnn_train.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/__init__.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/concurrency.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/context.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/develop.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/env_info.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/error.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/file_utils.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/fs.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/identifier.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/logger.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/metacfg.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/mocks.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/pdf_utils.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/settings.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/tqdm.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/transform.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/types.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/utils.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/utils/viz.py +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection.egg-info/SOURCES.txt +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection.egg-info/dependency_links.txt +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection.egg-info/requires.txt +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection.egg-info/top_level.txt +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/setup.cfg +0 -0
- {deepdoctection-0.39.1 → deepdoctection-0.39.2}/tests/test_utils.py +0 -0
|
@@ -40,6 +40,7 @@ cfg.TF.CELL.FILTER = None
|
|
|
40
40
|
cfg.TF.ITEM.WEIGHTS = "item/model-1620000_inf_only.data-00000-of-00001"
|
|
41
41
|
cfg.TF.ITEM.FILTER = None
|
|
42
42
|
|
|
43
|
+
cfg.PT.ENFORCE_WEIGHTS = False
|
|
43
44
|
cfg.PT.LAYOUT.WEIGHTS = "layout/d2_model_0829999_layout_inf_only.pt"
|
|
44
45
|
cfg.PT.LAYOUT.WEIGHTS_TS = "layout/d2_model_0829999_layout_inf_only.ts"
|
|
45
46
|
cfg.PT.LAYOUT.FILTER = None
|
|
@@ -98,7 +98,11 @@ class ServiceFactory:
|
|
|
98
98
|
weights = (
|
|
99
99
|
getattr(config.TF, mode).WEIGHTS
|
|
100
100
|
if config.LIB == "TF"
|
|
101
|
-
else (
|
|
101
|
+
else (
|
|
102
|
+
getattr(config.PT, mode).WEIGHTS
|
|
103
|
+
if detectron2_available() or config.PT.ENFORCE_WEIGHTS
|
|
104
|
+
else getattr(config.PT, mode).WEIGHTS_TS
|
|
105
|
+
)
|
|
102
106
|
)
|
|
103
107
|
filter_categories = (
|
|
104
108
|
getattr(getattr(config.TF, mode), "FILTER")
|
|
@@ -407,6 +407,35 @@ class Table(Layout):
|
|
|
407
407
|
col_anns = self.base_page.get_annotation(annotation_ids=all_relation_ids, category_names=[LayoutType.COLUMN])
|
|
408
408
|
return col_anns
|
|
409
409
|
|
|
410
|
+
def row(self, row_number: int) -> list[ImageAnnotationBaseView]:
|
|
411
|
+
"""
|
|
412
|
+
Get a list of cells in a row.
|
|
413
|
+
"""
|
|
414
|
+
all_relation_ids = self.get_relationship(Relationships.CHILD)
|
|
415
|
+
all_cells = self.base_page.get_annotation(
|
|
416
|
+
category_names=[LayoutType.CELL, CellType.SPANNING], annotation_ids=all_relation_ids
|
|
417
|
+
)
|
|
418
|
+
row_cells = list(
|
|
419
|
+
filter(lambda c: row_number in (c.row_number, c.row_number + c.row_span - 1), all_cells) # type: ignore
|
|
420
|
+
)
|
|
421
|
+
row_cells.sort(key=lambda c: c.column_number) # type: ignore
|
|
422
|
+
return row_cells # type: ignore
|
|
423
|
+
|
|
424
|
+
def column(self, column_number: int) -> list[ImageAnnotationBaseView]:
|
|
425
|
+
"""
|
|
426
|
+
Get a list of cells in a column.
|
|
427
|
+
"""
|
|
428
|
+
all_relation_ids = self.get_relationship(Relationships.CHILD)
|
|
429
|
+
all_cells = self.base_page.get_annotation(
|
|
430
|
+
category_names=[LayoutType.CELL, CellType.SPANNING], annotation_ids=all_relation_ids
|
|
431
|
+
)
|
|
432
|
+
column_cells = list(
|
|
433
|
+
filter(lambda c: column_number in # type: ignore
|
|
434
|
+
(c.column_number, c.column_number + c.column_span - 1), all_cells) # type: ignore
|
|
435
|
+
)
|
|
436
|
+
column_cells.sort(key=lambda c: c.row_number) # type: ignore
|
|
437
|
+
return column_cells # type: ignore
|
|
438
|
+
|
|
410
439
|
@property
|
|
411
440
|
def html(self) -> HTML:
|
|
412
441
|
"""
|
|
@@ -24,7 +24,7 @@ from __future__ import annotations
|
|
|
24
24
|
from abc import ABC, abstractmethod
|
|
25
25
|
from collections import defaultdict
|
|
26
26
|
from dataclasses import dataclass, field
|
|
27
|
-
from typing import Any, Mapping, Optional, Union
|
|
27
|
+
from typing import Any, Callable, Mapping, Optional, Union
|
|
28
28
|
from uuid import uuid1
|
|
29
29
|
|
|
30
30
|
from ..dataflow import DataFlow, MapData
|
|
@@ -100,7 +100,7 @@ class PipelineComponent(ABC):
|
|
|
100
100
|
|
|
101
101
|
:param filter_func: A function that takes an image datapoint and returns a boolean value
|
|
102
102
|
"""
|
|
103
|
-
self.filter_func = filter_func
|
|
103
|
+
self.filter_func = filter_func # type: ignore
|
|
104
104
|
|
|
105
105
|
@abstractmethod
|
|
106
106
|
def serve(self, dp: Image) -> None:
|
|
@@ -122,7 +122,6 @@ class PipelineComponent(ABC):
|
|
|
122
122
|
if not self.filter_func(dp):
|
|
123
123
|
self.serve(dp)
|
|
124
124
|
|
|
125
|
-
|
|
126
125
|
def pass_datapoint(self, dp: Image) -> Image:
|
|
127
126
|
"""
|
|
128
127
|
Acceptance, handover to dp_manager, transformation and forwarding of dp. To measure the time, use
|
|
@@ -362,7 +362,7 @@ class AnnotationNmsService(PipelineComponent):
|
|
|
362
362
|
self.threshold = [thresholds for _ in self.nms_pairs]
|
|
363
363
|
else:
|
|
364
364
|
assert len(self.nms_pairs) == len(thresholds), "Sequences of nms_pairs and thresholds must have same length"
|
|
365
|
-
self.threshold = thresholds
|
|
365
|
+
self.threshold = thresholds # type: ignore
|
|
366
366
|
if priority:
|
|
367
367
|
assert len(self.nms_pairs) == len(priority), "Sequences of nms_pairs and priority must have same length"
|
|
368
368
|
|
|
@@ -265,7 +265,7 @@ class LMSequenceClassifierService(PipelineComponent):
|
|
|
265
265
|
padding: Literal["max_length", "do_not_pad", "longest"] = "max_length",
|
|
266
266
|
truncation: bool = True,
|
|
267
267
|
return_overflowing_tokens: bool = False,
|
|
268
|
-
use_other_as_default_category: bool = False
|
|
268
|
+
use_other_as_default_category: bool = False,
|
|
269
269
|
) -> None:
|
|
270
270
|
"""
|
|
271
271
|
:param tokenizer: Tokenizer, typing allows currently anything. This will be changed in the future
|
|
@@ -309,11 +309,10 @@ class LMSequenceClassifierService(PipelineComponent):
|
|
|
309
309
|
lm_output = None
|
|
310
310
|
if lm_input is None:
|
|
311
311
|
if self.use_other_as_default_category:
|
|
312
|
-
class_id = self.language_model.categories.get_categories(as_dict=True,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
score=-1.)
|
|
312
|
+
class_id = self.language_model.categories.get_categories(as_dict=True, name_as_key=True).get(
|
|
313
|
+
TokenClasses.OTHER, 1
|
|
314
|
+
)
|
|
315
|
+
lm_output = SequenceClassResult(class_name=TokenClasses.OTHER, class_id=class_id, score=-1.0)
|
|
317
316
|
else:
|
|
318
317
|
lm_output = self.language_model.predict(**lm_input)
|
|
319
318
|
if lm_output:
|
|
@@ -499,9 +499,7 @@ def train_hf_layoutlm(
|
|
|
499
499
|
)
|
|
500
500
|
pipeline_component_cls = pipeline_component_registry.get(pipeline_component_name)
|
|
501
501
|
if dataset_type == DatasetType.SEQUENCE_CLASSIFICATION:
|
|
502
|
-
pipeline_component = pipeline_component_cls(tokenizer_fast,
|
|
503
|
-
dd_model,
|
|
504
|
-
use_other_as_default_category=True)
|
|
502
|
+
pipeline_component = pipeline_component_cls(tokenizer_fast, dd_model, use_other_as_default_category=True)
|
|
505
503
|
else:
|
|
506
504
|
pipeline_component = pipeline_component_cls(
|
|
507
505
|
tokenizer_fast,
|
|
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-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/__init__.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/doclaynet.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/fintabnet.py
RENAMED
|
File without changes
|
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/iiitar13k.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/layouttest.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/publaynet.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/pubtables1m.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/pubtabnet.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/rvlcdip.py
RENAMED
|
File without changes
|
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/xsl/__init__.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/datasets/instances/xsl/pascal_voc.xsl
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
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/config/__init__.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/config/config.py
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
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/utils/__init__.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/utils/box_ops.py
RENAMED
|
File without changes
|
{deepdoctection-0.39.1 → deepdoctection-0.39.2}/deepdoctection/extern/tp/tpfrcnn/utils/np_box_ops.py
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
|
|
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-0.39.1 → deepdoctection-0.39.2}/deepdoctection.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|