Repository: deepdoctection/deepdoctection (language: python)

Issue:
Add LayoutLM models
**Enhancement** 🚀
Add unilm LayoutLM models to use in separate pipeline components.

**Motivation**  💪 
LayoutLM family naturally fits into this framework

**Alternatives** ⚖️


**Additional context** 🧬




Discussion / hints:
Stale issue message

Fix patch:
diff --git a/deepdoctection/__init__.py b/deepdoctection/__init__.py
index d71acd69..35cdb4a3 100644
--- a/deepdoctection/__init__.py
+++ b/deepdoctection/__init__.py
@@ -43,7 +43,7 @@
 from .datasets import *
 from .eval import *
 from .extern import *
-from .mapper import *  # pylint: disable = W0622
+from .mapper import *
 from .pipe import *
 from .train import *
 from .utils import *
diff --git a/deepdoctection/analyzer/dd.py b/deepdoctection/analyzer/dd.py
index e6c1447e..8ef47e1f 100644
--- a/deepdoctection/analyzer/dd.py
+++ b/deepdoctection/analyzer/dd.py
@@ -36,7 +36,7 @@
 from ..utils.file_utils import pytorch_available, tensorpack_available, tf_available
 from ..utils.fs import mkdir_p
 from ..utils.logger import logger
-from ..utils.metacfg import set_config_by_yaml, AttrDict
+from ..utils.metacfg import AttrDict, set_config_by_yaml
 from ..utils.settings import names
 from ..utils.systools import get_configs_dir_path, get_package_path
 
diff --git a/deepdoctection/dataflow/__init__.py b/deepdoctection/dataflow/__init__.py
index a540afa8..3a76e565 100644
--- a/deepdoctection/dataflow/__init__.py
+++ b/deepdoctection/dataflow/__init__.py
@@ -23,7 +23,6 @@
     MultiThreadMapData,
     ProxyDataFlow,
     RepeatedData,
-    MultiThreadMapData,
 )
 
 from .common import *
diff --git a/deepdoctection/dataflow/custom_serialize.py b/deepdoctection/dataflow/custom_serialize.py
index 143cd46d..835ee624 100644
--- a/deepdoctection/dataflow/custom_serialize.py
+++ b/deepdoctection/dataflow/custom_serialize.py
@@ -37,7 +37,7 @@
 from .common import FlattenData
 from .custom import CacheData, CustomDataFromIterable, CustomDataFromList
 
-__all__ = ["SerializerJsonlines", "SerializerFiles", "SerializerCoco", "SerializerPdfDoc"]
+__all__ = ["SerializerJsonlines", "SerializerFiles", "SerializerCoco", "SerializerPdfDoc", "SerializerTabsepFiles"]
 
 
 def _reset_df_and_get_length(df: DataFlow) -> int:
@@ -107,6 +107,65 @@ def save(df: DataFlow, path: Pathlike, file_name: str, max_datapoints: Optional[
                     break
 
 
+class SerializerTabsepFiles:
+    """
+    Serialize a dataflow from a tab separated text file. Alternatively, save a dataflow of plain text
+    to a .txt file.
+
+    **Example**:
+
+        .. code-block:: python
+
+            df = SerializerTabsepFiles.load("path/to/file.txt")
+
+        will yield each text line of the file.
+    """
+
+    @staticmethod
+    def load(path: Pathlike, max_datapoins: Optional[int] = None) -> CustomDataFromIterable:
+        """
+        :param path: a path to a .txt file.
+        :param max_datapoins: Will stop the iteration once max_datapoints have been streamed
+
+        :return: dataflow to iterate from
+        """
+
+        with open(path, "r", encoding="UTF-8") as file:
+            iterator = file.readlines()
+        return CustomDataFromIterable(iterator, max_datapoints=max_datapoins)
+
+    @staticmethod
+    def save(df: DataFlow, path: Pathlike, file_name: str, max_datapoints: Optional[int] = None) -> None:
+        """
+        Writes a dataflow iteratively to a .txt file. Every datapoint must be a string.
+        As the length of the dataflow cannot be determined in every case max_datapoint prevents generating an
+        unexpectedly large file
+
+        :param df: The dataflow to write from.
+        :param path: The path, the .txt file to write to.
+        :param file_name: name of the target file.
+        :param max_datapoints: maximum number of datapoint to consider writing to a file.
+        """
+
+        assert os.path.isdir(path), f"not a dir {path}"
+        assert is_file_extension(file_name, ".txt")
+
+        with open(os.path.join(path, file_name), "w", encoding="UTF-8") as file:
+            length = _reset_df_and_get_length(df)
+            if length == 0:
+                logger.info("cannot estimate length of dataflow")
+            if max_datapoints is not None:
+                if max_datapoints < length:
+                    logger.info("dataflow larger than max_datapoints")
+            for k, dp in enumerate(df):
+                if max_datapoints is None:
+                    file.write(dp)
+                elif k < max_datapoints:
+                    file.write(dp)
+                else:
+                    break
+
+
 class SerializerFiles:
     """
     Serialize files from a directory and all subdirectories. Only one file type can be serialized. Once specified, all
diff --git a/deepdoctection/datapoint/annotation.py b/deepdoctection/datapoint/annotation.py
index 7dcbe350..ee45bbde 100644
--- a/deepdoctection/datapoint/annotation.py
+++ b/deepdoctection/datapoint/annotation.py
@@ -20,15 +20,33 @@
 """
 
 from abc import ABC, abstractmethod
-from copy import deepcopy
 from dataclasses import dataclass, field
-from typing import Any, Dict, List, Optional, Union
+from typing import Any, Dict, List, Optional, Union, no_type_check
 
-from ..utils import get_uuid, is_uuid_like
+from ..utils.detection_types import JsonDict
+from ..utils.identifier import get_uuid, is_uuid_like
 from .box import BoundingBox
 from .convert import as_dict
 
 
+@no_type_check
+def _ann_from_dict(cls, **kwargs):
+    ann = cls(kwargs.get("external_id"), kwargs.get("category_name"), kwargs.get("category_id"), kwargs.get("score"))
+    ann.active = kwargs.get("active")
+    ann._annotation_id = kwargs.get("_annotation_id")  # pylint: disable=W0212
+    if isinstance(kwargs.get("sub_categories"), dict):
+        for key, value in kwargs["sub_categories"].items():
+            if "value" in value:
+                ann.dump_sub_category(key, ContainerAnnotation.from_dict(**value))
+            else:
+                ann.dump_sub_category(key, CategoryAnnotation.from_dict(**value))
+    if isinstance(kwargs.get("relationships"), dict):
+        for key, values in kwargs["relationships"].items():
+            for value in values:
+                ann.dump_relationship(key, value)
+    return ann
+
+
 @dataclass  # type: ignore
 class Annotation(ABC):
     """
@@ -146,11 +164,13 @@ def deactivate(self) -> None:
         """
         self.active = False
 
+    @classmethod
     @abstractmethod
-    def get_export(self) -> Dict[str, Any]:
+    def from_dict(cls, **kwargs: JsonDict) -> "Annotation":
         """
-        Generate a dictionary representing the object that can be saved to a file. See some
-        built-in examples e.g. :meth:`CategoryAnnotation.get_export`
+        Method to initialize a derived class from dict.
+        :param kwargs: dict with  :class:`Annotation` attributes
+        :return: Annotation instance
         """
         raise NotImplementedError
 
@@ -296,28 +316,12 @@ def remove_keys() -> List[str]:
 
         :return: List of attributes.
         """
-        return ["_category_id", "_relationships", "_sub_categories", "external_id"]
-
-    def get_export(self) -> Dict[str, Any]:
-        """
-        Exporting annotations as dictionary.
-
-        :return: dict that e.g. can be saved to a file.
-        """
-        ann_copy = deepcopy(self)
-        ann_copy.sub_categories = {}
-        export_dict = self.as_dict()
-
-        export_dict["sub_categories"] = {}
-
-        for key, value in self.sub_categories.items():
-            export_dict["sub_categories"][key] = value.get_export()
-        try:
-            int(export_dict["category_id"])
-        except ValueError:
-            export_dict["category_id"] = None
+        return []
 
-        return export_dict
+    @classmethod
+    def from_dict(cls, **kwargs: JsonDict) -> "CategoryAnnotation":
+        category_ann = _ann_from_dict(cls, **kwargs)
+        return category_ann
 
 
 @dataclass
@@ -341,23 +345,16 @@ class ImageAnnotation(CategoryAnnotation):
     def get_defining_attributes(self) -> List[str]:
         return ["category_name", "bounding_box"]
 
-    def get_export(self) -> Dict[str, str]:
-        """
-        Exporting annotations as dictionary.
-
-        :return: dict that e.g. can be saved to a file.
-        """
-
-        export_dict = super().get_export()
-        if export_dict["image"] is not None:
-            export_dict["embeddings"] = export_dict["image"]["embeddings"]
-        export_dict.pop("image")
-
-        return export_dict
+    @classmethod
+    def from_dict(cls, **kwargs: JsonDict) -> "ImageAnnotation":
+        image_ann = _ann_from_dict(cls, **kwargs)
+        if box_kwargs := kwargs.get("bounding_box"):
+            image_ann.bounding_box = BoundingBox.from_dict(**box_kwargs)
+        return image_ann
 
 
 @dataclass
-class SummaryAnnotation(ImageAnnotation):
+class SummaryAnnotation(CategoryAnnotation):
     """
     A dataclass for adding summaries. The various summaries can be stored as sub categories.
 
@@ -369,6 +366,12 @@ def __post_init__(self) -> None:
         self.category_name = "SUMMARY"
         super().__post_init__()
 
+    @classmethod
+    def from_dict(cls, **kwargs: JsonDict) -> "SummaryAnnotation":
+        summary_ann = _ann_from_dict(cls, **kwargs)
+        summary_ann.category_name = "SUMMARY"
+        return summary_ann
+
 
 @dataclass
 class ContainerAnnotation(CategoryAnnotation):
@@ -383,3 +386,9 @@ class ContainerAnnotation(CategoryAnnotation):
 
     def get_defining_attributes(self) -> List[str]:
         return ["category_name", "value"]
+
+    @classmethod
+    def from_dict(cls, **kwargs: JsonDict) -> "SummaryAnnotation":
+        container_ann = _ann_from_dict(cls, **kwargs)
+        container_ann.value = kwargs.get("value")
+        return container_ann
diff --git a/deepdoctection/datapoint/box.py b/deepdoctection/datapoint/box.py
index ba039e96..6c63f519 100644
--- a/deepdoctection/datapoint/box.py
+++ b/deepdoctection/datapoint/box.py
@@ -21,7 +21,7 @@
 
 from dataclasses import dataclass
 from math import ceil, floor
-from typing import List, Optional
+from typing import List, Optional, no_type_check
 
 import numpy as np
 import numpy.typing as npt
@@ -225,7 +225,9 @@ def area(self) -> float:
         """
         Bounding box area
         """
-        return self.width * self.height
+        if self.absolute_coords:
+            return self.width * self.height
+        raise ValueError("Cannot calculate area, when bounding box coords are relative")
 
     def to_np_array(self, mode: str, scale_x: float = 1.0, scale_y: float = 1.0) -> npt.NDArray[np.float32]:
         """
@@ -338,6 +340,17 @@ def remove_keys() -> List[str]:
         """
         return ["height", "width"]
 
+    @classmethod
+    @no_type_check
+    def from_dict(cls, **kwargs) -> "BoundingBox":
+        """
+        Create :class:`BoundingBox` instance from dict
+
+        :param kwargs: dict with  :class:`BoundingBox` attributes
+        :return: Initialized BoundingBox
+        """
+        return cls(**kwargs)
+
 
 def intersection_box(
     box_1: BoundingBox, box_2: BoundingBox, width: Optional[float] = None, height: Optional[float] = None
diff --git a/deepdoctection/datapoint/convert.py b/deepdoctection/datapoint/convert.py
index 39603686..b0d8a905 100644
--- a/deepdoctection/datapoint/convert.py
+++ b/deepdoctection/datapoint/convert.py
@@ -68,9 +68,7 @@ def as_dict(obj: Any, dict_factory) -> Union[Any]:  # type: ignore
     if isinstance(obj, (list, tuple)):
         return type(obj)(as_dict(v, dict_factory) for v in obj)
     if isinstance(obj, dict):
-        return type(obj)(  # pylint: disable=E0110
-            (as_dict(k, dict_factory), as_dict(v, dict_factory)) for k, v in obj.items()
-        )
+        return type(obj)((as_dict(k, dict_factory), as_dict(v, dict_factory)) for k, v in obj.items())
     if isinstance(obj, (np.float32, np.float64)):
         obj = obj.astype(float)
     return copy.deepcopy(obj)
diff --git a/deepdoctection/datapoint/doc.py b/deepdoctection/datapoint/doc.py
index 6cc53bbc..99124649 100644
--- a/deepdoctection/datapoint/doc.py
+++ b/deepdoctection/datapoint/doc.py
@@ -25,7 +25,7 @@
 import json
 import os
 from dataclasses import asdict, dataclass, field
-from typing import List, Optional
+from typing import List, Optional, Union
 
 import cv2
 import numpy as np
@@ -227,9 +227,12 @@ def get_text(self) -> str:
         return text
 
     def viz(
-        self, show_tables: bool = True, show_items: bool = True, show_cells: bool = True,
-            show_table_structure: bool =True,
-            interactive: bool = False
+        self,
+        show_tables: bool = True,
+        show_items: bool = True,
+        show_cells: bool = True,
+        show_table_structure: bool = True,
+        interactive: bool = False,
     ) -> Optional[ImageType]:
         """
         Display a page detected bounding boxes. One can select bounding boxes of tables or other layout components.
@@ -251,7 +254,7 @@ def viz(
                             can be displayed differently.
         :return: If interactive will return nothing else a numpy array.
         """
-        category_names_list = []
+        category_names_list: List[Union[str, None]] = []
         box_stack = []
 
         if show_items:
diff --git a/deepdoctection/datapoint/image.py b/deepdoctection/datapoint/image.py
index 13afa0ea..63fc79e0 100644
--- a/deepdoctection/datapoint/image.py
+++ b/deepdoctection/datapoint/image.py
@@ -18,9 +18,9 @@
 """
 Dataclass Image
 """
-from copy import deepcopy
+
 from dataclasses import dataclass, field
-from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
+from typing import Any, Dict, Iterable, List, Optional, Sequence, Union, no_type_check
 
 import numpy as np
 from numpy import uint8
@@ -368,7 +368,7 @@ def remove_keys() -> List[str]:
         A list of attributes to suspend from as_dict creation.
         """
 
-        return ["external_id", "_image", "_bbox", "_embeddings", "_annotations"]
+        return ["_image"]
 
     def define_annotation_id(self, annotation: Annotation) -> str:
         """
@@ -468,21 +468,42 @@ def maybe_ann_to_sub_image(self, annotation_id: str, category_names: Union[str,
             )
             ann.image.dump(sub_image)
 
-    def get_export(self) -> Dict[str, Any]:
+    def get_export(self, save_image: bool = False) -> Dict[str, Any]:
         """
         Exporting image as dictionary. As numpy array cannot be serialized :attr:`image` values will be converted into
         base64 encodings.
 
         :return: Dict that e.g. can be saved to a file.
         """
-
-        image_copy = deepcopy(self)
-        image_copy.annotations = []
-        image_copy.image = np.ones((1, 1, 3), dtype=np.float32)
-        export_dict = image_copy.as_dict()
-        export_dict["annotations"] = []
-        export_dict["image"] = self.get_image().to_b64()
-        for ann in self.annotations:
-            export_dict["annotations"].append(ann.get_export())
+        export_dict = self.as_dict()
+        if save_image and self.image:
+            export_dict["_image"] = convert_np_array_to_b64(self.image)
 
         return export_dict
+
+    @classmethod
+    @no_type_check
+    def from_dict(cls, **kwargs) -> "Image":
+        """
+        Create :class:`Image` instance from dict.
+
+        :param kwargs: dict with  :class:`Image` attributes and nested dicts for initializing annotations,
+        :return: Initialized image
+        """
+        image = cls(kwargs.get("file_name"), kwargs.get("location"), kwargs.get("external_id"))
+        image._image_id = kwargs.get("_image_id")
+        if b64_image := kwargs.get("_image"):
+            image.image = b64_image
+        if box_kwargs := kwargs.get("_bbox"):
+            image._bbox = BoundingBox.from_dict(**box_kwargs)
+        for image_id, box_dict in kwargs.get("embeddings").items():
+            image.set_embedding(image_id, BoundingBox.from_dict(**box_dict))
+        for ann_dict in kwargs.get("annotations"):
+            image_ann = ImageAnnotation.from_dict(**ann_dict)
+            if "image" in ann_dict:
+                image_dict = ann_dict["image"]
+                image_ann.image = cls.from_dict(**image_dict)
+            image.dump(image_ann)
+        if summary_dict := kwargs.get("summary"):
+            image.summary = SummaryAnnotation.from_dict(**summary_dict)
+        return image
diff --git a/deepdoctection/datasets/adapter.py b/deepdoctection/datasets/adapter.py
index 263d82db..835b0949 100644
--- a/deepdoctection/datasets/adapter.py
+++ b/deepdoctection/datasets/adapter.py
@@ -20,7 +20,7 @@
 """
 
 
-from typing import Any, Callable, Iterator, Optional, Union
+from typing import Any, Callable, Dict, Iterator, Optional, Union
 
 from torch.utils.data import IterableDataset
 
@@ -30,6 +30,7 @@
 from ..mapper.maputils import LabelSummarizer
 from ..utils.detection_types import DP, JsonDict
 from ..utils.logger import log_once, logger
+from ..utils.settings import names
 from ..utils.tqdm import get_tqdm
 from .registry import get_dataset
 
@@ -38,10 +39,11 @@ class DatasetAdapter(IterableDataset):  # type: ignore
     """
     A helper class derived from `torch.utils.data.IterableDataset` to process datasets within
     pytorch frameworks (e.g. Detectron2). It wraps the dataset and defines the compulsory
-    `:meth:__iter__` using  meth:`dataflow.build` .
+    :meth:`__iter__` using  meth:`dataflow.build` .
 
     DatasetAdapter is meant for training and will therefore produce an infinite number of datapoints
     by shuffling and restart iteration once the previous dataflow is exhausted.
+
     """
 
     def __init__(
@@ -49,11 +51,12 @@ def __init__(
         name_or_dataset: Union[str, DatasetBase],
         cache_dataset: bool,
         image_to_framework_func: Optional[Callable[[DP], Optional[JsonDict]]] = None,
-        **build_kwargs: str
+        **build_kwargs: str,
     ) -> None:
         """
         :param name_or_dataset: Registered name of the dataset or an instance.
-        :param cache_dataset: If set to true, it will cache the dataset (without loading images).
+        :param cache_dataset: If set to true, it will cache the dataset (without loading images). If possible,
+                              some statistics, e.g. number of specific labels will be printed.
         :param image_to_framework_func: A mapping function that converts image datapoints into the framework format
         :param build_kwargs: optional parameters for defining the dataflow.
         """
@@ -66,8 +69,28 @@ def __init__(
 
         if cache_dataset:
             logger.info("Yielding dataflow into memory and create torch dataset")
-            categories = self.dataset.dataflow.categories.get_categories(as_dict=True, filtered=True)
-            summarizer = LabelSummarizer(categories)
+            categories: Dict[str, str] = {}
+            _data_statistics = True
+            if self.dataset.dataset_info.type in (names.DS.TYPE.OBJ, names.DS.TYPE.SEQ):
+                categories = self.dataset.dataflow.categories.get_categories(as_dict=True, filtered=True)
+            elif self.dataset.dataset_info.type in (names.DS.TYPE.TOK,):
+                categories = {
+                    str(k): v
+                    for k, v in enumerate(
+                        self.dataset.dataflow.categories.init_sub_categories[names.C.WORD][names.C.SE], 1
+                    )
+                }
+                categories_name_as_key = {v: k for k, v in categories.items()}
+            else:
+                logger.info(
+                    "dataset is of type %s. Cannot generate statistics for this type of dataset",
+                    self.dataset.dataset_info.type,
+                )
+                _data_statistics = False
+
+            if _data_statistics:
+                summarizer = LabelSummarizer(categories)
+
             df.reset_state()
             max_datapoints_str = build_kwargs.get("max_datapoints")
 
@@ -86,12 +109,28 @@ def __init__(
                             "images when needed and reduce memory costs!!!",
                             "warn",
                         )
-                    anns = dp.get_annotation()
-                    cat_ids = [int(ann.category_id) for ann in anns]
-                    summarizer.dump(cat_ids)
+                    if self.dataset.dataset_info.type == names.DS.TYPE.OBJ:
+                        anns = dp.get_annotation()
+                        cat_ids = [int(ann.category_id) for ann in anns]
+
+                    elif self.dataset.dataset_info.type == names.DS.TYPE.SEQ:
+                        cat_ids = dp.summary.get_sub_category(names.C.DOC).category_id
+
+                    elif self.dataset.dataset_info.type == names.DS.TYPE.TOK:
+                        anns = dp.get_annotation()
+                        cat_ids = [
+                            int(categories_name_as_key[ann.get_sub_category(names.C.SE).category_name]) for ann in anns
+                        ]
+
+                    if _data_statistics:
+                        summarizer.dump(cat_ids)
+
                     datapoints.append(dp)
                     status_bar.update()
-            summarizer.print_summary_histogram()
+
+            if _data_statistics:
+                summarizer.print_summary_histogram()
+            self.number_datapoints = len(datapoints)
             df = CustomDataFromList(datapoints, shuffle=True)
             df = RepeatedData(df, -1)
         if image_to_framework_func:
@@ -103,7 +142,9 @@ def __iter__(self) -> Iterator[Image]:
         return iter(self.df)
 
     def __len__(self) -> int:
-        raise NotImplementedError
+        if self.number_datapoints:
+            return self.number_datapoints
+        return len(self.df)
 
     def __getitem__(self, item: Any) -> None:
         raise NotImplementedError
diff --git a/deepdoctection/datasets/info.py b/deepdoctection/datasets/info.py
index 6920367f..42d14f9f 100644
--- a/deepdoctection/datasets/info.py
+++ b/deepdoctection/datasets/info.py
@@ -58,6 +58,10 @@ class DatasetInfo:
     :attr:`url`: url, where the dataset can be downloaded from.
 
     :attr:`splits`: A dict of splits. The value must store the relative path, where the split can be found.
+
+    :attr:`type`: The type describes whether this is a dataset for object detection (pass 'OBJECT_DETECTION'),
+                  sequence classification (pass 'SEQUENCE_CLASSIFICATION') or token classification
+                  ('TOKEN_CLASSIFICATION'). Optionally, pass nothing.
     """
 
     name: str
@@ -65,6 +69,7 @@ class DatasetInfo:
     license: str = field(default="")
     url: Union[str, Sequence[str]] = field(default="")
     splits: Mapping[str, str] = field(default_factory=dict)
+    type: str = field(default="")
 
     def get_split(self, key: str) -> str:
         """
diff --git a/deepdoctection/datasets/instances/__init__.py b/deepdoctection/datasets/instances/__init__.py
index 4db67d6c..4b8495a5 100644
--- a/deepdoctection/datasets/instances/__init__.py
+++ b/deepdoctection/datasets/instances/__init__.py
@@ -38,6 +38,7 @@
 from .publaynet import *
 from .pubtables1m import *
 from .pubtabnet import *
+from .rvlcdip import *
 from .xfund import *
 
-__all__ = ["Publaynet", "Pubtabnet", "LayoutTest", "Fintabnet", "Xfund", "Funsd", "IIITar13K", "Pubtables1M"]
+__all__ = ["Publaynet", "Pubtabnet", "LayoutTest", "Fintabnet", "Xfund", "Funsd", "IIITar13K", "Pubtables1M", "Rvlcdip"]
diff --git a/deepdoctection/datasets/instances/fintabnet.py b/deepdoctection/datasets/instances/fintabnet.py
index 76013313..61a7113a 100644
--- a/deepdoctection/datasets/instances/fintabnet.py
+++ b/deepdoctection/datasets/instances/fintabnet.py
@@ -82,6 +82,7 @@
     "fintabnet.tar.gz?_ga=2.17492593.994196051.1634564576-1173244232.1625045842"
 )
 _SPLITS: Mapping[str, str] = {"train": "train", "val": "val", "test": "test"}
+_TYPE = names.DS.TYPE.OBJ
 _LOCATION = "fintabnet"
 _ANNOTATION_FILES: Mapping[str, str] = {
     "train": "FinTabNet_1.0.0_table_train.jsonl",
@@ -114,7 +115,7 @@ class Fintabnet(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES, init_sub_categories=_SUB_CATEGORIES)
@@ -158,6 +159,11 @@ def build(self, **kwargs: Union[str, int]) -> DataFlow:
         use_multi_proc = to_bool(kwargs.get("use_multi_proc", True))
         use_multi_proc_strict = to_bool(kwargs.get("use_multi_proc_strict", False))
         fake_score = kwargs.get("fake_score", False)
+        build_mode = kwargs.get("build_mode")
+
+        if build_mode and not load_image:
+            logger.info("When 'build_mode' is set to True will reset 'load_image' to True")
+            load_image = True
 
         if use_multi_proc or use_multi_proc_strict:
             set_mp_spawn()
@@ -203,7 +209,7 @@ def _map_filename(dp: JsonDict, workdir: Path) -> JsonDict:
         else:
             df = MapData(df, pub_mapper)
 
-        if kwargs.get("build_mode", "") == "table":
+        if build_mode == "table":
 
             @curry
             def _crop_and_add_image(dp: Image, category_names: List[str]) -> Image:
@@ -223,11 +229,14 @@ def _crop_and_add_image(dp: Image, category_names: List[str]) -> Image:
                     ]
                 ),
             )
-            ann_to_sub_image = maybe_ann_to_sub_image(  # pylint: disable=E1120  # 259
-                category_names_sub_image=names.C.TAB,
-                category_names=[names.C.CELL, names.C.HEAD, names.C.BODY, names.C.ITEM, names.C.ROW, names.C.COL],
+            df = MapData(
+                df,
+                maybe_ann_to_sub_image(  # pylint: disable=E1120  # 259
+                    category_names_sub_image=names.C.TAB,
+                    category_names=[names.C.CELL, names.C.HEAD, names.C.BODY, names.C.ITEM, names.C.ROW, names.C.COL],
+                    add_summary=True,
+                ),
             )
-            df = MapData(df, ann_to_sub_image)
             df = MapData(df, lambda dp: [ann.image for ann in dp.get_annotation_iter(category_names=names.C.TAB)])
             df = FlattenData(df)
             df = MapData(df, lambda dp: dp[0])
diff --git a/deepdoctection/datasets/instances/funsd.py b/deepdoctection/datasets/instances/funsd.py
index 621437c0..68ef74f5 100644
--- a/deepdoctection/datasets/instances/funsd.py
+++ b/deepdoctection/datasets/instances/funsd.py
@@ -33,7 +33,6 @@
 |    │ │ ├── ...
 """
 
-import json
 import os
 from typing import Dict, List, Mapping, Union
 
@@ -42,6 +41,7 @@
 from ...mapper.cats import cat_to_sub_cat
 from ...mapper.xfundstruct import xfund_to_image
 from ...utils.detection_types import JsonDict, Pathlike
+from ...utils.fs import load_json
 from ...utils.settings import names
 from ..base import _BuiltInDataset
 from ..dataflow_builder import DataFlowBaseBuilder
@@ -49,19 +49,18 @@
 from ..registry import dataset_registry
 
 
-def load_json(path_ann: Pathlike) -> JsonDict:
+def load_file(path_ann: Pathlike) -> JsonDict:
     """
     Loading json file
 
     :param path_ann: path
     :return: dict
     """
-    with open(path_ann, "r", encoding="utf-8") as file:
-        anns = json.loads(file.read())
-        path, file_name = os.path.split(path_ann)
-        base_path, _ = os.path.split(path)
-        path = os.path.join(base_path, "images")
-        anns["file_name"] = os.path.join(path, file_name[:-4] + "png")
+    anns = load_json(path_ann)
+    path, file_name = os.path.split(path_ann)
+    base_path, _ = os.path.split(path)
+    path = os.path.join(base_path, "images")
+    anns["file_name"] = os.path.join(path, file_name[:-4] + "png")
     return anns
 
 
@@ -80,6 +79,7 @@ def load_json(path_ann: Pathlike) -> JsonDict:
 
 _URL = "https://guillaumejaume.github.io/FUNSD/download/"
 _SPLITS: Mapping[str, str] = {"train": "training_data", "test": "testing_data"}
+_TYPE = names.DS.TYPE.TOK
 _LOCATION = "funsd"
 _ANNOTATION_FILES: Mapping[str, str] = {"train": "annotations", "test": "annotations"}
 
@@ -103,7 +103,7 @@ class Funsd(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES, init_sub_categories=_SUB_CATEGORIES)
@@ -143,7 +143,7 @@ def build(self, **kwargs: Union[str, int]) -> DataFlow:
 
         df = SerializerFiles.load(path_ann_files, ".json", max_datapoints)
 
-        df = MapData(df, load_json)
+        df = MapData(df, load_file)
 
         # Map
         category_names_mapping = {
diff --git a/deepdoctection/datasets/instances/iiitar13k.py b/deepdoctection/datasets/instances/iiitar13k.py
index c7a6a18f..0e621106 100644
--- a/deepdoctection/datasets/instances/iiitar13k.py
+++ b/deepdoctection/datasets/instances/iiitar13k.py
@@ -73,6 +73,7 @@
 _URL = "http://cvit.iiit.ac.in/usodi/iiitar13k.php"
 
 _SPLITS: Mapping[str, str] = {"train": "training_images", "val": "validation_images", "test": "test_images"}
+_TYPE = names.DS.TYPE.OBJ
 _LOCATION = "iiitar13k"
 _ANNOTATION_FILES: Mapping[str, str] = {
     "train": "training_xml",
@@ -93,7 +94,7 @@ class IIITar13K(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES)
diff --git a/deepdoctection/datasets/instances/publaynet.py b/deepdoctection/datasets/instances/publaynet.py
index a8d4f1fa..e25cb3f1 100644
--- a/deepdoctection/datasets/instances/publaynet.py
+++ b/deepdoctection/datasets/instances/publaynet.py
@@ -34,13 +34,12 @@
 
 from ...dataflow import DataFlow, MapData, MapDataComponent
 from ...dataflow.custom_serialize import SerializerCoco
-from ...datasets.info import DatasetInfo
 from ...mapper.cats import filter_cat
 from ...mapper.cocostruct import coco_to_image
 from ...utils.settings import names
 from ..base import _BuiltInDataset
 from ..dataflow_builder import DataFlowBaseBuilder
-from ..info import DatasetCategories
+from ..info import DatasetCategories, DatasetInfo
 from ..registry import dataset_registry
 
 _NAME = "publaynet"
@@ -62,6 +61,7 @@
     "publaynet.tar.gz?_ga=2.23017467.1796315263.1628754613-1173244232.1625045842"
 )
 _SPLITS: Mapping[str, str] = {"train": "train", "val": "val"}
+_TYPE = names.DS.TYPE.OBJ
 
 _LOCATION = "publaynet"
 
@@ -79,7 +79,7 @@ class Publaynet(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES)
diff --git a/deepdoctection/datasets/instances/pubtables1m.py b/deepdoctection/datasets/instances/pubtables1m.py
index ddee44c6..55337e77 100644
--- a/deepdoctection/datasets/instances/pubtables1m.py
+++ b/deepdoctection/datasets/instances/pubtables1m.py
@@ -71,6 +71,7 @@
 _URL = "https://msropendata.com/datasets/505fcbe3-1383-42b1-913a-f651b8b712d3"
 
 _SPLITS: Mapping[str, str] = {"train": "train", "val": "val", "test": "test"}
+_TYPE = names.DS.TYPE.OBJ
 _LOCATION = "PubTables1M-Detection-PASCAL-VOC"
 _ANNOTATION_FILES: Mapping[str, str] = {
     "train": "train",
@@ -91,7 +92,7 @@ class Pubtables1M(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES)
diff --git a/deepdoctection/datasets/instances/pubtabnet.py b/deepdoctection/datasets/instances/pubtabnet.py
index 9a3e6006..a2038ec4 100644
--- a/deepdoctection/datasets/instances/pubtabnet.py
+++ b/deepdoctection/datasets/instances/pubtabnet.py
@@ -69,7 +69,7 @@
     "pubtabnet.tar.gz?_ga=2.267291150.146828643.1629125962-1173244232.1625045842"
 )
 _SPLITS: Mapping[str, str] = {"train": "train", "val": "val", "test": "test"}
-
+_TYPE = names.DS.TYPE.OBJ
 _LOCATION = "pubtabnet"
 _ANNOTATION_FILES: Mapping[str, str] = {"all": "PubTabNet_2.0.0.jsonl"}
 
@@ -101,7 +101,7 @@ class Pubtabnet(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES, init_sub_categories=_SUB_CATEGORIES)
diff --git a/deepdoctection/datasets/instances/rvlcdip.py b/deepdoctection/datasets/instances/rvlcdip.py
new file mode 100644
index 00000000..40b6b2cd
--- /dev/null
+++ b/deepdoctection/datasets/instances/rvlcdip.py
@@ -0,0 +1,166 @@
+# -*- coding: utf-8 -*-
+# File: rvldcip.py
+
+# Copyright 2021 Dr. Janis Meyer. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+"""
+Module for Publaynet dataset. Place the dataset as follows
+
+|    rvl-cdip
+|    ├── images
+|    │ ├── imagesa
+|    │ ├── ...
+|    │ ├── imagesa
+|    ├── label
+|    │ ├── test.txt
+|    │ ├── train.txt
+|    │ ├── val.txt
+"""
+
+import os
+from typing import Mapping, Union
+
+from ...dataflow import DataFlow, MapData
+from ...dataflow.custom_serialize import SerializerTabsepFiles
+from ...datapoint.annotation import CategoryAnnotation, SummaryAnnotation
+from ...datapoint.image import Image
+from ...mapper.cats import filter_summary
+from ...mapper.maputils import curry
+from ...utils.fs import load_image_from_file
+from ...utils.settings import names
+from ..base import _BuiltInDataset
+from ..dataflow_builder import DataFlowBaseBuilder
+from ..info import DatasetCategories, DatasetInfo
+from ..registry import dataset_registry
+
+_NAME = "rvl-cdip"
+_DESCRIPTION = (
+    "The RVL-CDIP (Ryerson Vision Lab Complex Document Information Processing) dataset consists of 400, 000 gray- \n"
+    "scale images in 16 classes, with 25, 000 images per class . There are 320, 000 training images, 40, 000  \n"
+    "validation images, and 40, 000 test images.The images are sized so their largest dimension does not exceed 1000 \n"
+    "pixels. This dataset is a subset of the IIT-CDIP Test Collection 1.0 [1], which is publicly available here. The \n"
+    "file structure of this dataset is the same as in the IIT collection, so it is possible to refer to that dataset \n"
+    "for OCR and additional metadata. The IIT-CDIP dataset is itself a subset of the Legacy Tobacco Document Library"
+)
+_LICENSE = (
+    "RVL-CDIP is a subset of IIT-CDIP, which came from the Legacy Tobacco Document Library, for which \n"
+    "license information can be found at https://www.industrydocuments.ucsf.edu/help/copyright/ ."
+)
+
+_URL = "https://www.cs.cmu.edu/~aharley/rvl-cdip/"
+
+_SPLITS: Mapping[str, str] = {"train": "train", "val": "val", "test": "test"}
+_TYPE = names.DS.TYPE.SEQ
+_LOCATION = "rvl-cdip"
+
+_ANNOTATION_FILES: Mapping[str, str] = {"train": "labels/train.txt", "val": "labels/val.txt", "test": "labels/test.txt"}
+_INIT_CATEGORIES = [
+    names.C.LET,
+    names.C.FORM,
+    names.C.EM,
+    names.C.HW,
+    names.C.AD,
+    names.C.SR,
+    names.C.SP,
+    names.C.SPEC,
+    names.C.FF,
+    names.C.NA,
+    names.C.BU,
+    names.C.INV,
+    names.C.PRES,
+    names.C.QUEST,
+    names.C.RES,
+    names.C.MEM,
+]
+
+
+@dataset_registry.register("rvl-cdip")
+class Rvlcdip(_BuiltInDataset):
+    """
+    RVLCDIP
+    """
+
+    _name = _NAME
+
+    @classmethod
+    def _info(cls) -> DatasetInfo:
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
+
+    def _categories(self) -> DatasetCategories:
+        return DatasetCategories(init_categories=_INIT_CATEGORIES)
+
+    def _builder(self) -> "RvlcdipBuilder":
+        return RvlcdipBuilder(location=_LOCATION, annotation_files=_ANNOTATION_FILES)
+
+
+class RvlcdipBuilder(DataFlowBaseBuilder):
+    """
+    Rvlcdip dataflow builder
+    """
+
+    def build(self, **kwargs: Union[str, int]) -> DataFlow:
+        """
+        Returns a dataflow from which you can stream datapoints of images. The following arguments affect the returns
+        of the dataflow:
+
+        :param split: Split of the dataset. Can be "train","val" or "test". Default: "val"
+        :param max_datapoints: Will stop iterating after max_datapoints. Default: None
+        :param load_image: Will load the image for each datapoint.  Default: False
+
+        :return: dataflow
+        """
+
+        split = str(kwargs.get("split", "val"))
+        max_datapoints = kwargs.get("max_datapoints")
+        if max_datapoints is not None:
+            max_datapoints = int(max_datapoints)
+        load_image = kwargs.get("load_image", False)
+
+        # Load
+        dataset_split = self.annotation_files[split]
+        assert isinstance(dataset_split, str)
+        path = self.get_workdir() / dataset_split
+        df = SerializerTabsepFiles.load(path, max_datapoints)
+
+        @curry
+        def _map_str_to_image(dp: str, load_img: bool) -> Image:
+            location, label = dp.split()[0], dp.split()[1]
+            label = str(int(label) + 1)
+            file_name = os.path.split(location)[1]
+            image = Image(location=(self.get_workdir() / "images" / location).as_posix(), file_name=file_name)
+            image.image = load_image_from_file(image.location)
+            summary = SummaryAnnotation()
+            categories_dict = self.categories.get_categories(init=True)
+            summary.dump_sub_category(
+                names.C.DOC, CategoryAnnotation(category_name=categories_dict[label], category_id=str(label))
+            )
+            image.summary = summary
+            if not load_img:
+                image.clear_image()
+            return image
+
+        df = MapData(df, _map_str_to_image(load_image))  # pylint: disable=E1120
+
+        assert self.categories is not None
+        if self.categories.is_filtered():
+            df = MapData(
+                df,
+                filter_summary(
+                    {names.C.DOC: self.categories.get_categories(as_dict=False, filtered=True)}
+                ),
+            )
+
+        return df
diff --git a/deepdoctection/datasets/instances/xfund.py b/deepdoctection/datasets/instances/xfund.py
index bcbbddb7..8c224d18 100644
--- a/deepdoctection/datasets/instances/xfund.py
+++ b/deepdoctection/datasets/instances/xfund.py
@@ -55,6 +55,7 @@
 )
 _URL = "https://github.com/doc-analysis/XFUND/releases/tag/v1.0"
 _SPLITS: Mapping[str, str] = {"train": "train", "val": "val"}
+_TYPE = names.DS.TYPE.TOK
 _LOCATION = "xfund"
 _ANNOTATION_FILES: Mapping[str, Union[str, Sequence[str]]] = {
     "train": [
@@ -85,7 +86,7 @@ class Xfund(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES, init_sub_categories=_SUB_CATEGORIES)
diff --git a/deepdoctection/datasets/save.py b/deepdoctection/datasets/save.py
index 9241c2a2..1d60488c 100644
--- a/deepdoctection/datasets/save.py
+++ b/deepdoctection/datasets/save.py
@@ -19,26 +19,49 @@
 Module for saving
 """
 
+import json
+from pathlib import Path
 from typing import Optional
 
 from ..dataflow import DataFlow, MapData, SerializerJsonlines
-from ..datapoint.image import Image
-from ..utils.detection_types import JsonDict
+from ..utils.detection_types import Pathlike
+from ..utils.fs import mkdir_p
 
 
-def dataflow_to_jsonl(df: DataFlow, path: str, file_name: str, max_datapoints: Optional[int] = None) -> None:
+def dataflow_to_json(
+    df: DataFlow,
+    path: Pathlike,
+    single_files: bool = False,
+    file_name: Optional[str] = None,
+    max_datapoints: Optional[int] = None,
+    save_image: bool = False,
+) -> None:
     """
     Save a dataflow consisting of :class:`datapoint.Image` to a jsonl file. Each image will be dumped into a separate
     JSON object.
 
     :param df: Input dataflow
-    :param path: Path to save the file to
-    :param file_name: File name of the .jsonl file
+    :param path: Path to save the file(s) to
+    :param single_files: will save image results to a single JSON file. If False all images of the dataflow will be d
+                         dumped into a single jsonl file.
+    :param file_name: file name, only needed for jsonl files
     :param max_datapoints: Will stop saving after dumping max_datapoint images.
+    :param save_image: Will save the image to the JSON object
     """
+    if isinstance(path, str):
+        path = Path(path)
+    if single_files:
+        mkdir_p(path)
 
-    def image_to_json(dp: Image) -> JsonDict:
-        return dp.get_export()
+    df = MapData(df, lambda dp: dp.get_export(save_image))
 
-    df = MapData(df, image_to_json)
-    SerializerJsonlines.save(df, path, file_name, max_datapoints)
+    if single_files:
+        for idx, dp in enumerate(df):
+            if idx == max_datapoints:
+                break
+            target_file = path / (dp["file_name"].split(".")[0] + ".json")
+            with open(target_file, "w", encoding="UTF-8") as file:
+                json.dump(dp, file)
+    else:
+        assert file_name, "if single_files is set to False must pass a valid file name for .jsonl file"
+        SerializerJsonlines.save(df, path, file_name, max_datapoints)
diff --git a/deepdoctection/eval/accmetric.py b/deepdoctection/eval/accmetric.py
index 0e29e8f3..e5080c79 100644
--- a/deepdoctection/eval/accmetric.py
+++ b/deepdoctection/eval/accmetric.py
@@ -18,7 +18,7 @@
 """
 Module for Accuracy metric
 """
-from typing import Any, Dict, List, Optional, Tuple, Union
+from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple, Union
 
 import numpy as np
 from numpy import float32
@@ -31,6 +31,7 @@
 from ..mapper.cats import image_to_cat_id
 from ..utils.detection_types import JsonDict
 from ..utils.file_utils import Requirement, get_sklearn_requirement, sklearn_available
+from ..utils.logger import logger
 from .base import MetricBase
 from .registry import metric_registry
 
@@ -41,7 +42,9 @@
 __all__ = ["AccuracyMetric", "ConfusionMetric"]
 
 
-def accuracy(label_gt: List[int], label_predictions: List[int], masks: Optional[List[int]] = None) -> NDArray[float32]:
+def accuracy(
+    label_gt: Sequence[int], label_predictions: Sequence[int], masks: Optional[Sequence[int]] = None
+) -> NDArray[float32]:
     """
     Calculates the accuracy given predictions and labels. Ignores masked indices. Uses
     :func:`sklearn.metrics.accuracy_score`
@@ -77,8 +80,9 @@ class AccuracyMetric(MetricBase):
 
     metric = accuracy
     mapper = image_to_cat_id
-    _cats: Optional[List[str]] = None
-    _sub_cats: Optional[Union[Dict[str, str], Dict[str, List[str]]]] = None
+    _cats: Optional[Sequence[str]] = None
+    _sub_cats: Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]] = None
+    _summary_sub_cats: Optional[Sequence[str]] = None
 
     @classmethod
     def dump(
@@ -90,12 +94,22 @@ def dump(
         cls._category_sanity_checks(categories)
         if cls._cats is None and cls._sub_cats is None:
             cls._cats = categories.get_categories(as_dict=False, filtered=True)
-        mapper_with_setting = cls.mapper(cls._cats, cls._sub_cats)
+        mapper_with_setting = cls.mapper(cls._cats, cls._sub_cats, cls._summary_sub_cats)
         labels_gt: Dict[str, List[int]] = {}
         labels_predictions: Dict[str, List[int]] = {}
+
+        # returned images of gt and predictions are likely not in the same order. We therefore first stream all data
+        # into a dict and generate our result vectors thereafter.
+        labels_per_image_gt = {}
+        labels_per_image_predictions = {}
         for dp_gt, dp_pd in zip(dataflow_gt, dataflow_predictions):
-            dp_labels_gt = mapper_with_setting(dp_gt)
-            dp_labels_predictions = mapper_with_setting(dp_pd)
+            dp_labels_gt, image_id_gt = mapper_with_setting(dp_gt)
+            labels_per_image_gt[image_id_gt] = dp_labels_gt
+            dp_labels_predictions, image_id_pr = mapper_with_setting(dp_pd)
+            labels_per_image_predictions[image_id_pr] = dp_labels_predictions
+
+        for image_id, dp_labels_gt in labels_per_image_gt.items():
+            dp_labels_predictions = labels_per_image_predictions[image_id]
             for key in dp_labels_gt.keys():
                 if key not in labels_gt:
                     labels_gt[key] = dp_labels_gt[key]
@@ -122,8 +136,9 @@ def get_distance(
     @classmethod
     def set_categories(
         cls,
-        category_names: Optional[Union[str, List[str]]] = None,
-        sub_category_names: Optional[Union[Dict[str, str], Dict[str, List[str]]]] = None,
+        category_names: Optional[Union[str, Sequence[str]]] = None,
+        sub_category_names: Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]] = None,
+        summary_sub_category_names: Optional[Union[str, Sequence[str]]] = None,
     ) -> None:
         """
         Set categories that are supposed to be evaluated. If sub_categories have to be considered then they need to be
@@ -141,12 +156,15 @@ def set_categories(
         :param category_names: List of category names
         :param sub_category_names: Dict of categories and their sub categories that are supposed to be evaluated,
                                    e.g. {"FOO": ["bak","baz"]} will evaluate "bak" and "baz"
+        :param summary_sub_category_names: string or list of summary sub categories
         """
 
         if category_names is not None:
-            cls._cats = category_names if isinstance(category_names, list) else [category_names]
+            cls._cats = [category_names] if isinstance(category_names, str) else category_names
         if sub_category_names is not None:
             cls._sub_cats = sub_category_names
+        if summary_sub_category_names is not None:
+            cls._summary_sub_cats = summary_sub_category_names
 
     @classmethod
     def _category_sanity_checks(cls, categories: DatasetCategories) -> None:
@@ -164,17 +182,30 @@ def _category_sanity_checks(cls, categories: DatasetCategories) -> None:
             for key, val in cls._sub_cats.items():
                 assert set(val) <= set(sub_cats[key])
 
+        if cls._cats is None and cls._sub_cats is None and cls._summary_sub_cats is None:
+            logger.warning(
+                "Accuracy metric has not correctly been set up: No category, sub category or summary has been"
+                "defined, therefore it is undefined what to evaluate."
+            )
+
     @classmethod
     def get_requirements(cls) -> List[Requirement]:
         return [get_sklearn_requirement()]
 
     @property
-    def sub_cats(self) -> Optional[Union[Dict[str, str], Dict[str, List[str]]]]:
-        """ sub cats"""
+    def sub_cats(self) -> Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]]:
+        """sub cats"""
         return self._sub_cats
 
+    @property
+    def summary_sub_cats(self) -> Optional[Sequence[str]]:
+        """summary sub categories"""
+        return self._summary_sub_cats
+
 
-def confusion(label_gt: List[int], label_predictions: List[int], masks: Optional[List[int]] = None) -> NDArray[float32]:
+def confusion(
+    label_gt: Sequence[int], label_predictions: Sequence[int], masks: Optional[Sequence[int]] = None
+) -> NDArray[float32]:
     """
     Calculates the accuracy matrix given the predictions and labels. Ignores masked indices. Uses
     :func:`sklearn.metrics.confusion_matrix`
@@ -206,7 +237,7 @@ class ConfusionMetric(AccuracyMetric):
     metric = confusion
 
     @classmethod
-    def print_distance(cls, results: List[JsonDict]) -> None:
+    def print_distance(cls, results: Sequence[JsonDict]) -> None:
         """
         print distance results
         """
diff --git a/deepdoctection/eval/cocometric.py b/deepdoctection/eval/cocometric.py
index a5ffac89..29ec1121 100644
--- a/deepdoctection/eval/cocometric.py
+++ b/deepdoctection/eval/cocometric.py
@@ -135,9 +135,9 @@ def dump(
 
         for dp_gt, dp_pred in zip(dataflow_gt, dataflow_predictions):
             img_gt, ann_gt = cls.mapper(dp_gt)  # type: ignore
-            dp_pred = re_assign_cat_ids(categories.get_categories(as_dict=True, filtered=True, name_as_key=True))(  # pylint: disable=E1120
-                dp_pred
-            )
+            dp_pred = re_assign_cat_ids(  # pylint: disable=E1120
+                categories.get_categories(as_dict=True, filtered=True, name_as_key=True)
+            )(dp_pred)
             img_pr, ann_pr = cls.mapper(dp_pred)  # type: ignore
             imgs_gt.append(img_gt)
             imgs_pr.append(img_pr)
diff --git a/deepdoctection/eval/eval.py b/deepdoctection/eval/eval.py
index 0914da06..47bf269a 100644
--- a/deepdoctection/eval/eval.py
+++ b/deepdoctection/eval/eval.py
@@ -23,16 +23,17 @@
 __all__ = ["Evaluator"]
 
 from copy import deepcopy
-from typing import Any, Dict, List, Optional, Type, Union
+from typing import Dict, List, Literal, Optional, Type, Union, overload
 
 from ..dataflow import CacheData, DataFlow, DataFromList, MapData
 from ..datasets.base import DatasetBase
 from ..mapper.cats import filter_cat, remove_cats
 from ..mapper.misc import maybe_load_image, maybe_remove_image, maybe_remove_image_from_category
-from ..pipe.base import PredictorPipelineComponent
+from ..pipe.base import LanguageModelPipelineComponent, PredictorPipelineComponent
 from ..pipe.concurrency import MultiThreadPipelineComponent
 from ..pipe.doctectionpipe import DoctectionPipe
 from ..utils.logger import logger
+from ..utils.settings import names
 from .base import MetricBase
 
 
@@ -78,8 +79,8 @@ class Evaluator:  # pylint: disable=R0903
     def __init__(
         self,
         dataset: DatasetBase,
-        component_or_pipeline: Union[PredictorPipelineComponent, DoctectionPipe],
-        metric: Type[MetricBase],
+        component_or_pipeline: Union[PredictorPipelineComponent, LanguageModelPipelineComponent, DoctectionPipe],
+        metric: Union[Type[MetricBase], MetricBase],
         num_threads: int = 2,
     ) -> None:
         """
@@ -95,12 +96,12 @@ def __init__(
         self.pipe: Optional[DoctectionPipe] = None
 
         # when passing a component, we will process prediction on num_threads
-        if isinstance(component_or_pipeline, PredictorPipelineComponent):
+        if isinstance(component_or_pipeline, (PredictorPipelineComponent, LanguageModelPipelineComponent)):
             logger.info(
                 "Building multi threading pipeline component to increase prediction throughput. Using %i threads",
                 num_threads,
             )
-            pipeline_components: List[PredictorPipelineComponent] = []
+            pipeline_components: List[Union[PredictorPipelineComponent, LanguageModelPipelineComponent]] = []
 
             for _ in range(num_threads - 1):
                 copy_pipe_component = component_or_pipeline.clone()
@@ -116,25 +117,36 @@ def __init__(
         else:
             self.pipe = component_or_pipeline
 
-        self.metric = metric()
+        if not isinstance(metric, MetricBase):
+            self.metric = metric()
         self._sanity_checks()
 
+    @overload
     def run(
-        self, output_as_dict: bool = False, **kwargs: Union[str, int]
-    ) -> Union[List[Dict[str, Any]], Dict[str, Any]]:
+        self, output_as_dict: Literal[False] = False, **dataflow_build_kwargs: Union[str, int]
+    ) -> List[Dict[str, float]]:
+        ...
+
+    @overload
+    def run(self, output_as_dict: Literal[True], **dataflow_build_kwargs: Union[str, int]) -> Dict[str, float]:
+        ...
+
+    def run(
+        self, output_as_dict: bool = False, **dataflow_build_kwargs: Union[str, int]
+    ) -> Union[List[Dict[str, float]], Dict[str, float]]:
         """
         Start evaluation process and return the results.
 
         :param output_as_dict: Return result in a list or dict.
-        :param kwargs: Pass the necessary arguments in order to build the dataflow, e.g. "split", "build_mode",
-                       "max_datapoints" etc.
+        :param dataflow_build_kwargs: Pass the necessary arguments in order to build the dataflow, e.g. "split",
+                                      "build_mode", "max_datapoints" etc.
 
         :return: dict with metric results.
         """
 
         assert self.dataset.dataflow.categories is not None, "dataset requires dataflow.categories to be not None"
-        df_gt = self.dataset.dataflow.build(**kwargs)
-        df_pr = self.dataset.dataflow.build(**kwargs)
+        df_gt = self.dataset.dataflow.build(**dataflow_build_kwargs)
+        df_pr = self.dataset.dataflow.build(**dataflow_build_kwargs)
 
         df_pr = MapData(df_pr, deepcopy)
         df_pr = self._clean_up_predict_dataflow_annotations(df_pr)
@@ -174,16 +186,32 @@ def _clean_up_predict_dataflow_annotations(self, df_pr: DataFlow) -> DataFlow:
         meta_anns = pipe_or_component.get_meta_annotation()
         possible_cats_in_datapoint = self.dataset.dataflow.categories.get_categories(as_dict=False, filtered=True)
 
-        # we keep all image annotations that will not be generated through processing
-        anns_to_keep = {ann for ann in possible_cats_in_datapoint if ann not in meta_anns["image_annotations"]}
-        sub_cats_to_remove = meta_anns["sub_categories"]
-        relationships_to_remove = meta_anns["relationships"]
-
-        # removing annotations takes place in three steps: First we remove all image annotations. Then, with all
-        # remaining image annotations we check, if the image attribute (with Image instance !) is not empty and remove
-        # it as well, if necessary. In the last step we remove all sub categories and relationships, if generated in
-        # pipeline.
-        df_pr = MapData(df_pr, filter_cat(anns_to_keep, possible_cats_in_datapoint))  # pylint: disable=E1120
-        df_pr = MapData(df_pr, maybe_remove_image_from_category(anns_to_keep))
-        df_pr = MapData(df_pr, remove_cats(sub_categories=sub_cats_to_remove, relationships=relationships_to_remove))  # pylint: disable=E1120
+        # clean-up procedure depends on the dataset type
+        if self.dataset.dataset_info.type == names.DS.TYPE.OBJ:
+            # we keep all image annotations that will not be generated through processing
+            anns_to_keep = {ann for ann in possible_cats_in_datapoint if ann not in meta_anns["image_annotations"]}
+            sub_cats_to_remove = meta_anns["sub_categories"]
+            relationships_to_remove = meta_anns["relationships"]
+            # removing annotations takes place in three steps: First we remove all image annotations. Then, with all
+            # remaining image annotations we check, if the image attribute (with Image instance !) is not empty and
+            # remove it as well, if necessary. In the last step we remove all sub categories and relationships, if
+            # generated in pipeline.
+            df_pr = MapData(df_pr, filter_cat(anns_to_keep, possible_cats_in_datapoint))  # pylint: disable=E1120
+            df_pr = MapData(df_pr, maybe_remove_image_from_category(anns_to_keep))
+            df_pr = MapData(
+                df_pr,
+                remove_cats(
+                    sub_categories=sub_cats_to_remove, relationships=relationships_to_remove
+                ),
+            )
+
+        elif self.dataset.dataset_info.type == names.DS.TYPE.SEQ:
+            summary_sub_cats_to_remove = meta_anns["summaries"]
+            df_pr = MapData(
+                df_pr, remove_cats(summary_sub_categories=summary_sub_cats_to_remove)
+            )
+
+        else:
+            raise NotImplementedError
+
         return df_pr
diff --git a/deepdoctection/eval/tedsmetric.py b/deepdoctection/eval/tedsmetric.py
index c39ccf9f..66544d62 100644
--- a/deepdoctection/eval/tedsmetric.py
+++ b/deepdoctection/eval/tedsmetric.py
@@ -18,7 +18,7 @@
 
 import statistics
 from collections import defaultdict, deque
-from typing import List, Optional, Tuple, Any
+from typing import Any, List, Optional, Tuple
 
 from ..dataflow import DataFlow, DataFromList, MapData, MultiThreadMapData
 from ..datasets.base import DatasetCategories
@@ -50,7 +50,7 @@ class TableTree(Tree):
     TableTree is derived class from :class:`APTED.helpers.Tree`.
     """
 
-    def __init__(
+    def __init__(  # pylint: disable=W0231
         self,
         *children: Any,
         tag: str,
@@ -118,9 +118,9 @@ def tokenize(self, node: TableTree) -> None:
         if node.tag != "td" and node.tail is not None:
             self.__tokens__ += list(node.tail)
 
-    def load_html_tree(self, node: TableTree, parent: Optional[TableTree] =None) -> Optional[TableTree]:
+    def load_html_tree(self, node: TableTree, parent: Optional[TableTree] = None) -> Optional[TableTree]:
         """Converts HTML tree to the format required by apted"""
-        global __tokens__   # pylint: disable = W0602
+        global __tokens__  # pylint: disable = W0602
         if node.tag == "td":
             if self.structure_only:
                 cell = []
@@ -128,9 +128,12 @@ def load_html_tree(self, node: TableTree, parent: Optional[TableTree] =None) ->
                 self.__tokens__ = []
                 self.tokenize(node)
                 cell = self.__tokens__[1:-1].copy()
-            new_node = TableTree(*deque(),
-                tag=node.tag, colspan=int(node.attrib.get("colspan", "1")),
-                                 rowspan=int(node.attrib.get("rowspan", "1")), content=cell
+            new_node = TableTree(
+                *deque(),
+                tag=node.tag,
+                colspan=int(node.attrib.get("colspan", "1")),
+                rowspan=int(node.attrib.get("rowspan", "1")),
+                content=cell,
             )
         else:
             new_node = TableTree(*deque(), tag=node.tag, rowspan=None, colspan=None, content=None)
@@ -143,7 +146,7 @@ def load_html_tree(self, node: TableTree, parent: Optional[TableTree] =None) ->
             return new_node
         return None
 
-    def evaluate(self, inputs: Tuple[str,str]) -> float:
+    def evaluate(self, inputs: Tuple[str, str]) -> float:
         """Computes TEDS score between the prediction and the ground truth of a
         given sample
         """
@@ -171,7 +174,7 @@ def evaluate(self, inputs: Tuple[str,str]) -> float:
         return 0.0
 
 
-def teds_metric(gt_list: List[str], predict_list: List[str], structure_only: bool) -> Tuple[float,int]:
+def teds_metric(gt_list: List[str], predict_list: List[str], structure_only: bool) -> Tuple[float, int]:
     """
     Computes tree edit distance score (TEDS) between the prediction and the ground truth of a batch of samples. The
     approach to measure similarity of tables by means of their html representation has been adovacated in
@@ -182,7 +185,7 @@ def teds_metric(gt_list: List[str], predict_list: List[str], structure_only: boo
 
     input_list = list(zip(gt_list, predict_list))
     df = DataFromList(input_list)
-    if len(input_list)>=2:
+    if len(input_list) >= 2:
         df = MultiThreadMapData(df, 2, teds.evaluate, strict=True)
     else:
         df = MapData(df, teds.evaluate)
@@ -202,7 +205,7 @@ class TedsMetric(MetricBase):
     Metric induced by :func:`teds`
     """
 
-    metric = teds_metric # type: ignore
+    metric = teds_metric  # type: ignore
     mapper = to_page
     structure_only = False
 
@@ -240,7 +243,7 @@ def get_distance(
     ) -> List[JsonDict]:
         html_gt_list, html_pr_list = cls.dump(dataflow_gt, dataflow_predictions, categories)
 
-        score, num_samples = cls.metric(html_gt_list, html_pr_list, cls.structure_only) # type: ignore
+        score, num_samples = cls.metric(html_gt_list, html_pr_list, cls.structure_only)  # type: ignore
         return [{"teds_score": score, "num_samples": num_samples}]
 
     @classmethod
diff --git a/deepdoctection/eval/tp_eval_callback.py b/deepdoctection/eval/tp_eval_callback.py
index cf09dff3..8cc22984 100644
--- a/deepdoctection/eval/tp_eval_callback.py
+++ b/deepdoctection/eval/tp_eval_callback.py
@@ -93,6 +93,7 @@ def _setup_graph(self) -> None:
         if _use_replicated(self.cfg):
             assert self.evaluator.pipe_component
             for idx, comp in enumerate(self.evaluator.pipe_component.pipe_components):
+                assert isinstance(comp, PredictorPipelineComponent)
                 assert isinstance(comp.predictor, TPFrcnnDetector)
                 comp.predictor.tp_predictor = self._build_predictor(idx % self.num_gpu)
 
diff --git a/deepdoctection/extern/base.py b/deepdoctection/extern/base.py
index 911804b3..95665444 100644
--- a/deepdoctection/extern/base.py
+++ b/deepdoctection/extern/base.py
@@ -219,6 +219,8 @@ class TokenClassResult:
      :attr:`semantic_name`: semantic name
 
      :attr:`bio_tag`: bio tag
+
+     :attr:`score`: prediction score
     """
 
     uuid: str
@@ -228,16 +230,32 @@ class TokenClassResult:
     class_name: str = ""
     semantic_name: str = ""
     bio_tag: str = ""
+    score: Optional[float] = None
+
+
+@dataclass
+class SequenceClassResult:
+    """
+    Storage for sequence classification results
+
+    :attr:`class_id`: category id
+    :attr:`class_name`: category name
+    :attr:`score`: prediction score
+    """
+
+    class_id: int
+    class_name: str = ""
+    score: Optional[float] = None
 
 
 class LMTokenClassifier(PredictorBase):
     """
-    Abstract base class for token classifiers. If you want to connect external token classifiers with Deep-Doctection
+    Abstract base class for token classifiers. If you want to connect external token classifiers with Deepdoctection
     predictors wrap them into a class derived from this class. Note, that this class is still DL library agnostic.
     """
 
     @abstractmethod
-    def predict(self, **encodings: Union[List[str], "torch.Tensor"]) -> List[TokenClassResult]:  # type: ignore
+    def predict(self, **encodings: Union[List[List[str]], "torch.Tensor"]) -> List[TokenClassResult]:  # type: ignore
         """
         Abstract method predict
         """
@@ -252,6 +270,28 @@ def possible_tokens(self) -> List[str]:
         raise NotImplementedError
 
 
+class LMSequenceClassifier(PredictorBase):
+    """
+    Abstract base class for sequence classification. If you want to connect external sequence classifiers with
+    Deepdoctection predictors, wrap them into a class derived from this class.
+    """
+
+    @abstractmethod
+    def predict(self, **encodings: Union[List[List[str]], "torch.Tensor"]) -> SequenceClassResult:  # type: ignore
+        """
+        Abstract method predict
+        """
+        raise NotImplementedError
+
+    @abstractmethod
+    def possible_categories(self) -> List[str]:
+        """
+        Abstract method possible_categories. Must implement a method that returns a list of possible detectable
+        categories for a sequence
+        """
+        raise NotImplementedError
+
+
 class LanguageDetector(PredictorBase):
     """
     Abstract base class for language detectors. The :meth:`predict` accepts a string of arbitrary length and returns an
diff --git a/deepdoctection/extern/d2detect.py b/deepdoctection/extern/d2detect.py
index adc93d7a..e76ce38c 100644
--- a/deepdoctection/extern/d2detect.py
+++ b/deepdoctection/extern/d2detect.py
@@ -20,7 +20,7 @@
 """
 
 from copy import copy
-from typing import Dict, List, Optional
+from typing import Dict, List, Literal, Optional
 
 from ..utils.detection_types import ImageType, Requirement
 from ..utils.file_utils import (
@@ -31,6 +31,7 @@
 )
 from .base import DetectionResult, ObjectDetector, PredictorBase
 from .common import InferenceResize
+from .pt.ptutils import set_torch_auto_device
 
 if pytorch_available():
     import torch
@@ -130,7 +131,7 @@ def __init__(
         path_weights: str,
         categories: Dict[str, str],
         config_overwrite: Optional[List[str]] = None,
-        device: str = "cuda",
+        device: Optional[Literal["cpu", "cuda"]] = None,
     ):
         """
         Set up the predictor.
@@ -146,6 +147,7 @@ def __init__(
                            where models in the model zoo are trained with 'BG' class having the highest index.
         :param config_overwrite:  Overwrite some hyper parameters defined by the yaml file with some new values. E.g.
                                  ["OUTPUT.FRCNN_NMS_THRESH=0.3","OUTPUT.RESULT_SCORE_THRESH=0.6"].
+        :param device: "cpu" or "cuda". If not specified will auto select depending on what is available
         """
 
         self._categories_d2 = self._map_to_d2_categories(copy(categories))
@@ -160,13 +162,18 @@ def __init__(
         self.path_yaml = path_yaml
         self.categories = copy(categories)
         self.config_overwrite = config_overwrite
-        self.device = device
+        if device is not None:
+            self.device = device
+        else:
+            self.device = set_torch_auto_device()
         self.cfg = self._set_config(path_yaml, d2_conf_list, device)
         self.d2_predictor = D2FrcnnDetector.set_model(self.cfg)
         self._instantiate_d2_predictor()
 
     @staticmethod
-    def _set_config(path_yaml: str, d2_conf_list: List[str], device: str) -> "CfgNode":
+    def _set_config(
+        path_yaml: str, d2_conf_list: List[str], device: Optional[Literal["cpu", "cuda"]] = None
+    ) -> "CfgNode":
         cfg = get_cfg()
         # additional attribute with default value, so that the true value can be loaded from the configs
         cfg.NMS_THRESH_CLASS_AGNOSTIC = 0.1
@@ -217,7 +224,7 @@ def _map_category_names(self, detection_results: List[DetectionResult]) -> List[
         for result in detection_results:
             result.class_name = self._categories_d2[str(result.class_id)]
             assert isinstance(result.class_id, int)
-            result.class_id = result.class_id + 1
+            result.class_id += 1
         return detection_results
 
     @classmethod
diff --git a/deepdoctection/extern/doctrocr.py b/deepdoctection/extern/doctrocr.py
index ee7466fb..a91e8dd2 100644
--- a/deepdoctection/extern/doctrocr.py
+++ b/deepdoctection/extern/doctrocr.py
@@ -22,7 +22,16 @@
 from typing import List, Tuple
 
 from ..utils.detection_types import ImageType, Requirement
-from ..utils.file_utils import doctr_available, get_doctr_requirement, get_tf_addons_requirements, tf_addons_available
+from ..utils.file_utils import (
+    doctr_available,
+    get_doctr_requirement,
+    get_pytorch_requirement,
+    get_tensorflow_requirement,
+    get_tf_addons_requirements,
+    pytorch_available,
+    tf_addons_available,
+    tf_available,
+)
 from ..utils.settings import names
 from .base import DetectionResult, ObjectDetector, PredictorBase, TextRecognizer
 
@@ -86,7 +95,7 @@ class DoctrTextlineDetector(ObjectDetector):
                  det = DoctrTextlineDetector()
                  layout = ImageLayoutService(det,to_image=True, crop_image=True)
                  rec = DoctrTextRecognizer()
-                 text = TextExtractionService(rec,extract_from_roi="LINE")
+                 text = TextExtractionService(rec,extract_from_roi="WORD")
                  analyzer = DoctectionPipe(pipeline_component_list=[layout,text])
                  df = analyzer.analyze(path = path)
 
@@ -111,7 +120,11 @@ def predict(self, np_img: ImageType) -> List[DetectionResult]:
 
     @classmethod
     def get_requirements(cls) -> List[Requirement]:
-        return [get_doctr_requirement(), get_tf_addons_requirements()]
+        if tf_available():
+            return [get_tensorflow_requirement(), get_doctr_requirement(), get_tf_addons_requirements()]
+        if pytorch_available():
+            return [get_pytorch_requirement(), get_doctr_requirement()]
+        raise ModuleNotFoundError("Neither Tensorflow nor PyTorch has been installed. Cannot use DoctrTextlineDetector")
 
     def clone(self) -> PredictorBase:
         return self.__class__()
@@ -163,7 +176,11 @@ def predict(self, images: List[Tuple[str, ImageType]]) -> List[DetectionResult]:
 
     @classmethod
     def get_requirements(cls) -> List[Requirement]:
-        return [get_doctr_requirement(), get_tf_addons_requirements()]
+        if tf_available():
+            return [get_tensorflow_requirement(), get_doctr_requirement(), get_tf_addons_requirements()]
+        if pytorch_available():
+            return [get_pytorch_requirement(), get_doctr_requirement()]
+        raise ModuleNotFoundError("Neither Tensorflow nor PyTorch has been installed. Cannot use DoctrTextRecognizer")
 
     def clone(self) -> PredictorBase:
         return self.__class__()
diff --git a/deepdoctection/extern/hflayoutlm.py b/deepdoctection/extern/hflayoutlm.py
index 8488978c..daf96262 100644
--- a/deepdoctection/extern/hflayoutlm.py
+++ b/deepdoctection/extern/hflayoutlm.py
@@ -20,7 +20,7 @@
 """
 
 from copy import copy
-from typing import Dict, List, Optional, Sequence, Union
+from typing import Dict, List, Literal, Mapping, Optional, Sequence, Union
 
 from ..utils.detection_types import Requirement
 from ..utils.file_utils import (
@@ -30,15 +30,16 @@
     transformers_available,
 )
 from ..utils.settings import names
-from .base import LMTokenClassifier, PredictorBase, TokenClassResult
+from .base import LMSequenceClassifier, LMTokenClassifier, PredictorBase, SequenceClassResult, TokenClassResult
 from .pt.ptutils import set_torch_auto_device
 
 if pytorch_available():
     import torch
+    import torch.nn.functional as F
     from torch import Tensor  # pylint: disable=W0611
 
 if transformers_available():
-    from transformers import LayoutLMForTokenClassification, PretrainedConfig
+    from transformers import LayoutLMForSequenceClassification, LayoutLMForTokenClassification, PretrainedConfig
 
 
 def predict_token_classes(
@@ -61,14 +62,38 @@ def predict_token_classes(
     :return: A list of TokenClassResults
     """
     outputs = model(input_ids=input_ids, bbox=boxes, attention_mask=attention_mask, token_type_ids=token_type_ids)
+    score = torch.max(F.softmax(outputs.logits.squeeze(), dim=1), dim=1)
     token_class_predictions = outputs.logits.argmax(-1).squeeze().tolist()
     input_ids_list = input_ids.squeeze().tolist()
     return [
-        TokenClassResult(uuid=out[0], token_id=out[1], class_id=out[2], token=out[3])
-        for out in zip(uuids, input_ids_list, token_class_predictions, tokens)
+        TokenClassResult(uuid=out[0], token_id=out[1], class_id=out[2], token=out[3], score=out[4].tolist())
+        for out in zip(uuids, input_ids_list, token_class_predictions, tokens, score[0])
     ]
 
 
+def predict_sequence_classes(
+    input_ids: "Tensor",
+    attention_mask: "Tensor",
+    token_type_ids: "Tensor",
+    boxes: "Tensor",
+    model: "LayoutLMForSequenceClassification",
+) -> SequenceClassResult:
+    """
+    :param input_ids: Token converted to ids to be taken from LayoutLMTokenizer
+    :param attention_mask: The associated attention masks from padded sequences taken from LayoutLMTokenizer
+    :param token_type_ids: Torch tensor of token type ids taken from LayoutLMTokenizer
+    :param boxes: Torch tensor of bounding boxes of type 'xyxy'
+    :param model: layoutlm model for token classification
+    :return: SequenceClassResult
+    """
+
+    outputs = model(input_ids=input_ids, bbox=boxes, attention_mask=attention_mask, token_type_ids=token_type_ids)
+    score = torch.max(F.softmax(outputs.logits)).tolist()
+    token_class_predictions = outputs.logits.argmax(-1).squeeze().tolist()
+
+    return SequenceClassResult(class_id=token_class_predictions, score=float(score[0]))
+
+
 class HFLayoutLmTokenClassifier(LMTokenClassifier):
     """
     A wrapper class for :class:`transformers.LayoutLMForTokenClassification` to use within a pipeline component.
@@ -86,15 +111,15 @@ class HFLayoutLmTokenClassifier(LMTokenClassifier):
             ocr_service = TextExtractionService(tess)
 
             # hf tokenizer and token classifier
-            tokenizer = LayoutLMTokenizer.from_pretrained("mrm8488/layoutlm-finetuned-funsd")
+            tokenizer = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
             layoutlm = HFLayoutLmTokenClassifier("path/to/config.json","path/to/model.bin",
-                                                  categories_explicit= ['B-ANSWER', 'B-HEAD', 'B-QUESTION', 'E-ANSWER',
-                                                                        'E-HEAD', 'E-QUESTION', 'I-ANSWER', 'I-HEAD',
-                                                                        'I-QUESTION', 'O', 'S-ANSWER', 'S-HEAD',
-                                                                        'S-QUESTION'])
+                                                  categories= ['B-ANSWER', 'B-HEAD', 'B-QUESTION', 'E-ANSWER',
+                                                               'E-HEAD', 'E-QUESTION', 'I-ANSWER', 'I-HEAD',
+                                                               'I-QUESTION', 'O', 'S-ANSWER', 'S-HEAD',
+                                                               'S-QUESTION'])
 
             # token classification service
-            layoutlm_service = LMTokenClassifierService(tokenizer,layoutlm,image_to_layoutlm)
+            layoutlm_service = LMTokenClassifierService(tokenizer,layoutlm, image_to_layoutlm_features)
 
             pipe = DoctectionPipe(pipeline_component_list=[ocr_service,layoutlm_service])
 
@@ -111,7 +136,8 @@ def __init__(
         path_weights: str,
         categories_semantics: Optional[Sequence[str]] = None,
         categories_bio: Optional[Sequence[str]] = None,
-        categories_explicit: Optional[Sequence[str]] = None,
+        categories: Optional[Mapping[str, str]] = None,
+        device: Optional[Literal["cpu", "cuda"]] = None,
     ):
         """
         :param categories_semantics: A dict with key (indices) and values (category names) for NER semantics, i.e. the
@@ -119,36 +145,37 @@ def __init__(
                                      be done internally.
         :param categories_bio: A dict with key (indices) and values (category names) for NER tags (i.e. BIO). To be
                                consistent with detectors use only values>0. Conversion will be done internally.
-        :param categories_explicit: If you have a pre-trained model you can pass a complete list of NER categories, i.e.
-                                    semantics and tags explicitly.
+        :param categories: If you have a pre-trained model you can pass a complete dict of NER categories
         """
 
-        if categories_explicit is None:
+        if categories is None:
             assert categories_semantics is not None
             assert categories_bio is not None
 
         self.path_config_json = path_config_json
         self.path_weights = path_weights
-        self.categories_semantics = copy(categories_semantics) if categories_semantics is not None else None
-        self.categories_bio = copy(categories_bio) if categories_bio is not None else None
-        self.categories_explicit = copy(categories_explicit) if categories_explicit is not None else None
-
-        self._categories: Dict[int, str] = (
-            dict(enumerate(self.categories_explicit))  # type: ignore
-            if categories_explicit is not None
-            else self._categories_orig_to_categories(categories_semantics, categories_bio)  # type: ignore
-        )
-        self.device = set_torch_auto_device()
+        self.categories_semantics = categories_semantics
+        self.categories_bio = categories_bio
+        if categories:
+            self.categories = copy(categories)
+        else:
+            self.categories = self._categories_orig_to_categories(categories_semantics, categories_bio)  # type: ignore
+
         config = PretrainedConfig.from_pretrained(pretrained_model_name_or_path=path_config_json)
         self.model = LayoutLMForTokenClassification.from_pretrained(
             pretrained_model_name_or_path=path_weights, config=config
         )
+        if device is not None:
+            self.device = device
+        else:
+            self.device = set_torch_auto_device()
+        self.model.to(self.device)
 
     @classmethod
     def get_requirements(cls) -> List[Requirement]:
         return [get_pytorch_requirement(), get_transformers_requirement()]
 
-    def predict(self, **encodings: Union[List[str], "torch.Tensor"]) -> List[TokenClassResult]:
+    def predict(self, **encodings: Union[List[List[str]], "torch.Tensor"]) -> List[TokenClassResult]:
         """
         Launch inference on LayoutLm for token classification. Pass the following arguments
 
@@ -161,61 +188,155 @@ def predict(self, **encodings: Union[List[str], "torch.Tensor"]) -> List[TokenCl
         :return: A list of TokenClassResults
         """
 
-        assert "input_ids" in encodings
-        assert "attention_mask" in encodings
-        assert "token_type_ids" in encodings
-        assert "boxes" in encodings
-        assert "tokens" in encodings
-
-        assert isinstance(encodings["ids"], list)
-        assert isinstance(encodings["input_ids"], torch.Tensor)
-        assert isinstance(encodings["attention_mask"], torch.Tensor)
-        assert isinstance(encodings["token_type_ids"], torch.Tensor)
-        assert isinstance(encodings["boxes"], torch.Tensor)
-        assert isinstance(encodings["tokens"], list)
+        ann_ids = encodings.get("ann_ids")
+        input_ids = encodings.get("input_ids")
+        attention_mask = encodings.get("attention_mask")
+        token_type_ids = encodings.get("token_type_ids")
+        boxes = encodings.get("bbox")
+        tokens = encodings.get("tokens")
+
+        assert isinstance(ann_ids, list)
+        if len(ann_ids) > 1:
+            raise ValueError("HFLayoutLmTokenClassifier accepts for inference only batch size of 1")
+        assert isinstance(input_ids, torch.Tensor)
+        assert isinstance(attention_mask, torch.Tensor)
+        assert isinstance(token_type_ids, torch.Tensor)
+        assert isinstance(boxes, torch.Tensor)
+        assert isinstance(tokens, list)
+
+        input_ids = input_ids.to(self.device)
+        attention_mask = attention_mask.to(self.device)
+        token_type_ids = token_type_ids.to(self.device)
+        boxes = boxes.to(self.device)
 
         results = predict_token_classes(
-            encodings["ids"],
-            encodings["input_ids"],
-            encodings["attention_mask"],
-            encodings["token_type_ids"],
-            encodings["boxes"],
-            encodings["tokens"],
+            ann_ids[0],
+            input_ids,
+            attention_mask,
+            token_type_ids,
+            boxes,
+            tokens[0],
             self.model,
         )
 
         return self._map_category_names(results)
 
     @staticmethod
-    def _categories_orig_to_categories(categories_semantics: List[str], categories_bio: List[str]) -> Dict[int, str]:
-        categories_semantics, categories_bio = copy(categories_semantics), copy(categories_bio)
+    def _categories_orig_to_categories(categories_semantics: List[str], categories_bio: List[str]) -> Dict[str, str]:
         categories_list = [
             x + "-" + y for x in categories_bio if x != names.NER.O for y in categories_semantics if y != names.C.O
         ] + [names.NER.O]
-        return dict(enumerate(categories_list))
+        return {str(k): v for k, v in enumerate(categories_list, 1)}
 
     def _map_category_names(self, token_results: List[TokenClassResult]) -> List[TokenClassResult]:
         for result in token_results:
-            result.class_name = self._categories[result.class_id]
+            result.class_name = self.categories[str(result.class_id + 1)]
             result.semantic_name = result.class_name.split("-")[1] if "-" in result.class_name else names.C.O
             result.bio_tag = result.class_name.split("-")[0] if "-" in result.class_name else names.NER.O
+            result.class_id += 1
         return token_results
 
-    @property
-    def categories(self) -> Dict[int, str]:
-        """
-        categories
-        """
-        return self._categories
-
     def clone(self) -> PredictorBase:
         return self.__class__(
             self.path_config_json,
             self.path_weights,
             self.categories_semantics,
             self.categories_bio,
-            self.categories_explicit,
+            self.categories,
         )
 
     def possible_tokens(self) -> List[str]:
-        return list(self._categories.values())
+        return list(self.categories.values())
+
+
+class HFLayoutLmSequenceClassifier(LMSequenceClassifier):
+    """
+    A wrapper class for :class:`transformers.LayoutLMForSequenceClassification` to use within a pipeline component.
+    Check https://huggingface.co/docs/transformers/model_doc/layoutlm for documentation of the model itself.
+    Note that this model is equipped with a head that is only useful for classifying the input sequence. For token
+    classification and other things please use another model of the family.
+
+    **Example**
+
+        .. code-block:: python
+
+            # setting up compulsory ocr service
+            tesseract_config_path = ModelCatalog.get_full_path_configs("/dd/conf_tesseract.yaml")
+            tess = TesseractOcrDetector(tesseract_config_path)
+            ocr_service = TextExtractionService(tess)
+
+            # hf tokenizer and token classifier
+            tokenizer = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
+            layoutlm = HFLayoutLmSequenceClassifier("path/to/config.json","path/to/model.bin",
+                                                  categories=["HANDWRITTEN", "PRESENTATION", "RESUME"])
+
+            # token classification service
+            layoutlm_service = LMSequenceClassifierService(tokenizer,layoutlm, image_to_layoutlm_features)
+
+            pipe = DoctectionPipe(pipeline_component_list=[ocr_service,layoutlm_service])
+
+            path = "path/to/some/form"
+            df = pipe.analyze(path=path)
+
+            for dp in df:
+                ...
+    """
+
+    def __init__(
+        self,
+        path_config_json: str,
+        path_weights: str,
+        categories: Dict[str, str],
+        device: Optional[Literal["cpu", "cuda"]] = None,
+    ):
+        self.path_config = path_config_json
+        self.path_weights = path_weights
+        self.categories = copy(categories)
+        config = PretrainedConfig.from_pretrained(pretrained_model_name_or_path=path_config_json)
+        self.model = LayoutLMForSequenceClassification.from_pretrained(
+            pretrained_model_name_or_path=path_weights, config=config
+        )
+        if device is not None:
+            self.device = device
+        else:
+            self.device = set_torch_auto_device()
+        self.model.to(self.device)
+
+    def predict(self, **encodings: Union[List[List[str]], "torch.Tensor"]) -> SequenceClassResult:
+
+        input_ids = encodings.get("input_ids")
+        attention_mask = encodings.get("attention_mask")
+        token_type_ids = encodings.get("token_type_ids")
+        boxes = encodings.get("bbox")
+
+        assert isinstance(input_ids, torch.Tensor)
+        assert isinstance(attention_mask, torch.Tensor)
+        assert isinstance(token_type_ids, torch.Tensor)
+        assert isinstance(boxes, torch.Tensor)
+
+        input_ids = input_ids.to(self.device)
+        attention_mask = attention_mask.to(self.device)
+        token_type_ids = token_type_ids.to(self.device)
+        boxes = boxes.to(self.device)
+
+        result = predict_sequence_classes(
+            input_ids,
+            attention_mask,
+            token_type_ids,
+            boxes,
+            self.model,
+        )
+
+        result.class_id += 1
+        result.class_name = self.categories[str(result.class_id)]
+        return result
+
+    @classmethod
+    def get_requirements(cls) -> List[Requirement]:
+        return [get_pytorch_requirement(), get_transformers_requirement()]
+
+    def clone(self) -> PredictorBase:
+        return self.__class__(self.path_config, self.path_weights, self.categories)
+
+    def possible_categories(self) -> List[str]:
+        return list(self.categories.values())
diff --git a/deepdoctection/extern/model.py b/deepdoctection/extern/model.py
index 65d4263a..6c09b510 100644
--- a/deepdoctection/extern/model.py
+++ b/deepdoctection/extern/model.py
@@ -260,8 +260,8 @@ class ModelCatalog:
             hf_config_file=["Base-RCNN-FPN.yaml", "CASCADE_RCNN_R_50_FPN_GN.yaml"],
             categories={"1": names.C.ROW, "2": names.C.COL},
         ),
-        "mrm8488/layoutlm-finetuned-funsd": ModelProfile(
-            name="mrm8488/layoutlm-finetuned-funsd",
+        "mrm8488/layoutlm-finetuned-funsd/pytorch_model.bin": ModelProfile(
+            name="mrm8488/layoutlm-finetuned-funsd/pytorch_model.bin",
             description="LayoutLM pre-trained on CDIP and fine tuned on funsd",
             config="mrm8488/layoutlm-finetuned-funsd/config.json",
             size=[450639205],
@@ -271,20 +271,33 @@ class ModelCatalog:
             hf_config_file=["config.json"],
             categories={
                 "1": "B-ANSWER",
-                "2": "B-HEADER",
+                "2": "B-HEAD",
                 "3": "B-QUESTION",
                 "4": "E-ANSWER",
-                "5": "E-HEADER",
+                "5": "E-HEAD",
                 "6": "E-QUESTION",
                 "7": "I-ANSWER",
-                "8": "I-HEADER",
+                "8": "I-HEAD",
                 "9": "I-QUESTION",
                 "10": "O",
                 "11": "S-ANSWER",
-                "12": "S-HEADER",
+                "12": "S-HEAD",
                 "13": "S-QUESTION",
             },
         ),
+        "microsoft/layoutlm-base-uncased/pytorch_model.bin": ModelProfile(
+            name="microsoft/layoutlm-base-uncased/pytorch_model.bin",
+            description="LayoutLM is a simple but effective pre-training method of text and layout for document image"
+            " understanding and information extraction tasks, such as form understanding and receipt"
+            " understanding. LayoutLM archived the SOTA results on multiple datasets. This model does not"
+            "contain any head and has to be fine tuned on a downstream task.",
+            size=[453093832],
+            tp_model=False,
+            config="microsoft/layoutlm-base-uncased/config.json",
+            hf_repo_id="microsoft/layoutlm-base-uncased",
+            hf_model_name="pytorch_model.bin",
+            hf_config_file=["config.json"],
+        ),
         "fasttext/lid.176.bin": ModelProfile(
             name="fasttext/lid.176.bin",
             description="Fasttext language detection model",
@@ -483,7 +496,7 @@ def get_full_path_weights(name: str) -> str:
         :return: absolute weight path
         """
         profile = ModelCatalog.get_profile(name)
-        if profile.config is not None:
+        if profile.name is not None:
             return os.path.join(get_weights_dir_path(), profile.name)
         logger.info(
             "Model is not registered. Please make sure the weights are available in the weights cache " "directory"
diff --git a/deepdoctection/extern/tpdetect.py b/deepdoctection/extern/tpdetect.py
index 159c0ceb..d6f7f786 100644
--- a/deepdoctection/extern/tpdetect.py
+++ b/deepdoctection/extern/tpdetect.py
@@ -23,7 +23,7 @@
 from typing import Dict, List, Optional, Union
 
 from ..utils.detection_types import ImageType, Requirement
-from ..utils.file_utils import get_tensorpack_requirement, tensorpack_available
+from ..utils.file_utils import get_tensorflow_requirement, get_tensorpack_requirement, tensorpack_available
 from ..utils.metacfg import set_config_by_yaml
 from .base import DetectionResult, ObjectDetector, PredictorBase
 
@@ -144,7 +144,7 @@ def _map_category_names(self, detection_results: List[DetectionResult]) -> List[
 
     @classmethod
     def get_requirements(cls) -> List[Requirement]:
-        return [get_tensorpack_requirement()]
+        return [get_tensorflow_requirement(), get_tensorpack_requirement()]
 
     def clone(self) -> PredictorBase:
         return self.__class__(
diff --git a/deepdoctection/mapper/__init__.py b/deepdoctection/mapper/__init__.py
index ecfd8007..e2f6bc05 100644
--- a/deepdoctection/mapper/__init__.py
+++ b/deepdoctection/mapper/__init__.py
@@ -39,7 +39,7 @@
     from .d2struct import *
 
 if pytorch_available() and transformers_available():
-    from .laylmstruct import *  # pylint: disable = W0622
+    from .laylmstruct import *
 
 
 # Mapper
diff --git a/deepdoctection/mapper/cats.py b/deepdoctection/mapper/cats.py
index 8ef098f4..1bc42184 100644
--- a/deepdoctection/mapper/cats.py
+++ b/deepdoctection/mapper/cats.py
@@ -21,7 +21,7 @@
 """
 
 from collections import defaultdict
-from typing import Dict, List, Literal, Mapping, Optional, Sequence, Union
+from typing import Dict, List, Literal, Mapping, Optional, Sequence, Tuple, Union
 
 from ..datapoint.annotation import ContainerAnnotation, ImageAnnotation
 from ..datapoint.image import Image
@@ -111,70 +111,158 @@ def filter_cat(dp: Image, categories_as_list_filtered: List[str], categories_as_
     return dp
 
 
+@curry
+def filter_summary(
+    dp: Image, sub_cat_to_sub_cat_names_or_ids: Mapping[str, Sequence[str]], use_category_name: bool = True
+) -> Optional[Image]:
+    """
+    Filters datapoints with given summary conditions. If several conditions are given, it will filter out datapoints
+    that do not satisfy all conditions.
+
+    :param dp: Image datapoint
+    :param sub_cat_to_sub_cat_names_or_ids: A dict of list. The key correspond to the sub category key to look for in
+                                            the summary. The value correspond to a sequence of either category names
+                                            or category ids
+    :param use_category_name: With respect to the previous argument, if set to True, it will look if the category name
+                              corresponds to any of the given values. If False it will look for category ids.
+    :return: Image or None
+    """
+    for key, values in sub_cat_to_sub_cat_names_or_ids.items():
+        if use_category_name and dp.summary:
+            if dp.summary.get_sub_category(key).category_name in values:
+                return dp
+        elif dp.summary:
+            if dp.summary.get_sub_category(key).category_id in values:
+                return dp
+    return None
+
+
 @curry
 def image_to_cat_id(
     dp: Image,
     category_names: Optional[Union[str, Sequence[str]]] = None,
-    sub_category_names: Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]] = None,
-    id_name_or_value: Literal["id","name","value"] = "id",
-) -> Dict[str, Union[List[int],List[int]]]:
+    sub_categories: Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]] = None,
+    summary_sub_category_names: Optional[Union[str, Sequence[str]]] = None,
+    id_name_or_value: Literal["id", "name", "value"] = "id",
+) -> Tuple[Dict[str, Union[List[int], List[int]]], str]:
     """
-    Extracts all category_ids or sub category information with given names into a defaultdict with names as keys.
+    Extracts all category_ids, sub category information or summary sub category information with given names into a
+    defaultdict. This mapping is useful when running evaluation with e.g. an accuracy metric.
+
+    **Example 1:**
+
+        dp contains image annotations
+
+        .. code-block:: python
+
+            ImageAnnotation(category_name='foo',category_id='1',...),
+            ImageAnnotation(category_name='bak',category_id='2',...),
+            ImageAnnotation(category_name='baz',category_id='3',...),
+            ImageAnnotation(category_name='foo',category_id='1',...),
+
+        Then
+
+        .. code-block:: python
+
+             image_to_cat_id(category_names=['foo', 'bak', 'baz'])(dp)
+
+        will return
 
-    **Example:**
+        .. code-block:: python
 
-        dp contains annotations
+            ({'foo':['1', '1'], 'bak':[ '2'], 'baz':['3']}, image_id)
 
-        `{'1', '2', '1', '1', '2', '3'}`
 
-        where
+    **Example 2:**
 
-        `{'foo': '1', 'bak': '2', 'baz': '3'}`.
+        dp contains image annotations as given in Example 1. Moreover, the 'foo' image annotation have sub categories:
+
+        .. code-block:: python
+
+            foo_sub_1: CategoryAnnotation(category_name='sub_1', category_id='4')
+            foo_sub_1: CategoryAnnotation(category_name='sub_1', category_id='5')
+
+
+        .. code-block:: python
+
+            image_to_cat_id(sub_categories={'foo':'foo_sub_1'})
+
+        will return
+
+        .. code-block:: python
+
+            ({'foo_sub_1':['5', '6']}, image_id)
 
-        The returned value will be
 
-        `{'foo':['1', '1', '1'], 'bak':[ '2', '2'], 'baz':[ '3']}`.
 
     :param dp: Image datapoint
     :param category_names: A list of category names
-    :param sub_category_names: A dict {'cat':'sub_cat'} or a list. Will dump the results with sub_cat as key
+    :param sub_categories: A dict {'cat':'sub_cat'} or a list. Will dump the results with sub_cat as key
     :param id_name_or_value: Only relevant for sub categories. It will extract the sub category id, the name or, if the
                              sub category is a container, it will extract a value.
+    :param summary_sub_category_names: A list of summary sub categories
     :return: A defaultdict of lists
     """
 
     cat_container = defaultdict(list)
+
     if isinstance(category_names, str):
         category_names = [category_names]
     if not category_names:
         category_names = []
 
+    if isinstance(summary_sub_category_names, str):
+        summary_sub_category_names = [summary_sub_category_names]
+    if not summary_sub_category_names:
+        summary_sub_category_names = []
+
     tmp_sub_category_names: Dict[str, Sequence[str]] = {}
 
-    if sub_category_names is not None:
-        for key, val in sub_category_names.items():
+    if sub_categories is not None:
+        for key, val in sub_categories.items():
             if isinstance(val, str):
                 val = [val]
             tmp_sub_category_names[key] = val
 
-    assert id_name_or_value in ("id", "name", "value")
-
-    for ann in dp.get_annotation_iter():
-        if ann.category_name in category_names:
-            cat_container[ann.category_name].append(int(ann.category_id))
-        if ann.category_name in tmp_sub_category_names:
-            for sub_cat_name in tmp_sub_category_names[ann.category_name]:
-                sub_cat = ann.get_sub_category(sub_cat_name)
-                if sub_cat is not None:
-                    if id_name_or_value == "id":
-                        cat_container[sub_cat_name].append(int(sub_cat.category_id))
-                    if id_name_or_value == "name":
-                        cat_container[sub_cat_name].append(sub_cat.category_name)  # type: ignore
-                    if id_name_or_value == "value":
-                        assert isinstance(sub_cat, ContainerAnnotation)
-                        cat_container[sub_cat_name].append(sub_cat.value)  # type: ignore
-
-    return cat_container
+    if id_name_or_value not in ("id", "name", "value"):
+        raise ValueError(f"id_name_or_value must be in ('id', 'name', 'value') but is {id_name_or_value}")
+
+    if category_names or sub_categories:  # pylint: disable=R1702
+        for ann in dp.get_annotation_iter():
+            if ann.category_name in category_names:
+                cat_container[ann.category_name].append(int(ann.category_id))
+            if ann.category_name in tmp_sub_category_names:
+                for sub_cat_name in tmp_sub_category_names[ann.category_name]:
+                    sub_cat = ann.get_sub_category(sub_cat_name)
+                    if sub_cat is not None:
+                        if id_name_or_value == "id":
+                            cat_container[sub_cat_name].append(int(sub_cat.category_id))
+                        if id_name_or_value == "name":
+                            cat_container[sub_cat_name].append(sub_cat.category_name)  # type: ignore
+                        if id_name_or_value == "value":
+                            if not isinstance(sub_cat, ContainerAnnotation):
+                                raise ValueError(
+                                    f"sub category {sub_cat_name} does not have a ContainerAnnotation. Choose another"
+                                    f"value for argument id_name_or_value"
+                                )
+                            cat_container[sub_cat_name].append(sub_cat.value)  # type: ignore
+
+    if dp.summary is not None and summary_sub_category_names:
+        for sub_cat_name in summary_sub_category_names:
+            sub_cat = dp.summary.get_sub_category(sub_cat_name)
+            if id_name_or_value == "id":
+                cat_container[sub_cat_name].append(int(sub_cat.category_id))
+            if id_name_or_value == "name":
+                cat_container[sub_cat_name].append(sub_cat.category_name)  # type: ignore
+            if id_name_or_value == "value":
+                if not isinstance(sub_cat, ContainerAnnotation):
+                    raise ValueError(
+                        f"sub category {sub_cat_name} does not have a ContainerAnnotation. Choose another"
+                        f"value for argument id_name_or_value"
+                    )
+                cat_container[sub_cat_name].append(sub_cat.value)  # type: ignore
+
+    return cat_container, dp.image_id
 
 
 @curry
@@ -183,6 +271,7 @@ def remove_cats(
     category_names: Optional[Union[str, Sequence[str]]] = None,
     sub_categories: Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]] = None,
     relationships: Optional[Union[Mapping[str, str], Mapping[str, Sequence[str]]]] = None,
+    summary_sub_categories: Optional[Union[str, Sequence[str]]] = None,
 ) -> Image:
     """
     Remove categories according to given category names or sub category names. Note that these will change the container
@@ -193,6 +282,7 @@ def remove_cats(
                            nothing.
     :param sub_categories: A dict with category names and a list of their sub categories to be removed
     :param relationships: A dict with category names and a list of relationship names to be removed
+    :param summary_sub_categories: A single sub category or a list of sub categories from a summary to be removed
     :return: A datapoint image with removed categories
     """
 
@@ -207,6 +297,9 @@ def remove_cats(
     if relationships is None:
         relationships = {}
 
+    if isinstance(summary_sub_categories, str):
+        summary_sub_categories = [summary_sub_categories]
+
     anns_to_remove = []
 
     for ann in dp.get_annotation_iter():
@@ -228,4 +321,9 @@ def remove_cats(
     for ann in anns_to_remove:
         dp.remove(ann)
 
+    if summary_sub_categories is not None:
+        if dp.summary is not None:
+            for sub_cat in summary_sub_categories:
+                dp.summary.remove_sub_category(sub_cat)
+
     return dp
diff --git a/deepdoctection/mapper/laylmstruct.py b/deepdoctection/mapper/laylmstruct.py
index f0ed93b1..ca236155 100644
--- a/deepdoctection/mapper/laylmstruct.py
+++ b/deepdoctection/mapper/laylmstruct.py
@@ -20,7 +20,8 @@
 https://github.com/NielsRogge/Transformers-Tutorials
 """
 
-from typing import List
+from dataclasses import dataclass, field
+from typing import Any, Callable, Dict, List, Literal, Mapping, NewType, Optional, Union
 
 import numpy as np
 from cv2 import INTER_LINEAR
@@ -30,24 +31,53 @@
 from ..datapoint.convert import box_to_point4, point4_to_box
 from ..datapoint.image import Image
 from ..utils.detection_types import JsonDict
+from ..utils.develop import deprecated
 from ..utils.file_utils import pytorch_available, transformers_available
 from ..utils.settings import names
 from .maputils import curry
 
 if pytorch_available():
-    from torch import clamp, round, tensor  # pylint: disable = W0622
+    import torch
 
 if transformers_available():
-    from transformers import PreTrainedTokenizer  # pylint: disable = W0611
+    from transformers import PreTrainedTokenizer, PreTrainedTokenizerFast  # pylint: disable = W0611
 
 
-__all__ = ["image_to_layoutlm"]
+__all__ = [
+    "image_to_layoutlm",
+    "image_to_raw_layoutlm_features",
+    "raw_features_to_layoutlm_features",
+    "LayoutLMDataCollator",
+    "image_to_layoutlm_features",
+    "DataCollator",
+    "LayoutLMFeatures",
+]
 
+RawLayoutLMFeatures = NewType("RawLayoutLMFeatures", JsonDict)
+LayoutLMFeatures = NewType("LayoutLMFeatures", JsonDict)
+InputDataClass = NewType("InputDataClass", JsonDict)
 
+"""
+https://github.com/huggingface/transformers/src/transformers/data/data_collator.py
+A DataCollator is a function that takes a list of samples from a Dataset and collate them into a batch, as a dictionary
+of PyTorch/TensorFlow tensors or NumPy arrays.
+"""
+
+DataCollator = NewType("DataCollator", Callable[[List[InputDataClass]], Dict[str, Any]])  # type: ignore
+
+_CLS_BOX = [0.0, 0.0, 0.0, 0.0]
+_SEP_BOX = [1000.0, 1000.0, 1000.0, 1000.0]
+
+
+@deprecated("Use image_to_raw_layoutlm_features and LayoutLMDataCollator instead", "2022-07-12")
 @curry
 def image_to_layoutlm(
-    dp: Image, tokenizer: "PreTrainedTokenizer", input_width: int = 1000, input_height: int = 1000
-) -> JsonDict:
+    dp: Image,
+    tokenizer: "PreTrainedTokenizer",
+    categories_dict_name_as_key: Optional[Dict[str, str]] = None,
+    input_width: int = 1000,
+    input_height: int = 1000,
+) -> LayoutLMFeatures:
     """
     Maps an image to a dict that can be consumed by a tokenizer and ultimately be passed
     to a LayoutLM language model.
@@ -56,14 +86,20 @@ def image_to_layoutlm(
     :param tokenizer: A tokenizer aligned with the following layout model
     :param input_width: Model image input width. Will resize the image and the bounding boxes
     :param input_height: Model image input height. Will resize the image and the bounding boxes
+    :param categories_dict_name_as_key: Only necessary for training. It will convert either token category names or
+                                        sequence category names according to the given dict to their corresponding id.
+                                        Note, that for token classification you maybe need to pass the mapping of the
+                                        token classification model.
     """
 
     output: JsonDict = {}
+
     anns = dp.get_annotation_iter(category_names=names.C.WORD)
     all_tokens = []
     all_boxes = []
     all_ann_ids = []
     words: List[str] = []
+    all_input_ids = []
     for ann in anns:
         char_cat = ann.get_sub_category(names.C.CHARS)
         assert isinstance(char_cat, ContainerAnnotation)
@@ -71,34 +107,63 @@ def image_to_layoutlm(
         assert isinstance(word, str)
         words.append(word)
         word_tokens = tokenizer.tokenize(word)
+        all_input_ids.extend(tokenizer.convert_tokens_to_ids(word_tokens))
+
         all_tokens.extend(word_tokens)
         if ann.image is not None:
             box = ann.image.get_embedding(dp.image_id)
         else:
             box = ann.bounding_box
         assert box is not None
+        if not box.absolute_coords:
+            box = box.transform(dp.width, dp.height, absolute_coords=True)
         box = box.to_list(mode="xyxy")
 
         if word_tokens:
             all_boxes.extend([box] * len(word_tokens))
             all_ann_ids.extend([ann.annotation_id] * len(word_tokens))
 
-    all_boxes = [[0.0, 0.0, 0.0, 0.0]] + all_boxes + [[1000.0, 1000.0, 1000.0, 1000.0]]
+        if (
+            names.C.SE in ann.sub_categories
+            and names.NER.TAG in ann.sub_categories
+            and categories_dict_name_as_key is not None
+        ):
+            semantic_label = ann.get_sub_category(names.C.SE).category_name
+            bio_tag = ann.get_sub_category(names.NER.TAG).category_name
+            if bio_tag == "O":
+                category_name = "O"
+            else:
+                category_name = bio_tag + "-" + semantic_label
+            output["label"] = int(categories_dict_name_as_key[category_name])
+
+        if dp.summary is not None and categories_dict_name_as_key is not None:
+            category_name = dp.summary.get_sub_category(names.C.DOC).category_name
+            output["label"] = int(categories_dict_name_as_key[category_name])
+
+    all_boxes = [_CLS_BOX] + all_boxes + [_SEP_BOX]
     all_ann_ids = ["CLS"] + all_ann_ids + ["SEP"]
     all_tokens = ["CLS"] + all_tokens + ["SEP"]
 
+    max_length = tokenizer.max_model_input_sizes["microsoft/layoutlm-base-uncased"]
+    encoding = tokenizer(" ".join(words), return_tensors="pt", max_length=max_length)
+
+    if len(all_ann_ids) > max_length:
+        all_ann_ids = all_ann_ids[: max_length - 1] + ["SEP"]
+        all_boxes = all_boxes[: max_length - 1] + [_SEP_BOX]
+        all_tokens = all_tokens[: max_length - 1] + ["SEP"]
+
     boxes = np.asarray(all_boxes, dtype="float32")
     boxes = box_to_point4(boxes)
 
-    encoding = tokenizer(" ".join(words), return_tensors="pt")
-
     resizer = ResizeTransform(dp.height, dp.width, input_height, input_width, INTER_LINEAR)
-    image = resizer.apply_image(dp.image)
+    if dp.image is not None:
+        image = resizer.apply_image(dp.image)
+        output["image"] = image
+
     boxes = resizer.apply_coords(boxes)
     boxes = point4_to_box(boxes)
-    pt_boxes = clamp(round(tensor([boxes.tolist()])), min=0.0, max=1000.0).int()
+    pt_boxes = torch.clamp(torch.round(torch.tensor([boxes.tolist()])), min=0.0, max=1000.0).int()
 
-    output["image"] = image
     output["ids"] = all_ann_ids
     output["boxes"] = pt_boxes
     output["tokens"] = all_tokens
@@ -106,4 +171,364 @@ def image_to_layoutlm(
     output["attention_mask"] = encoding["attention_mask"]
     output["token_type_ids"] = encoding["token_type_ids"]
 
-    return output
+    return LayoutLMFeatures(output)
+
+
+@curry
+def image_to_raw_layoutlm_features(
+    dp: Image,
+    categories_dict_name_as_key: Optional[Mapping[str, str]] = None,
+    dataset_type: Optional[Literal["SEQUENCE_CLASSIFICATION", "TOKEN_CLASSIFICATION"]] = None,
+    input_width: int = 1000,
+    input_height: int = 1000,
+) -> Optional[RawLayoutLMFeatures]:
+    """
+    Mapping a datapoint into an intermediate format for layoutlm. Features will be provided into a dict and this mapping
+    can be used for sequence or token classification as well as for inference. To generate input features for the model
+    please :func:`use raw_features_to_layoutlm_features`.
+
+
+    :param dp: Image
+    :param categories_dict_name_as_key: categories with names and ids. In comparison with arguments of the same name in
+                                        other functions the categories must be the categories of the model.
+                                        For SEQUENCE_CLASSIFICATION type datasets this will be the various document
+                                        classes and can be created by e.g. using
+                                        sequence_dataset.dataflow.categories.get_categories(as_dict=True,
+                                        name_as_key=True).
+                                        For TOKEN_CLASSIFICATION you will have to generate a dict of categories of type
+                                        "B-ANSWER","I-ANSWER","B-QUESTION","I-QUESTION","O" depending on what token
+                                        classes the model has been trained, resp. should be trained.
+                                        When using a TOKEN_CLASSIFICATION dataset note that all possible token classes
+                                        are generated by concatenating SEMANTIC_ENTITY with NER_TAG, where the OTHER
+                                        class is a stand-alone class with no NER_TAG.
+    :param dataset_type: Either SEQUENCE_CLASSIFICATION or TOKEN_CLASSIFICATION. When using a built-in dataset use
+    :param input_width: target width of the image. Under the hood, it will transform all box coordinates accordingly.
+    :param input_height: target width of the image. Under the hood, it will transform all box coordinates accordingly.
+    :return: dictionary with the following arguments:
+            'image_id', 'width', 'height', 'ann_ids', 'words', 'bbox' and 'dataset_type'.
+    """
+
+    raw_features: RawLayoutLMFeatures = RawLayoutLMFeatures({})
+    all_ann_ids = []
+    all_words = []
+    all_boxes = []
+    all_labels = []
+
+    anns = dp.get_annotation_iter(category_names=names.C.WORD)
+
+    for ann in anns:
+        all_ann_ids.append(ann.annotation_id)
+        char_cat = ann.get_sub_category(names.C.CHARS)
+        assert isinstance(char_cat, ContainerAnnotation)
+        word = char_cat.value
+        assert isinstance(word, str)
+        all_words.append(word)
+
+        if ann.image is not None:
+            box = ann.image.get_embedding(dp.image_id)
+        else:
+            box = ann.bounding_box
+        assert box is not None
+        if not box.absolute_coords:
+            box = box.transform(dp.width, dp.height, absolute_coords=True)
+        all_boxes.append(box.to_list(mode="xyxy"))
+
+        if (
+            names.C.SE in ann.sub_categories
+            and names.NER.TAG in ann.sub_categories
+            and categories_dict_name_as_key is not None
+            and dataset_type == names.DS.TYPE.TOK
+        ):
+            semantic_label = ann.get_sub_category(names.C.SE).category_name
+            bio_tag = ann.get_sub_category(names.NER.TAG).category_name
+            if bio_tag == "O":
+                category_name = "O"
+            else:
+                category_name = bio_tag + "-" + semantic_label
+            all_labels.append(int(categories_dict_name_as_key[category_name]))
+
+    if dp.summary is not None and categories_dict_name_as_key is not None and dataset_type == names.DS.TYPE.SEQ:
+        category_name = dp.summary.get_sub_category(names.C.DOC).category_name
+        all_labels.append(int(categories_dict_name_as_key[category_name]) - 1)
+
+    boxes = np.asarray(all_boxes, dtype="float32")
+    if boxes.ndim == 1:
+        return None
+
+    boxes = box_to_point4(boxes)
+
+    resizer = ResizeTransform(dp.height, dp.width, input_height, input_width, INTER_LINEAR)
+
+    if dp.image is not None:
+        image = resizer.apply_image(dp.image)
+        raw_features["image"] = image  # pylint: disable=E1137  #3162
+
+    boxes = resizer.apply_coords(boxes)
+    boxes = point4_to_box(boxes)
+
+    # input box coordinates must be of type long. We floor the ul and ceil the lr coords
+    boxes = np.concatenate((np.floor(boxes)[:, :2], np.ceil(boxes)[:, 2:]), axis=1).tolist()
+
+    # pylint: disable=E1137  #3162
+    raw_features["image_id"] = dp.image_id
+    raw_features["width"] = input_width
+    raw_features["height"] = input_height
+    raw_features["ann_ids"] = all_ann_ids
+    raw_features["words"] = all_words
+    raw_features["bbox"] = boxes
+    raw_features["dataset_type"] = dataset_type
+
+    if categories_dict_name_as_key:
+        raw_features["labels"] = all_labels
+    # pylint: enable=E1137
+    return raw_features
+
+
+def features_to_pt_tensors(features: LayoutLMFeatures) -> LayoutLMFeatures:
+    """
+    Converting list of floats to pytorch tensors
+    :param features: LayoutLMFeatures
+    :return: LayoutLMFeatures
+    """
+    features["bbox"] = torch.tensor(features["bbox"], dtype=torch.long)
+    if "labels" in features:
+        features["labels"] = torch.tensor(features["labels"], dtype=torch.long)
+    return features
+
+
+def raw_features_to_layoutlm_features(
+    raw_features: Union[RawLayoutLMFeatures, List[RawLayoutLMFeatures]],
+    tokenizer: "PreTrainedTokenizerFast",
+    padding: Literal["max_length", "do_not_pad", "longest"] = "max_length",
+    truncation: bool = True,
+    return_overflowing_tokens: bool = False,
+    return_tensors: Optional[Literal["pt"]] = None,
+    remove_columns_for_training: bool = False,
+) -> LayoutLMFeatures:
+    """
+    Mapping raw features to tokenized input sequences for LayoutLM models.
+
+    :param raw_features: A dictionary with the following arguments: `image_id, width, height, ann_ids, words,
+                         boxes, dataset_type`.
+    :param tokenizer: A fast tokenizer for the model. Note, that the conventional python based tokenizer provided by the
+                      Transformer library do not return essential word_id/token_id mappings making the feature
+                      generation a lot more difficult. We therefore do not allow these tokenizer.
+    :param padding: A padding strategy to be passed to the tokenizer. Must bei either `max_length, longest` or
+                    `do_not_pad`.
+    :param truncation: If "True" will truncate to a maximum length specified with the argument max_length or to the
+                       maximum acceptable input length for the model if that argument is not provided. This will
+                       truncate token by token, removing a token from the longest sequence in the pair if a pair of
+                       sequences (or a batch of pairs) is provided.
+                       If `False` then no truncation (i.e., can output batch with sequence lengths greater than the
+                       model maximum admissible input size).
+    :param return_overflowing_tokens: If a sequence (due to a truncation strategy) overflows the overflowing tokens can
+                                  be returned as an additional batch element. Not that in this case, the number of input
+                                  batch samples will be smaller than the output batch samples.
+    :param return_tensors: If `pt` will return torch Tensors. If no argument is provided that the batches will be lists
+                           of lists.
+    :param remove_columns_for_training: Will remove all superfluous columns that are not required for training.
+    :return: dictionary with the following arguments:  `image_ids, width, height, ann_ids, input_ids,
+             token_type_ids, attention_mask, bbox, labels`.
+    """
+
+    if isinstance(raw_features, dict):
+        raw_features = [raw_features]
+
+    _has_token_labels = (
+        raw_features[0]["dataset_type"] == names.DS.TYPE.TOK and raw_features[0].get("labels") is not None
+    )
+    _has_sequence_labels = (
+        raw_features[0]["dataset_type"] == names.DS.TYPE.SEQ and raw_features[0].get("labels") is not None
+    )
+    _has_labels = bool(_has_token_labels or _has_sequence_labels)
+
+    tokenized_inputs = tokenizer(
+        [dp["words"] for dp in raw_features],
+        padding=padding,
+        truncation=truncation,
+        return_overflowing_tokens=return_overflowing_tokens,
+        is_split_into_words=True,
+        return_tensors=return_tensors,
+    )
+
+    image_ids = []
+    widths = []
+    heights = []
+
+    token_boxes = []
+    token_labels = []
+    sequence_labels = []
+    token_ann_ids = []
+    tokens = []
+    for batch_index in range(len(tokenized_inputs["input_ids"])):
+        batch_index_orig = batch_index
+        if return_overflowing_tokens:
+            # we might get more batches when we allow to get returned overflowing tokens
+            batch_index_orig = tokenized_inputs["overflow_to_sample_mapping"][batch_index]
+
+        image_ids.append(raw_features[batch_index_orig]["image_id"])
+        widths.append(raw_features[batch_index_orig]["width"])
+        heights.append(raw_features[batch_index_orig]["height"])
+
+        ann_ids = raw_features[batch_index_orig]["ann_ids"]
+        boxes = raw_features[batch_index_orig]["bbox"]
+        if _has_token_labels:
+            labels = raw_features[batch_index_orig]["labels"]
+        word_ids = tokenized_inputs.word_ids(batch_index=batch_index)
+        token_batch = tokenized_inputs.tokens(batch_index=batch_index)
+
+        token_batch_ann_ids = []
+        token_batch_boxes = []
+        token_batch_labels = []
+        for idx, word_id in enumerate(word_ids):
+            # Special tokens have a word id that is None. We make a lookup for the specific token and append a dummy
+            # bounding box accordingly
+            if word_id is None:
+                if token_batch[idx] == "[CLS]":
+                    token_batch_boxes.append(_CLS_BOX)
+                    token_batch_ann_ids.append("[CLS]")
+                elif token_batch[idx] in ("[SEP]", "[PAD]"):
+                    token_batch_boxes.append(_SEP_BOX)
+                    if token_batch[idx] == "[SEP]":
+                        token_batch_ann_ids.append("[SEP]")
+                    else:
+                        token_batch_ann_ids.append("[PAD]")
+                else:
+                    raise ValueError(f"Special token {token_batch[idx]} not allowed")
+                if _has_token_labels:
+                    token_batch_labels.append(-100)
+            else:
+                token_batch_boxes.append(boxes[word_id])
+                token_batch_ann_ids.append(ann_ids[word_id])
+                if _has_token_labels:
+                    token_batch_labels.append(labels[word_id])
+
+        token_labels.append(token_batch_labels)
+        token_boxes.append(token_batch_boxes)
+        token_ann_ids.append(token_batch_ann_ids)
+        tokens.append(token_batch)
+        if _has_sequence_labels:
+            sequence_labels.append(raw_features[batch_index_orig]["labels"][0])
+
+    input_dict = {
+        "image_ids": image_ids,
+        "width": widths,
+        "height": heights,
+        "ann_ids": token_ann_ids,
+        "input_ids": tokenized_inputs["input_ids"],
+        "token_type_ids": tokenized_inputs["token_type_ids"],
+        "attention_mask": tokenized_inputs["attention_mask"],
+        "bbox": token_boxes,
+        "tokens": tokens,
+    }
+
+    if _has_labels:
+        input_dict["labels"] = token_labels if _has_token_labels else sequence_labels
+
+    if remove_columns_for_training:
+        input_dict.pop("image_ids")
+        input_dict.pop("width")
+        input_dict.pop("height")
+        input_dict.pop("ann_ids")
+        input_dict.pop("tokens")
+
+    if return_tensors == "pt":
+        return features_to_pt_tensors(LayoutLMFeatures(input_dict))
+    return LayoutLMFeatures(input_dict)
+
+
+@dataclass
+class LayoutLMDataCollator:
+    """
+    Data collator that will dynamically tokenize, pad and truncate the inputs received.
+
+    :param tokenizer: A fast tokenizer for the model. Note, that the conventional python based tokenizer provided by the
+                      Transformer library do not return essential word_id/token_id mappings making the feature
+                      generation a lot more difficult. We therefore do not allow these tokenizer.
+    :param padding: A padding strategy to be passed to the tokenizer. Must bei either `max_length, longest` or
+                    `do_not_pad`.
+    :param truncation: If "True" will truncate to a maximum length specified with the argument max_length or to the
+                       maximum acceptable input length for the model if that argument is not provided. This will
+                       truncate token by token, removing a token from the longest sequence in the pair if a pair of
+                       sequences (or a batch of pairs) is provided.
+                       If `False` then no truncation (i.e., can output batch with sequence lengths greater than the
+                       model maximum admissible input size).
+    :param return_overflowing_tokens: If a sequence (due to a truncation strategy) overflows the overflowing tokens can
+                                  be returned as an additional batch element. Not that in this case, the number of input
+                                  batch samples will be smaller than the output batch samples.
+    :param return_tensors: If `pt` will return torch Tensors. If no argument is provided that the batches will be lists
+                           of lists.
+
+    :return: dictionary with the following arguments:  `image_ids, width, height, ann_ids, input_ids,
+             token_type_ids, attention_masks, boxes, labels`.
+    """
+
+    tokenizer: "PreTrainedTokenizerFast"
+    padding: Literal["max_length", "do_not_pad", "longest"] = field(default="max_length")
+    truncation: bool = field(default=True)
+    return_overflowing_tokens: bool = field(default=False)
+    return_tensors: Optional[Literal["pt"]] = field(default=None)
+
+    def __post_init__(self) -> None:
+        assert isinstance(self.tokenizer, PreTrainedTokenizerFast), "Tokenizer must be a fast tokenizer"
+        if self.return_tensors:
+            assert self.padding not in ("do_not_pad",)
+            assert self.truncation
+        if self.return_overflowing_tokens:
+            assert self.truncation
+
+    def __call__(self, raw_features: Union[RawLayoutLMFeatures, List[RawLayoutLMFeatures]]) -> LayoutLMFeatures:
+        """
+        Calling the DataCollator to form model inputs for training and inference. Takes a single raw
+        :param raw_features: A dictionary with the following arguments: `image_id, width, height, ann_ids, words,
+                             boxes, dataset_type`.
+        :return: LayoutLMFeatures
+        """
+        return raw_features_to_layoutlm_features(
+            raw_features,
+            self.tokenizer,
+            self.padding,
+            self.truncation,
+            self.return_overflowing_tokens,
+            self.return_tensors,
+            True,
+        )
+
+
+@curry
+def image_to_layoutlm_features(
+    dp: Image,
+    tokenizer: "PreTrainedTokenizerFast",
+    return_tensors: Optional[Literal["pt"]] = None,
+    input_width: int = 1000,
+    input_height: int = 1000,
+) -> Optional[LayoutLMFeatures]:
+    """
+    Mapping function to generate layoutlm features from `Image` to be used for inference in a pipeline component.
+    :class:`LanguageModelPipelineComponent` has a positional argument `mapping_to_lm_input_func` that must be chosen
+    with respect to the language model chosen. This mapper is devoted to generating features for LayoutLM.
+
+    .. code-block:: python
+
+            tokenizer = LayoutLMTokenizer.from_pretrained("mrm8488/layoutlm-finetuned-funsd")
+            layoutlm = HFLayoutLmTokenClassifier("path/to/config.json","path/to/model.bin",
+                                                  categories_explicit= ['B-ANSWER', 'B-QUESTION', 'O'])
+
+            layoutlm_service = LMTokenClassifierService(tokenizer,layoutlm, image_to_layoutlm_features)
+
+
+    :param dp: Image datapoint
+    :param tokenizer: Tokenizer compatible with the language model
+    :param return_tensors: Output tensor features. Either 'pt' for PyTorch models or None, if features should be
+                           returned in list objects.
+    :param input_width: Standard input size for image coordinates. All LayoutLM models require input features to be
+                        normalized to an image width equal to 1000.
+    :param input_height: Standard input size for image coordinates. All LayoutLM models require input features to be
+                         normalized to an image height equal to 1000.
+    :return: A dict of layoutlm features
+    """
+    raw_features = image_to_raw_layoutlm_features(None, None, input_width, input_height)(dp)
+    if raw_features is None:
+        return None
+    features = raw_features_to_layoutlm_features(raw_features, tokenizer, return_tensors=return_tensors)
+    return features
diff --git a/deepdoctection/mapper/misc.py b/deepdoctection/mapper/misc.py
index ce5c8dde..3727d640 100644
--- a/deepdoctection/mapper/misc.py
+++ b/deepdoctection/mapper/misc.py
@@ -144,7 +144,7 @@ def image_ann_to_image(dp: Image, category_names: Union[str, List[str]], crop_im
 
 @curry
 def maybe_ann_to_sub_image(
-    dp: Image, category_names_sub_image: Union[str, List[str]], category_names: Union[str, List[str]]
+    dp: Image, category_names_sub_image: Union[str, List[str]], category_names: Union[str, List[str]], add_summary: bool
 ) -> Image:
     """
     Assigns to sub image with given category names all annotations with given category names whose bounding box lie
@@ -154,12 +154,15 @@ def maybe_ann_to_sub_image(
     :param category_names_sub_image: A single or a list of category names that will form a sub image.
     :param category_names: A single or a list of category names that will may be assigned to a sub image, conditioned
                            on the bounding box lying within the sub image.
+    :param add_summary: will add the whole summary annotation to the sub image
     :return: Image
     """
 
     anns = dp.get_annotation(category_names=category_names_sub_image)
     for ann in anns:
         dp.maybe_ann_to_sub_image(annotation_id=ann.annotation_id, category_names=category_names)
+        if add_summary and ann.image:
+            ann.image.summary = dp.summary
 
     return dp
 
diff --git a/deepdoctection/mapper/pubstruct.py b/deepdoctection/mapper/pubstruct.py
index 5330152e..e9ff288b 100644
--- a/deepdoctection/mapper/pubstruct.py
+++ b/deepdoctection/mapper/pubstruct.py
@@ -20,8 +20,7 @@
 """
 import itertools
 import os
-
-from typing import Dict, List, Optional, Sequence, Tuple, Iterable
+from typing import Dict, Iterable, List, Optional, Sequence, Tuple
 
 import numpy as np
 
@@ -34,7 +33,6 @@
 from ..utils.settings import names
 from .maputils import MappingContextManager, curry, maybe_get_fake_score
 
-
 __all__ = ["pub_to_image"]
 
 
diff --git a/deepdoctection/pipe/__init__.py b/deepdoctection/pipe/__init__.py
index ebee9453..5526814e 100644
--- a/deepdoctection/pipe/__init__.py
+++ b/deepdoctection/pipe/__init__.py
@@ -28,8 +28,8 @@
 from .doctectionpipe import *
 from .language import *
 from .layout import *
+from .lm import *
 from .refine import *
 from .registry import *
 from .segment import *
 from .text import *
-from .tokenclass import *
diff --git a/deepdoctection/pipe/anngen.py b/deepdoctection/pipe/anngen.py
index 88cdd364..ad0ce1d6 100644
--- a/deepdoctection/pipe/anngen.py
+++ b/deepdoctection/pipe/anngen.py
@@ -216,6 +216,7 @@ def set_container_annotation(
 
     def set_summary_annotation(
         self,
+        summary_key: str,
         summary_name: str,
         summary_number: int,
         summary_value: Optional[str] = None,
@@ -225,8 +226,8 @@ def set_summary_annotation(
         """
         Creates a sub category of a summary annotation. If a summary of the given annotation_id does not exist, it will
         create a new one.
-        :param summary_name: will create the summary name as category name and store the generated annotation under the
-        same key name
+        :param summary_key: will store the category annotation as sub category
+        :param summary_name: will create the summary name as category name
         :param summary_number: will store the value in category_id.
         :param summary_value: will create a ContainerAnnotation and store the corresponding value
         :param summary_score: will store the score
@@ -251,5 +252,5 @@ def set_summary_annotation(
             )
         else:
             ann = CategoryAnnotation(category_name=summary_name, category_id=str(summary_number), score=summary_score)
-        image.summary.dump_sub_category(summary_name, ann, image.image_id)
+        image.summary.dump_sub_category(summary_key, ann, image.image_id)
         return ann.annotation_id
diff --git a/deepdoctection/pipe/base.py b/deepdoctection/pipe/base.py
index ed462cda..e4f577fa 100644
--- a/deepdoctection/pipe/base.py
+++ b/deepdoctection/pipe/base.py
@@ -22,11 +22,12 @@
 from abc import ABC, abstractmethod
 from collections import defaultdict
 from copy import copy, deepcopy
-from typing import Any, Callable, Dict, List, Mapping, Optional, Union, DefaultDict, Set
+from typing import Any, Callable, DefaultDict, Dict, List, Mapping, Optional, Set, Union
 
 from ..dataflow import DataFlow, MapData
 from ..datapoint.image import Image
-from ..extern.base import LMTokenClassifier, ObjectDetector, PdfMiner, TextRecognizer
+from ..extern.base import ObjectDetector, PdfMiner, TextRecognizer
+from ..mapper.laylmstruct import LayoutLMFeatures
 from ..utils.context import timed_operation
 from ..utils.detection_types import JsonDict
 from .anngen import DatapointManager
@@ -163,21 +164,19 @@ class LanguageModelPipelineComponent(PipelineComponent, ABC):
     def __init__(
         self,
         tokenizer: Any,
-        language_model: LMTokenClassifier,
-        mapping_to_lm_input_func: Callable[..., Callable[[Image], Dict[str, Any]]],
+        mapping_to_lm_input_func: Callable[..., Callable[[Image], Optional[LayoutLMFeatures]]],
     ):
         """
-        :param tokenizer: Token classifier, typing allows currently anything. This will be changed in the future
-        :param language_model: Language model for token classification
+        :param tokenizer: Tokenizer, typing allows currently anything. This will be changed in the future
+        :param mapping_to_lm_input_func: Function mapping image to layout language model features
         """
 
         self.tokenizer = tokenizer
-        self.language_model = language_model
         self.mapping_to_lm_input_func = mapping_to_lm_input_func
         super().__init__(None)
 
     def clone(self) -> "LanguageModelPipelineComponent":
-        return self.__class__(copy(self.tokenizer), copy(self.language_model), copy(self.mapping_to_lm_input_func))
+        return self.__class__(copy(self.tokenizer), copy(self.mapping_to_lm_input_func))
 
 
 class Pipeline(ABC):
@@ -258,11 +257,11 @@ def get_meta_annotation(self) -> JsonDict:
         """
         Collects meta annotations from all pipeline components and summarizes the returned results
 
-        :return: Meta annotations with informations about image annotations (list), sub categories (dict with category
+        :return: Meta annotations with information about image annotations (list), sub categories (dict with category
                  names and generated sub categories), relationships (dict with category names and generated
                  relationships) as well as summaries (list with sub categories)
         """
-        pipeline_populations: Dict[str,Union[List[str],DefaultDict[str,Set[str]]]] = {
+        pipeline_populations: Dict[str, Union[List[str], DefaultDict[str, Set[str]]]] = {
             "image_annotations": [],
             "sub_categories": defaultdict(set),
             "relationships": defaultdict(set),
diff --git a/deepdoctection/pipe/cell.py b/deepdoctection/pipe/cell.py
index e790a900..bc55606e 100644
--- a/deepdoctection/pipe/cell.py
+++ b/deepdoctection/pipe/cell.py
@@ -202,7 +202,7 @@ def has_dummy_generator(self) -> bool:
         return True
 
     def get_meta_annotation(self) -> JsonDict:
-        assert isinstance(self.predictor,(ObjectDetector, PdfMiner))
+        assert isinstance(self.predictor, (ObjectDetector, PdfMiner))
         return dict(
             [
                 ("image_annotations", self.predictor.possible_categories()),
diff --git a/deepdoctection/pipe/concurrency.py b/deepdoctection/pipe/concurrency.py
index de93734f..c7756115 100644
--- a/deepdoctection/pipe/concurrency.py
+++ b/deepdoctection/pipe/concurrency.py
@@ -30,7 +30,7 @@
 from ..dataflow import DataFlow
 from ..datapoint.image import Image
 from ..utils.tqdm import get_tqdm
-from .base import PipelineComponent, PredictorPipelineComponent
+from .base import LanguageModelPipelineComponent, PipelineComponent, PredictorPipelineComponent
 
 if TYPE_CHECKING:
     QueueType = queue.Queue[Image]  # pylint: disable=E1136
@@ -71,7 +71,7 @@ class MultiThreadPipelineComponent:
 
     def __init__(
         self,
-        pipeline_components: Sequence[PredictorPipelineComponent],
+        pipeline_components: Sequence[Union[PredictorPipelineComponent, LanguageModelPipelineComponent]],
         pre_proc_func: Optional[Callable[[Image], Image]] = None,
         post_proc_func: Optional[Callable[[Image], Image]] = None,
         max_datapoints: Optional[int] = None,
diff --git a/deepdoctection/pipe/language.py b/deepdoctection/pipe/language.py
index 21287574..d833ad30 100644
--- a/deepdoctection/pipe/language.py
+++ b/deepdoctection/pipe/language.py
@@ -95,7 +95,9 @@ def serve(self, dp: Image) -> None:
             # this is a concatenation of all detection result. No reading order
             text = " ".join([result.text for result in detect_result_list if result.text is not None])
         predict_result = self.predictor.predict(text)
-        self.dp_manager.set_summary_annotation(names.NLP.LANG.LANG, 1, predict_result.text, predict_result.score)
+        self.dp_manager.set_summary_annotation(
+            names.NLP.LANG.LANG, names.NLP.LANG.LANG, 1, predict_result.text, predict_result.score
+        )
 
     def _init_sanity_checks(self) -> None:
         assert (
diff --git a/deepdoctection/pipe/layout.py b/deepdoctection/pipe/layout.py
index 814ad493..5a7740d9 100644
--- a/deepdoctection/pipe/layout.py
+++ b/deepdoctection/pipe/layout.py
@@ -73,7 +73,7 @@ def serve(self, dp: Image) -> None:
             self.dp_manager.set_image_annotation(detect_result, to_image=self.to_image, crop_image=self.crop_image)
 
     def get_meta_annotation(self) -> JsonDict:
-        assert isinstance(self.predictor,(ObjectDetector, PdfMiner))
+        assert isinstance(self.predictor, (ObjectDetector, PdfMiner))
         return dict(
             [
                 ("image_annotations", self.predictor.possible_categories()),
diff --git a/deepdoctection/pipe/lm.py b/deepdoctection/pipe/lm.py
new file mode 100644
index 00000000..f9a87419
--- /dev/null
+++ b/deepdoctection/pipe/lm.py
@@ -0,0 +1,174 @@
+# -*- coding: utf-8 -*-
+# File: tokenclass.py
+
+# Copyright 2021 Dr. Janis Meyer. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Module for token classification pipeline
+"""
+from typing import Any, Callable, List, Optional
+
+from ..datapoint.image import Image
+from ..extern.base import LMSequenceClassifier, LMTokenClassifier
+from ..mapper.laylmstruct import LayoutLMFeatures
+from ..utils.detection_types import JsonDict
+from ..utils.settings import names
+from .base import LanguageModelPipelineComponent
+from .registry import pipeline_component_registry
+
+
+@pipeline_component_registry.register("LMTokenClassifierService")
+class LMTokenClassifierService(LanguageModelPipelineComponent):
+    """
+    Pipeline component for token classification
+
+    **Example**
+
+        .. code-block:: python
+
+            # setting up compulsory ocr service
+            tesseract_config_path = ModelCatalog.get_full_path_configs("/dd/conf_tesseract.yaml")
+            tess = TesseractOcrDetector(tesseract_config_path)
+            ocr_service = TextExtractionService(tess)
+
+            # hf tokenizer and token classifier
+            tokenizer = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
+            layoutlm = HFLayoutLmTokenClassifier(categories= ['B-ANSWER', 'B-HEAD', 'B-QUESTION', 'E-ANSWER',
+                                                               'E-HEAD', 'E-QUESTION', 'I-ANSWER', 'I-HEAD',
+                                                               'I-QUESTION', 'O', 'S-ANSWER', 'S-HEAD', 'S-QUESTION'])
+
+            # token classification service
+            layoutlm_service = LMTokenClassifierService(tokenizer,layoutlm,image_to_layoutlm)
+
+            pipe = DoctectionPipe(pipeline_component_list=[ocr_service,layoutlm_service])
+
+            path = "path/to/some/form"
+            df = pipe.analyze(path=path)
+
+            for dp in df:
+                ...
+    """
+
+    def __init__(
+        self,
+        tokenizer: Any,
+        language_model: LMTokenClassifier,
+        mapping_to_lm_input_func: Callable[..., Callable[[Image], Optional[LayoutLMFeatures]]],
+    ) -> None:
+        """
+        :param tokenizer: Token classifier, typing allows currently anything. This will be changed in the future
+        :param language_model: language model token classifier
+        :param mapping_to_lm_input_func: Function mapping image to layout language model features
+        """
+        self.language_model = language_model
+        super().__init__(tokenizer, mapping_to_lm_input_func)
+
+    def serve(self, dp: Image) -> None:
+        lm_input = self.mapping_to_lm_input_func(tokenizer=self.tokenizer)(dp)
+        if lm_input is None:
+            return
+        lm_output = self.language_model.predict(**lm_input)
+
+        # turn to word level predictions
+        lm_output = [
+            token
+            for token in lm_output
+            if token.token_id
+            not in [self.tokenizer.cls_token_id, self.tokenizer.sep_token_id, self.tokenizer.pad_token_id]
+            and not token.token.startswith("##")
+        ]
+
+        words_populated: List[str] = []
+        for token in lm_output:
+            if token.uuid not in words_populated:
+                self.dp_manager.set_category_annotation(token.semantic_name, None, names.C.SE, token.uuid)
+                self.dp_manager.set_category_annotation(token.bio_tag, None, names.NER.TAG, token.uuid)
+                words_populated.append(token.uuid)
+
+    def get_meta_annotation(self) -> JsonDict:
+        return dict(
+            [
+                ("image_annotations", []),
+                ("sub_categories", {names.C.WORD: {names.C.SE, names.NER.TAG}}),
+                ("relationships", {}),
+                ("summaries", []),
+            ]
+        )
+
+
+@pipeline_component_registry.register("LMSequenceClassifierService")
+class LMSequenceClassifierService(LanguageModelPipelineComponent):
+    """
+    Pipeline component for sequence classification
+
+    **Example**
+
+        .. code-block:: python
+
+            # setting up compulsory ocr service
+            tesseract_config_path = ModelCatalog.get_full_path_configs("/dd/conf_tesseract.yaml")
+            tess = TesseractOcrDetector(tesseract_config_path)
+            ocr_service = TextExtractionService(tess)
+
+            # hf tokenizer and token classifier
+            tokenizer = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
+            layoutlm = HFLayoutLmSequenceClassifier("path/to/config.json","path/to/model.bin",
+                                                     categories=["HANDWRITTEN", "PRESENTATION", "RESUME"])
+
+            # token classification service
+            layoutlm_service = LMSequenceClassifierService(tokenizer,layoutlm, image_to_layoutlm_features)
+
+            pipe = DoctectionPipe(pipeline_component_list=[ocr_service,layoutlm_service])
+
+            path = "path/to/some/form"
+            df = pipe.analyze(path=path)
+
+            for dp in df:
+                ...
+
+    """
+
+    def __init__(
+        self,
+        tokenizer: Any,
+        language_model: LMSequenceClassifier,
+        mapping_to_lm_input_func: Callable[..., Callable[[Image], Optional[LayoutLMFeatures]]],
+    ) -> None:
+        """
+        :param tokenizer: Tokenizer, typing allows currently anything. This will be changed in the future
+        :param language_model: language model sequence classifier
+        :param mapping_to_lm_input_func: Function mapping image to layout language model features
+        """
+        self.language_model = language_model
+        super().__init__(tokenizer, mapping_to_lm_input_func)
+
+    def serve(self, dp: Image) -> None:
+        lm_input = self.mapping_to_lm_input_func(tokenizer=self.tokenizer, return_tensors="pt")(dp)
+        if lm_input is None:
+            return
+        lm_output = self.language_model.predict(**lm_input)
+        self.dp_manager.set_summary_annotation(
+            names.C.DOC, lm_output.class_name, lm_output.class_id, None, lm_output.score
+        )
+
+    def get_meta_annotation(self) -> JsonDict:
+        return dict(
+            [
+                ("image_annotations", []),
+                ("sub_categories", {}),
+                ("relationships", {}),
+                ("summaries", [names.C.DOC]),
+            ]
+        )
diff --git a/deepdoctection/pipe/refine.py b/deepdoctection/pipe/refine.py
index 406b6c4b..706e78d7 100644
--- a/deepdoctection/pipe/refine.py
+++ b/deepdoctection/pipe/refine.py
@@ -426,10 +426,18 @@ def serve(self, dp: Image) -> None:
             max_row_span = max([int(cell.get_sub_category(names.C.RS).category_id) for cell in cells])
             max_col_span = max([int(cell.get_sub_category(names.C.CS).category_id) for cell in cells])
             # TODO: the summaries should be sub categories of the underlying ann
-            self.dp_manager.set_summary_annotation(names.C.NR, number_of_rows, annotation_id=table.annotation_id)
-            self.dp_manager.set_summary_annotation(names.C.NC, number_of_cols, annotation_id=table.annotation_id)
-            self.dp_manager.set_summary_annotation(names.C.NRS, max_row_span, annotation_id=table.annotation_id)
-            self.dp_manager.set_summary_annotation(names.C.NCS, max_col_span, annotation_id=table.annotation_id)
+            self.dp_manager.set_summary_annotation(
+                names.C.NR, names.C.NR, number_of_rows, annotation_id=table.annotation_id
+            )
+            self.dp_manager.set_summary_annotation(
+                names.C.NC, names.C.NC, number_of_cols, annotation_id=table.annotation_id
+            )
+            self.dp_manager.set_summary_annotation(
+                names.C.NRS, names.C.NRS, max_row_span, annotation_id=table.annotation_id
+            )
+            self.dp_manager.set_summary_annotation(
+                names.C.NCS, names.C.NCS, max_col_span, annotation_id=table.annotation_id
+            )
             html = generate_html_string(table)
             self.dp_manager.set_container_annotation(names.C.HTAB, -1, names.C.HTAB, table.annotation_id, html)
 
diff --git a/deepdoctection/pipe/text.py b/deepdoctection/pipe/text.py
index 4afb50b8..0ab86f23 100644
--- a/deepdoctection/pipe/text.py
+++ b/deepdoctection/pipe/text.py
@@ -164,7 +164,7 @@ def get_meta_annotation(self) -> JsonDict:
         if self.extract_from_category:
             sub_cat_dict = {category: {names.C.CHARS} for category in self.extract_from_category}
         else:
-            assert isinstance(self.predictor,(ObjectDetector, PdfMiner))
+            assert isinstance(self.predictor, (ObjectDetector, PdfMiner))
             sub_cat_dict = {category: {names.C.CHARS} for category in self.predictor.possible_categories()}
         return dict(
             [
diff --git a/deepdoctection/pipe/tokenclass.py b/deepdoctection/pipe/tokenclass.py
deleted file mode 100644
index 293b63fc..00000000
--- a/deepdoctection/pipe/tokenclass.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-# File: tokenclass.py
-
-# Copyright 2021 Dr. Janis Meyer. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""
-Module for token classification pipeline
-"""
-from typing import List
-
-from ..datapoint.image import Image
-from ..utils.detection_types import JsonDict
-from ..utils.settings import names
-from .base import LanguageModelPipelineComponent
-from .registry import pipeline_component_registry
-
-
-@pipeline_component_registry.register("LMTokenClassifierService")
-class LMTokenClassifierService(LanguageModelPipelineComponent):
-    """
-    Pipeline component for token classification
-
-    **Example**
-
-        .. code-block:: python
-
-            # setting up compulsory ocr service
-            tesseract_config_path = ModelCatalog.get_full_path_configs("/dd/conf_tesseract.yaml")
-            tess = TesseractOcrDetector(tesseract_config_path)
-            ocr_service = TextExtractionService(tess)
-
-            # hf tokenizer and token classifier
-            tokenizer = LayoutLMTokenizer.from_pretrained("mrm8488/layoutlm-finetuned-funsd")
-            layoutlm = HFLayoutLmTokenClassifier(categories_explicit= ['B-ANSWER', 'B-HEAD', 'B-QUESTION', 'E-ANSWER',
-                                                               'E-HEAD', 'E-QUESTION', 'I-ANSWER', 'I-HEAD',
-                                                               'I-QUESTION', 'O', 'S-ANSWER', 'S-HEAD', 'S-QUESTION'])
-
-            # token classification service
-            layoutlm_service = LMTokenClassifierService(tokenizer,layoutlm,image_to_layoutlm)
-
-            pipe = DoctectionPipe(pipeline_component_list=[ocr_service,layoutlm_service])
-
-            path = "path/to/some/form"
-            df = pipe.analyze(path=path)
-
-            for dp in df:
-                ...
-    """
-
-    def serve(self, dp: Image) -> None:
-        image_to_lm_input = self.mapping_to_lm_input_func(tokenizer=self.tokenizer)
-        lm_input = image_to_lm_input(dp)
-        lm_output = self.language_model.predict(**lm_input)
-
-        # turn to word level predictions
-        lm_output = [
-            token
-            for token in lm_output
-            if token.token_id
-            not in [self.tokenizer.cls_token_id, self.tokenizer.sep_token_id, self.tokenizer.pad_token_id]
-            and not token.token.startswith("##")
-        ]
-
-        words_populated: List[str] = []
-        for token in lm_output:
-            if token.uuid not in words_populated:
-                self.dp_manager.set_category_annotation(token.semantic_name, None, names.C.SE, token.uuid)
-                self.dp_manager.set_category_annotation(token.bio_tag, None, names.NER.TAG, token.uuid)
-                words_populated.append(token.uuid)
-
-    def get_meta_annotation(self) -> JsonDict:
-        return dict(
-            [
-                ("image_annotations", []),
-                ("sub_categories", {names.C.WORD: {names.C.SE, names.NER.TAG}}),
-                ("relationships", {}),
-                ("summaries", []),
-            ]
-        )
diff --git a/deepdoctection/train/d2_frcnn_train.py b/deepdoctection/train/d2_frcnn_train.py
index 06b7c6a6..92798b60 100644
--- a/deepdoctection/train/d2_frcnn_train.py
+++ b/deepdoctection/train/d2_frcnn_train.py
@@ -93,15 +93,17 @@ def setup_evaluator(
         self, dataset_val: DatasetBase, pipeline_component: PredictorPipelineComponent, metric: Type[MetricBase]
     ) -> None:
         """
-        Setup of evaluator before starting training. While training, predictors will be replaced by current checkpoints.
+        Setup of evaluator before starting training. During training, predictors will be replaced by current
+        checkpoints.
 
-        :param dataset_val: dataset to run evaluation from
+        :param dataset_val: dataset on which to run evaluation
         :param pipeline_component: pipeline component to plug into the evaluator
         :param metric: A metric class
         """
         self.evaluator = Evaluator(dataset_val, pipeline_component, metric, num_threads=get_num_gpu() * 2)
         assert self.evaluator.pipe_component
         for comp in self.evaluator.pipe_component.pipe_components:
+            assert isinstance(comp, PredictorPipelineComponent)
             assert isinstance(comp.predictor, D2FrcnnDetector)
             comp.predictor.d2_predictor = None
 
@@ -165,11 +167,11 @@ def train_d2_faster_rcnn(
     :param log_dir: Path to log dir. Will default to `train_log/frcnn`
     :param build_train_config: dataflow build setting. Again, use list convention setting, e.g. ['max_datapoints=1000']
     :param dataset_val: the dataset to use for validation.
-    :param build_val_config: same as 'build_train_config' but for validation
+    :param build_val_config: same as `build_train_config` but for validation
     :param metric_name: A metric name to choose for validation. Will use the default setting. If you want a custom
                         metric setting pass a metric explicitly.
     :param metric: A metric to choose for validation.
-    :param pipeline_component_name: A pipeline component to use for validation.
+    :param pipeline_component_name: A pipeline component name to use for validation.
     """
 
     assert get_num_gpu() > 0, "Has to train with GPU!"
@@ -225,7 +227,8 @@ def train_d2_faster_rcnn(
         trainer.register_hooks(
             [
                 EvalHook(
-                    cfg.TEST.EVAL_PERIOD,lambda: trainer.eval_with_dd_evaluator(**build_val_dict),
+                    cfg.TEST.EVAL_PERIOD,
+                    lambda: trainer.eval_with_dd_evaluator(**build_val_dict),  # pylint: disable=W0108
                 )
             ]
         )
diff --git a/deepdoctection/train/hf_layoutlm_train.py b/deepdoctection/train/hf_layoutlm_train.py
new file mode 100644
index 00000000..29f32140
--- /dev/null
+++ b/deepdoctection/train/hf_layoutlm_train.py
@@ -0,0 +1,284 @@
+# -*- coding: utf-8 -*-
+# File: hf_layoutlm_train.py
+
+# Copyright 2021 Dr. Janis Meyer. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Module for training Huggingface implementation of LayoutLm
+"""
+
+import copy
+import json
+from typing import Any, Dict, List, Optional, Sequence, Tuple, Type, Union
+
+from torch.nn import Module
+from torch.utils.data import Dataset
+from transformers import (
+    IntervalStrategy,
+    LayoutLMForSequenceClassification,
+    LayoutLMForTokenClassification,
+    LayoutLMTokenizerFast,
+    PretrainedConfig,
+    PreTrainedModel,
+)
+from transformers.trainer import Trainer, TrainingArguments
+
+from ..datasets.adapter import DatasetAdapter
+from ..datasets.base import DatasetBase
+from ..datasets.registry import get_dataset
+from ..eval.base import MetricBase
+from ..eval.eval import Evaluator
+from ..extern.hflayoutlm import HFLayoutLmSequenceClassifier, HFLayoutLmTokenClassifier
+from ..mapper.laylmstruct import LayoutLMDataCollator, image_to_layoutlm_features, image_to_raw_layoutlm_features
+from ..pipe.base import LanguageModelPipelineComponent
+from ..pipe.registry import pipeline_component_registry
+from ..utils.settings import names
+from ..utils.utils import string_to_dict
+
+_ARCHITECTURES_TO_MODEL_CLASS = {
+    "LayoutLMForTokenClassification": LayoutLMForTokenClassification,
+    "LayoutLMForSequenceClassification": LayoutLMForSequenceClassification,
+}
+_MODEL_TYPE_AND_TASK_TO_MODEL_CLASS = {
+    ("layoutlm", names.DS.TYPE.SEQ): LayoutLMForSequenceClassification,
+    ("layoutlm", names.DS.TYPE.TOK): LayoutLMForTokenClassification,
+}
+_MODEL_TYPE_TO_TOKENIZER = {"layoutlm": LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")}
+_DS_TYPE_TO_DD_LM_CLASS = {
+    names.DS.TYPE.TOK: HFLayoutLmTokenClassifier,
+    names.DS.TYPE.SEQ: HFLayoutLmSequenceClassifier,
+}
+
+
+class LayoutLMTrainer(Trainer):
+    """
+    Huggingface Trainer for training Transformer models with a custom evaluate method in order
+    to use dd Evaluator. Train setting is not defined in the trainer itself but in config setting as
+    defined in `TrainingArguments`. Please check the Transformer documentation
+
+    https://huggingface.co/docs/transformers/main_classes/trainer
+
+    for custom training setting.
+    """
+
+    def __init__(
+        self,
+        model: Union[PreTrainedModel, Module],
+        args: TrainingArguments,
+        data_collator: LayoutLMDataCollator,
+        train_dataset: Dataset[Any],
+    ):
+        self.evaluator: Optional[Evaluator] = None
+        self.build_eval_kwargs: Optional[Dict[str, Any]] = None
+        super().__init__(model, args, data_collator, train_dataset)
+
+    def setup_evaluator(
+        self,
+        dataset_val: DatasetBase,
+        pipeline_component: LanguageModelPipelineComponent,
+        metric: Type[MetricBase],
+        **build_eval_kwargs: Union[str, int],
+    ) -> None:
+        """
+        Setup of evaluator before starting training. During training, predictors will be replaced by current
+        checkpoints.
+
+        :param dataset_val: dataset on which to run evaluation
+        :param pipeline_component: pipeline component to plug into the evaluator
+        :param metric: A metric class
+        :param build_eval_kwargs:
+        """
+
+        self.evaluator = Evaluator(dataset_val, pipeline_component, metric, num_threads=2)
+        assert self.evaluator.pipe_component
+        for comp in self.evaluator.pipe_component.pipe_components:
+            comp.language_model.model = None  # type: ignore
+        self.build_eval_kwargs = build_eval_kwargs
+
+    def evaluate(
+        self,
+        eval_dataset: Optional[Dataset[Any]] = None,
+        ignore_keys: Optional[List[str]] = None,
+        metric_key_prefix: str = "eval",
+    ) -> Dict[str, float]:
+        """
+        Overwritten method from :class:`Trainer`. Arguments will not be used.
+        """
+        assert self.evaluator is not None
+        assert self.evaluator.pipe_component is not None
+
+        # memory metrics - must set up as early as possible
+        self._memory_tracker.start()
+        for comp in self.evaluator.pipe_component.pipe_components:
+            comp.language_model.model = copy.deepcopy(self.model).eval()  # type: ignore
+        if isinstance(self.build_eval_kwargs, dict):
+            scores = self.evaluator.run(True, **self.build_eval_kwargs)
+        else:
+            scores = self.evaluator.run(True)
+
+        self.log(scores)
+
+        return scores
+
+
+def _get_model_class_and_tokenizer(path_config_json: str, dataset_type: str) -> Tuple[Any, Any]:
+    with open(path_config_json, "r", encoding="UTF-8") as file:
+        config_json = json.load(file)
+
+    model_type = config_json["model_type"]
+
+    if architectures := config_json.get("architectures"):
+        model_cls = _ARCHITECTURES_TO_MODEL_CLASS.get(architectures[0])
+    elif model_type:
+        model_cls = _MODEL_TYPE_AND_TASK_TO_MODEL_CLASS.get((model_type, dataset_type))
+    else:
+        raise KeyError("model_type and architectures not available in configs")
+
+    if not model_cls:
+        raise ValueError("model not eligible to run with this framework")
+
+    tokenizer_fast = _MODEL_TYPE_TO_TOKENIZER[model_type]
+
+    return model_cls, tokenizer_fast
+
+
+def train_hf_layoutlm(
+    path_config_json: str,
+    dataset_train: Union[str, DatasetBase],
+    path_weights: str,
+    config_overwrite: Optional[List[str]] = None,
+    log_dir: str = "train_log/layoutlm",
+    build_train_config: Optional[Sequence[str]] = None,
+    dataset_val: Optional[DatasetBase] = None,
+    build_val_config: Optional[Sequence[str]] = None,
+    metric: Optional[Type[MetricBase]] = None,
+    pipeline_component_name: Optional[str] = None,
+) -> None:
+    """
+    Script for fine-tuning LayoutLM models either for sequence classification (e.g. classifying documents) or token
+    classification using HF Trainer and custom evaluation. The theoretical foundation can be taken from
+
+    https://arxiv.org/abs/1912.13318
+
+    This is not the pre-training script.
+
+    In order to remain within the framework of this library, the basic LayoutLM model must be downloaded from the HF-hub
+    in a first step for fine-tuning. Two models are available for this, which are registered in the ModelCatalog:
+
+    "microsoft/layoutlm-base-uncased/pytorch_model.bin"
+
+     and
+
+     "microsoft/layoutlm-large-uncased/pytorch_model.bin"
+
+
+    .. code-block:: python
+
+        ModelDownloadManager.maybe_download_weights_and_configs("microsoft/layoutlm-base-uncased/pytorch_model.bin")
+
+    The corresponding cased models are currently not available, but this is only to keep the model selection small.
+
+    If the config file and weights have been downloaded, the model can be trained for the desired task.
+
+    How does the model selection work?
+
+    The base model is selected by the transferred config file and the weights. Depending on the dataset type
+    ("SEQUENCE_CLASSIFICATION" or "TOKEN_CLASSIFICATION"), the complete model is then put together by placing a suitable
+    top layer on the base model.
+
+    :param path_config_json: Absolute path to HF config file, e.g.
+                             ModelCatalog.get_full_path_configs("microsoft/layoutlm-base-uncased/pytorch_model.bin")
+    :param dataset_train: Dataset to use for training. Only datasets of type "SEQUENCE_CLASSIFICATION" or
+                          "TOKEN_CLASSIFICATION" are supported.
+    :param path_weights: path to a checkpoint for further fine-tuning
+    :param config_overwrite: Pass a list of arguments if some configs from `TrainingArguments` should be replaced. Check
+                             https://huggingface.co/docs/transformers/main_classes/trainer#transformers.TrainingArguments
+                             for the full training default setting.
+    :param log_dir: Path to log dir. Will default to `train_log/layoutlm`
+    :param build_train_config: dataflow build setting. Again, use list convention setting, e.g. ['max_datapoints=1000']
+    :param dataset_val: Dataset to use for validation. Dataset type must be the same as type of `dataset_train`
+    :param build_val_config: same as `build_train_config` but for validation
+    :param metric: A metric to choose for validation.
+    :param pipeline_component_name: A pipeline component name to use for validation (e.g. LMSequenceClassifierService or
+                                    LMTokenClassifierService.
+    """
+
+    build_train_dict: Dict[str, str] = {}
+    if build_train_config is not None:
+        build_train_dict = string_to_dict(",".join(build_train_config))
+    if "split" not in build_train_dict:
+        build_train_dict["split"] = "train"
+
+    build_val_dict: Dict[str, str] = {}
+    if build_val_config is not None:
+        build_val_dict = string_to_dict(",".join(build_val_config))
+    if "split" not in build_val_dict:
+        build_val_dict["split"] = "val"
+
+    if config_overwrite is None:
+        config_overwrite = []
+
+    # Need to set remove_unused_columns to False, as the DataCollator for column removal will remove some raw features
+    # that are necessary for the tokenizer. We also define some default settings.
+    conf_dict = {
+        "output_dir": log_dir,
+        "remove_unused_columns": False,
+        "per_device_train_batch_size": 8,
+        "max_steps": 130,
+        "evaluation_strategy": "steps"
+        if (dataset_val is not None and metric is not None and pipeline_component_name is not None)
+        else "no",
+        "eval_steps": 100,
+    }
+    if isinstance(dataset_train, str):
+        dataset_train = get_dataset(dataset_train)
+
+    for conf in config_overwrite:
+        key, val = conf.split("=", maxsplit=1)
+        conf_dict[key] = val
+
+    arguments = TrainingArguments(**conf_dict)
+    dataset_type = dataset_train.dataset_info.type
+
+    model_cls, tokenizer_fast = _get_model_class_and_tokenizer(path_config_json, dataset_type)
+
+    id_str_2label = dataset_train.dataflow.categories.get_categories(as_dict=True)
+    id2label = {int(k) - 1: v for k, v in id_str_2label.items()}
+    dataset = DatasetAdapter(
+        dataset_train,
+        True,
+        image_to_raw_layoutlm_features(
+            dataset_train.dataflow.categories.get_categories(as_dict=True, name_as_key=True), dataset_type
+        ),
+        **build_train_dict,
+    )
+    config = PretrainedConfig.from_pretrained(pretrained_model_name_or_path=path_config_json, id2label=id2label)
+    model = model_cls.from_pretrained(pretrained_model_name_or_path=path_weights, config=config)
+    data_collator = LayoutLMDataCollator(tokenizer_fast, return_tensors="pt")
+    trainer = LayoutLMTrainer(model, arguments, data_collator, dataset)
+
+    if arguments.evaluation_strategy in (IntervalStrategy.STEPS,):
+        dd_model_cls = _DS_TYPE_TO_DD_LM_CLASS[dataset_type]
+        categories = dataset_val.dataflow.categories.get_categories(filtered=True)  # type: ignore
+        dd_model = dd_model_cls(
+            path_config_json=path_config_json, path_weights=path_weights, categories=categories, device="cuda"
+        )
+        pipeline_component_cls = pipeline_component_registry.get(pipeline_component_name)
+        pipeline_component = pipeline_component_cls(tokenizer_fast, dd_model, image_to_layoutlm_features)
+        assert isinstance(pipeline_component, LanguageModelPipelineComponent)
+
+        trainer.setup_evaluator(dataset_val, pipeline_component, metric, **build_val_dict)  # type: ignore
+
+    trainer.train()
diff --git a/deepdoctection/utils/develop.py b/deepdoctection/utils/develop.py
index ff54c798..95481e3e 100644
--- a/deepdoctection/utils/develop.py
+++ b/deepdoctection/utils/develop.py
@@ -26,8 +26,9 @@
 import inspect
 from collections import defaultdict
 from datetime import datetime
-from typing import Any, Callable, List, Optional
+from typing import Callable, List, Optional
 
+from .detection_types import T
 from .logger import logger
 
 __all__: List[str] = ["deprecated"]
@@ -66,7 +67,9 @@ def log_deprecated(name: str = "", text: str = "", eos: str = "", max_num_warnin
     logger.info("[Deprecated] %s", info_msg)
 
 
-def deprecated(text: str = "", eos: str = "", max_num_warnings: Optional[int] = None) -> Callable[[Any], Any]:
+def deprecated(
+    text: str = "", eos: str = "", max_num_warnings: Optional[int] = None
+) -> Callable[[Callable[..., T]], Callable[..., T]]:
     """
 
     :param text: same as :func:`log_deprecated`.
@@ -93,7 +96,7 @@ def get_location() -> str:
         entry = stack[2]
         return f"{entry[1]}:{entry[2]}"
 
-    def deprecated_inner(func: Callable[[Any], Any]) -> Callable[[Any], Any]:
+    def deprecated_inner(func: Callable[..., T]) -> Callable[..., T]:
         @functools.wraps(func)
         def new_func(*args, **kwargs):  # type: ignore
             name = f"{func.__name__} [{get_location()}]"
diff --git a/deepdoctection/utils/fs.py b/deepdoctection/utils/fs.py
index ddf3b305..7ed5d4b4 100644
--- a/deepdoctection/utils/fs.py
+++ b/deepdoctection/utils/fs.py
@@ -20,6 +20,7 @@
 """
 
 import errno
+import json
 import os
 from base64 import b64encode
 from io import BytesIO
@@ -30,7 +31,7 @@
 from cv2 import IMREAD_COLOR, imread
 
 from ..utils.pdf_utils import get_pdf_file_reader, get_pdf_file_writer
-from .detection_types import ImageType, Pathlike
+from .detection_types import ImageType, JsonDict, Pathlike
 from .logger import logger
 from .tqdm import get_tqdm
 
@@ -42,6 +43,7 @@
     "download",
     "mkdir_p",
     "is_file_extension",
+    "load_json",
 ]
 
 
@@ -210,9 +212,9 @@ def get_load_image_func(
     :return: The function loading the file (and converting to its desired format)
     """
 
-    assert is_file_extension(path, [".png", ".jpeg", ".jpg", ".pdf"]), f"image type not allowed: {path}"
+    assert is_file_extension(path, [".png", ".jpeg", ".jpg", ".pdf", ".tif"]), f"image type not allowed: {path}"
 
-    if is_file_extension(path, [".png", ".jpeg", ".jpg"]):
+    if is_file_extension(path, [".png", ".jpeg", ".jpg", ".tif"]):
         return load_image_from_file
     if is_file_extension(path, [".pdf"]):
         return load_bytes_from_pdf_file
@@ -236,3 +238,15 @@ def maybe_path_or_pdf(path: Pathlike) -> int:
     if is_pdf:
         return 2
     return 0
+
+
+def load_json(path_ann: Pathlike) -> JsonDict:
+    """
+    Loading json file
+
+    :param path_ann: path
+    :return: dict
+    """
+    with open(path_ann, "r", encoding="utf-8") as file:
+        json_dict = json.loads(file.read())
+    return json_dict
diff --git a/deepdoctection/utils/settings.py b/deepdoctection/utils/settings.py
index 20372d97..d0e02dfd 100644
--- a/deepdoctection/utils/settings.py
+++ b/deepdoctection/utils/settings.py
@@ -65,6 +65,25 @@
 _N.C.A = "ANSWER"
 _N.C.O = "OTHER"
 
+_N.C.DOC = "DOC_CLASS"
+
+_N.C.LET = "LETTER"
+_N.C.FORM = "FORM"
+_N.C.EM = "EMAIL"
+_N.C.HW = "HANDWRITTEN"
+_N.C.AD = "ADVERTISMENT"
+_N.C.SR = "SCIENTIFIC REPORT"
+_N.C.SP = "SCIENTIFIC PUBLICATION"
+_N.C.SPEC = "SPECIFICATION"
+_N.C.FF = "FILE FOLDER"
+_N.C.NA = "NEWS ARTICLE"
+_N.C.BU = "BUDGET"
+_N.C.INV = "INVOICE"
+_N.C.PRES = "PRESENTATION"
+_N.C.QUEST = "QUESTIONNAIRE"
+_N.C.RES = "RESUME"
+_N.C.MEM = "MEMO"
+
 _N.NER.TAG = "NER_TAG"
 _N.NER.O = "O"
 _N.NER.B = "B"
@@ -130,6 +149,9 @@
 _N.NLP.LANG.NNO = "nno"
 _N.NLP.LANG.URD = "urd"
 
+_N.DS.TYPE.OBJ = "OBJECT_DETECTION"
+_N.DS.TYPE.SEQ = "SEQUENCE_CLASSIFICATION"
+_N.DS.TYPE.TOK = "TOKEN_CLASSIFICATION"
 
 _N.freeze()
 
diff --git a/deepdoctection/utils/viz.py b/deepdoctection/utils/viz.py
index 8c3d1457..507e456a 100644
--- a/deepdoctection/utils/viz.py
+++ b/deepdoctection/utils/viz.py
@@ -222,7 +222,7 @@ def draw_text(
 def draw_boxes(
     np_image: ImageType,
     boxes: npt.NDArray[float32],
-    category_names_list: Optional[List[str]] = None,
+    category_names_list: Optional[List[Optional[str]]] = None,
     color: Optional[Tuple[int, int, int]] = None,
 ) -> ImageType:
     """
diff --git a/docs/modules/deepdoctection.datasets.instances.rst b/docs/modules/deepdoctection.datasets.instances.rst
index 42ed7cd3..4b2d7cd7 100644
--- a/docs/modules/deepdoctection.datasets.instances.rst
+++ b/docs/modules/deepdoctection.datasets.instances.rst
@@ -58,6 +58,14 @@ deepdoctection.datasets.instances.pubtabnet
    :undoc-members:
    :show-inheritance:
 
+deepdoctection.datasets.instances.rvlcdip
+----------------------------------------------------
+
+.. automodule:: deepdoctection.datasets.instances.rvlcdip
+   :members:
+   :undoc-members:
+   :show-inheritance:
+
 deepdoctection.datasets.instances.xfund
 ----------------------------------------------------
 
diff --git a/docs/modules/deepdoctection.pipe.rst b/docs/modules/deepdoctection.pipe.rst
index 6a2e7bb0..b91946a5 100644
--- a/docs/modules/deepdoctection.pipe.rst
+++ b/docs/modules/deepdoctection.pipe.rst
@@ -102,7 +102,7 @@ deepdoctection.pipe.text
 deepdoctection.pipe.tokenclass
 ---------------------------------
 
-.. automodule:: deepdoctection.pipe.tokenclass
+.. automodule:: deepdoctection.pipe.lm
    :members:
    :undoc-members:
    :show-inheritance:
diff --git a/docs/modules/deepdoctection.train.rst b/docs/modules/deepdoctection.train.rst
index 374dd36f..7c9c2c8b 100644
--- a/docs/modules/deepdoctection.train.rst
+++ b/docs/modules/deepdoctection.train.rst
@@ -9,6 +9,15 @@ deepdoctection.train.d2\_frcnn\_train
    :undoc-members:
    :show-inheritance:
 
+deepdoctection.train.hf\_layoutlm\_train
+----------------------------------------------
+
+.. automodule:: deepdoctection.train.hf_layoutlm_train
+   :members:
+   :undoc-members:
+   :show-inheritance:
+
+
 deepdoctection.train.tp\_frcnn\_train
 ----------------------------------------------
 
diff --git a/docs/tutorials/datasets.rst b/docs/tutorials/datasets.rst
index ab1fbbfb..e422f504 100644
--- a/docs/tutorials/datasets.rst
+++ b/docs/tutorials/datasets.rst
@@ -67,6 +67,8 @@ datasets. We assume that in "custom_dataset" the dataset was physically placed i
 
 .. code:: python
 
+    import deepdoctection as dd
+
     _NAME = "dataset name"
     _DESCRIPTION = "a short description"
     _SPLITS = {"train": "/train"}
@@ -74,14 +76,14 @@ datasets. We assume that in "custom_dataset" the dataset was physically placed i
     _ANNOTATION_FILES = {"train": "gt_train.json"}
     _CATEGORIES = ["label_1","label_2"]
 
-    class CustomDataset(DatasetBase):
+    class CustomDataset(dd.DatasetBase):
 
         @classmethod
         def _info(cls):
-            return DatasetInfo(name=_NAME, description=_DESCRIPTION, splits=_SPLITS)
+            return dd.DatasetInfo(name=_NAME, description=_DESCRIPTION, splits=_SPLITS)
 
         def _categories(self):
-            return DatasetCategories(init_categories=_CATEGORIES)
+            return dd.DatasetCategories(init_categories=_CATEGORIES)
 
         def _builder(self):
             return CustomDataFlowBuilder(location=_LOCATION,annotation_files=_ANNOTATION_FILES)
@@ -149,15 +151,15 @@ are some functions available for different annotation syntax in the mapper packa
 
             # Load
             path = os.path.join(self.location,self.annotation_files["train"])
-            df = SerializerCoco.load(path)
+            df = dd.SerializerCoco.load(path)
             # yields {'image':{'id',...},'annotations':[{'id':..,'bbox':...}]}
 
             # Map
-            coco_to_image_mapper = coco_to_image(self.categories.get_categories(),
+            coco_to_image_mapper = dd.coco_to_image(self.categories.get_categories(),
                                                  load_image=True,
                                                  filter_empty_image=True,
                                                  fake_score=False)
-            df = MapData(df,coco_to_image_mapper)
+            df = dd.MapData(df,coco_to_image_mapper)
             # yields Image(file_name= ... ,location= ...,annotations = ...)
 
             return df
@@ -170,7 +172,7 @@ build configurations of the dataflows.
 
 .. code:: python
 
-   dataset = get_dataset("dataset_name")
+   dataset = dd.get_dataset("dataset_name")
    df = dataset.dataflow.build(**kwargs_config)
 
    for sample in df:
diff --git a/setup.cfg b/setup.cfg
index 7c5b2ca2..4a4fdc59 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,7 +16,8 @@ disable=
     W0401, # wildcard-import
     W0614, # unused-wildcard-import
     R0401,  # cyclic import
-    W0511  # fixme
+    W0511,  # fixme
+    E1120 # no-value-for-parameter (because it does not work proberly with the ubiquitous curry decorator
 
 extension-pkg-whitelist=cv2
 load-plugins=pylint_strict_informational
@@ -26,18 +27,19 @@ generated-members=torch.*
 ignored-modules=torch, transformers, detectron2, boto3
 
 [pylint.FORMAT]
-max-module-lines=2000
+max-module-lines=2500
 max-line-length=120
 good-names=x,y,k,n,dp,df,el,ex,cx,cy,w,h,l,i,rs,cs,p6,H1,H2,H3,B1,B2,B3,B1_proposal,B2_proposal,GroupNorm,c2,c3,c4,c5,G
 
 [pylint.DESIGN]
 
 max-args=12
-max-branches=20
+max-branches=25
 max-attributes=15
 max-locals=36
 max-returns=8
 max-statements=100
+max-public-methods=22
 
 [pylint.MISCELLANEOUS]
 unsafe-load-any-extension=y # https://pylint.pycqa.org/en/2.6/technical_reference/c_extensions.html that is esp. needed
diff --git a/setup.py b/setup.py
index 4099f461..d6857be4 100644
--- a/setup.py
+++ b/setup.py
@@ -121,7 +121,7 @@ def deps_list(*pkgs: str):
     "types-tabulate",
 )
 
-#if sys.platform == "linux":
+# if sys.platform == "linux":
 #    dist_deps.extend(deps_list("python-prctl"))
 
 # source dependencies with dataflow


Test patch:
diff --git a/deepdoctection/datasets/instances/layouttest.py b/deepdoctection/datasets/instances/layouttest.py
index 9d1e35d3..5f40786d 100644
--- a/deepdoctection/datasets/instances/layouttest.py
+++ b/deepdoctection/datasets/instances/layouttest.py
@@ -56,6 +56,7 @@
     "=media&key=AIzaSyDuoPG6naK-kRJikScR7cP_1sQBF1r3fWU",
 ]
 _SPLITS: Mapping[str, str] = {"test": "test", "predict": "predict"}
+_TYPE = names.DS.TYPE.OBJ
 _LOCATION = "testlayout"
 
 _ANNOTATION_FILES: Mapping[str, str] = {
@@ -76,7 +77,7 @@ class LayoutTest(_BuiltInDataset):
 
     @classmethod
     def _info(cls) -> DatasetInfo:
-        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS)
+        return DatasetInfo(name=_NAME, description=_DESCRIPTION, license=_LICENSE, url=_URL, splits=_SPLITS, type=_TYPE)
 
     def _categories(self) -> DatasetCategories:
         return DatasetCategories(init_categories=_INIT_CATEGORIES)
diff --git a/tests/conftest.py b/tests/conftest.py
index 4279851f..1f0ac06e 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -35,12 +35,18 @@
     local_to_global_coords,
 )
 from deepdoctection.datasets import DatasetCategories
-from deepdoctection.extern.base import DetectionResult, TokenClassResult
+from deepdoctection.extern.base import DetectionResult, SequenceClassResult, TokenClassResult
 from deepdoctection.utils.detection_types import ImageType, JsonDict
 from deepdoctection.utils.settings import names
 from deepdoctection.utils.systools import get_package_path
 
-from .data import Annotations, get_layoutlm_input, get_token_class_result
+from .data import (
+    Annotations,
+    get_layoutlm_features,
+    get_layoutlm_input,
+    get_sequence_class_result,
+    get_token_class_result,
+)
 from .mapper.data import DatapointImage
 
 
@@ -424,17 +430,29 @@ def fixture_col_box_tiling_table() -> List[BoundingBox]:
 
 
 @fixture(name="layoutlm_input")
-def fixture_textract_response() -> JsonDict:
-    """fixture textract_response"""
+def fixture_layoutlm_input() -> JsonDict:
+    """fixture layoutlm_input"""
     return get_layoutlm_input()
 
 
+@fixture(name="layoutlm_features")
+def fixture_layoutlm_features() -> JsonDict:
+    """fixture layoutlm_features"""
+    return get_layoutlm_features()
+
+
 @fixture(name="token_class_result")
 def fixture_token_class_result() -> List[TokenClassResult]:
     """fixture token_class_result"""
     return get_token_class_result()
 
 
+@fixture(name="sequence_class_result")
+def fixture_sequence_class_result() -> SequenceClassResult:
+    """fixture sequence_class_result"""
+    return get_sequence_class_result()
+
+
 @fixture(name="text_lines")
 def fixture_text_lines() -> List[Tuple[str, ImageType]]:
     """fixture text_lines"""
diff --git a/tests/data.py b/tests/data.py
index 93877eb2..7af27c60 100644
--- a/tests/data.py
+++ b/tests/data.py
@@ -24,13 +24,13 @@
 import numpy as np
 
 from deepdoctection.datapoint import BoundingBox, CategoryAnnotation, ContainerAnnotation, ImageAnnotation
-from deepdoctection.extern.base import DetectionResult, TokenClassResult
+from deepdoctection.extern.base import DetectionResult, SequenceClassResult, TokenClassResult
 from deepdoctection.utils.detection_types import JsonDict
 from deepdoctection.utils.settings import names
 
 
 @dataclass
-class Annotations:  # pylint: disable=R0904
+class Annotations:
     """
     dataclass Annotations for building fixtures
     """
@@ -1447,6 +1447,36 @@ def get_textract_response() -> JsonDict:
     "token_type_ids": [[0, 0, 0, 0, 0, 0]],
 }
 
+_LAYOUT_FEATURES = {
+    "image_ids": ["6ea00afa-ba27-382a-8952-51f8e6ce16b7"],
+    "width": [1000],
+    "height": [1000],
+    "ann_ids": [
+        [
+            "[CLS]",
+            "3a696daf-15d5-3b88-be63-02912ef35cfb",
+            "37d79fd7-ab87-30fe-b460-9b6e62e901b9",
+            "5d40236e-430c-3d56-a8a3-fe9e46b872ac",
+            "f8227d59-ea7f-342a-97fa-23df1f189762",
+            "[SEP]",
+        ]
+    ],
+    "input_ids": [[101, 7592, 2088, 9061, 2088, 102]],
+    "token_type_ids": [[0, 0, 0, 0, 0, 0]],
+    "attention_mask": [[1, 1, 1, 1, 1, 1]],
+    "bbox": [
+        [
+            [0.0, 0.0, 0.0, 0.0],
+            [183.0, 412.0, 217.0, 450.0],
+            [233.0, 405.0, 300.0, 450.0],
+            [166.0, 800.0, 217.0, 850.0],
+            [291.0, 800.0, 342.0, 850.0],
+            [1000.0, 1000.0, 1000.0, 1000.0],
+        ]
+    ],
+    "tokens": [["[CLS]", "hello", "world", "bye", "world", "[SEP]"]],
+}
+
 
 def get_layoutlm_input() -> JsonDict:
     """
@@ -1455,6 +1485,13 @@ def get_layoutlm_input() -> JsonDict:
     return _LAYOUT_INPUT
 
 
+def get_layoutlm_features() -> JsonDict:
+    """
+    layoutlm features
+    """
+    return _LAYOUT_FEATURES
+
+
 def get_token_class_result() -> List[TokenClassResult]:
     """
     token class result
@@ -1480,3 +1517,10 @@ def get_token_class_result() -> List[TokenClassResult]:
             uuids, input_ids[0], token_class_predictions, tokens, class_name, semantic_name, bio_tag  # type: ignore
         )
     ]
+
+
+def get_sequence_class_result() -> SequenceClassResult:
+    """
+    sequence class result
+    """
+    return SequenceClassResult(class_name="FOO", class_id=1)
diff --git a/tests/dataflow/test_serialize.py b/tests/dataflow/test_serialize.py
index 26c720ac..a528cd64 100644
--- a/tests/dataflow/test_serialize.py
+++ b/tests/dataflow/test_serialize.py
@@ -26,6 +26,7 @@
     SerializerFiles,
     SerializerJsonlines,
     SerializerPdfDoc,
+    SerializerTabsepFiles,
 )
 
 from ..test_utils import collect_datapoint_from_dataflow, get_test_path
@@ -83,7 +84,7 @@ class TestSerializerFiles:  # pylint: disable=R0903
     @staticmethod
     def test_loading() -> None:
         """
-        Test the loading of elements of a file directory
+        Test the loading of elements of a .jsonl file
         """
 
         # Arrange and Act
@@ -91,7 +92,26 @@ def test_loading() -> None:
         output = collect_datapoint_from_dataflow(df=df)
 
         # Assert
-        assert len(output) == 3
+        assert len(output) == 4
+
+
+class TestSerializerTabsepFiles:  # pylint: disable=R0903
+    """
+    Testing SerializerTabsepFiles loading function
+    """
+
+    @staticmethod
+    def test_loading() -> None:
+        """
+        Test the loading of elements of a .txt file
+        """
+
+        # Arrange and Act
+        df = SerializerTabsepFiles.load(get_test_path() / "test_file.txt")
+        output = collect_datapoint_from_dataflow(df=df)
+
+        # Assert
+        assert len(output) == 5
 
 
 class TestSerializerCoco:  # pylint: disable=R0903
diff --git a/tests/datapoint/test_image.py b/tests/datapoint/test_image.py
index a8e72115..df505b36 100644
--- a/tests/datapoint/test_image.py
+++ b/tests/datapoint/test_image.py
@@ -25,10 +25,11 @@
 from numpy.testing import assert_array_equal
 from pytest import mark, raises
 
+from deepdoctection.dataflow import MapData, SerializerJsonlines
 from deepdoctection.datapoint import BoundingBox, CategoryAnnotation, Image, ImageAnnotation
 from deepdoctection.utils import get_uuid
 
-from ..test_utils import anns_to_ids
+from ..test_utils import anns_to_ids, collect_datapoint_from_dataflow, get_test_path
 from .conftest import TestPdfPage, WhiteImage
 
 
@@ -293,7 +294,6 @@ def test_image_with_anns_can_be_exported(image: WhiteImage) -> None:
         assert "location" in output
         assert "file_name" in output
         assert "annotations" in output
-        assert "image" in output
         assert "_image_id" in output
         assert "embeddings" in output
 
@@ -305,3 +305,14 @@ def test_image_with_anns_can_be_exported(image: WhiteImage) -> None:
         assert "category_name" in ann
         assert "category_id" in ann
         assert "score" in ann
+
+    @staticmethod
+    def test_load_image_from_dict() -> None:
+        """
+        test class meth: from_dict returns a image
+        """
+
+        df = SerializerJsonlines.load(get_test_path() / "test_image.jsonl")
+        df = MapData(df, lambda dp: Image.from_dict(**dp))
+        image_list = collect_datapoint_from_dataflow(df)
+        assert len(image_list) == 1
diff --git a/tests/datasets/instances/test_rvlcdip.py b/tests/datasets/instances/test_rvlcdip.py
new file mode 100644
index 00000000..7cff39e3
--- /dev/null
+++ b/tests/datasets/instances/test_rvlcdip.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+# File: test_rvlcdip.py
+
+# Copyright 2021 Dr. Janis Meyer. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Testing module datasets.instances.rvlcdip
+"""
+from unittest.mock import MagicMock, patch
+
+from deepdoctection.datasets import Rvlcdip
+
+from ...test_utils import collect_datapoint_from_dataflow, get_test_path
+from .conftest import get_white_image
+
+
+@patch("deepdoctection.datasets.instances.rvlcdip.load_image_from_file", MagicMock(side_effect=get_white_image))
+def test_dataset_pubtabnet_returns_image() -> None:
+    """
+    test dataset pubtabnet returns image
+    """
+
+    # Arrange
+    rvlcdip = Rvlcdip()
+    rvlcdip.dataflow.get_workdir = get_test_path  # type: ignore
+    rvlcdip.dataflow.annotation_files = {"val": "test_file.txt"}
+    df = rvlcdip.dataflow.build()
+
+    # Act & Assert
+    df_list = collect_datapoint_from_dataflow(df)
+    assert len(df_list) == 5
diff --git a/tests/datasets/test_registry.py b/tests/datasets/test_registry.py
index 7b7474f8..8e184e13 100644
--- a/tests/datasets/test_registry.py
+++ b/tests/datasets/test_registry.py
@@ -31,7 +31,7 @@ def test_dataset_registry_has_all_build_in_datasets_registered() -> None:
     """
     test dataset registry has all pipeline components registered
     """
-    assert len(dataset_registry.get_all()) == 8
+    assert len(dataset_registry.get_all()) == 9
 
 
 def test_dataset_registry_registered_new_dataset() -> None:
diff --git a/tests/eval/test_eval.py b/tests/eval/test_eval.py
index 1dce3278..6a36e149 100644
--- a/tests/eval/test_eval.py
+++ b/tests/eval/test_eval.py
@@ -29,7 +29,8 @@
 from deepdoctection.eval import CocoMetric, Evaluator
 from deepdoctection.extern.base import DetectionResult
 from deepdoctection.pipe.layout import ImageLayoutService
-from deepdoctection.utils import tensorpack_available
+from deepdoctection.utils import tensorpack_available, names
+
 from ..test_utils import set_num_gpu_to_one
 
 if tensorpack_available():
@@ -44,7 +45,11 @@ class TestEvaluator:
     @fixture
     @patch("deepdoctection.extern.tp.tpcompat.get_num_gpu", MagicMock(side_effect=set_num_gpu_to_one))
     def setup_method(
-        self, path_to_tp_frcnn_yaml: str, image_with_anns: Image, categories: DatasetCategories, detection_results: List[DetectionResult]
+        self,
+        path_to_tp_frcnn_yaml: str,
+        image_with_anns: Image,
+        categories: DatasetCategories,
+        detection_results: List[DetectionResult],
     ) -> None:
         """
         setup the necessary requirements
@@ -52,15 +57,19 @@ def setup_method(
 
         self._dataset = MagicMock()
         self._dataset.dataflow = MagicMock()
+        self._dataset.dataset_info = MagicMock()
         self._dataset.dataflow.build = MagicMock(return_value=DataFromList([image_with_anns]))
         self._dataset.dataflow.categories = categories
+        self._dataset.dataset_info.type = names.DS.TYPE.OBJ
 
-        self._layout_detector = TPFrcnnDetector(path_yaml=path_to_tp_frcnn_yaml, path_weights="", categories=categories.get_categories())
+        self._layout_detector = TPFrcnnDetector(
+            path_yaml=path_to_tp_frcnn_yaml, path_weights="", categories=categories.get_categories()
+        )
         self._pipe_component = ImageLayoutService(self._layout_detector)
-        self._pipe_component.predictor.predict = MagicMock(return_value=detection_results)
+        self._pipe_component.predictor.predict = MagicMock(return_value=detection_results)  # type: ignore
         self._metric = CocoMetric
 
-        self.evaluator = Evaluator(self._dataset, self._pipe_component, self._metric,1)
+        self.evaluator = Evaluator(self._dataset, self._pipe_component, self._metric, 1)
 
     @mark.requires_tf
     @mark.full
diff --git a/tests/eval/test_tedsmetric.py b/tests/eval/test_tedsmetric.py
index 5db970ae..4365825e 100644
--- a/tests/eval/test_tedsmetric.py
+++ b/tests/eval/test_tedsmetric.py
@@ -20,6 +20,7 @@
 """
 
 from pytest import mark
+
 from deepdoctection.utils.file_utils import apted_available
 
 if apted_available():
diff --git a/tests/extern/test_hflayoutlm.py b/tests/extern/test_hflayoutlm.py
index cc06079c..a65e8e6e 100644
--- a/tests/extern/test_hflayoutlm.py
+++ b/tests/extern/test_hflayoutlm.py
@@ -23,8 +23,8 @@
 
 from pytest import mark, raises
 
-from deepdoctection.extern.base import TokenClassResult
-from deepdoctection.extern.hflayoutlm import HFLayoutLmTokenClassifier
+from deepdoctection.extern.base import SequenceClassResult, TokenClassResult
+from deepdoctection.extern.hflayoutlm import HFLayoutLmSequenceClassifier, HFLayoutLmTokenClassifier
 from deepdoctection.utils.detection_types import JsonDict
 from deepdoctection.utils.file_utils import pytorch_available
 
@@ -43,6 +43,14 @@ def get_token_class_results(  # type: ignore
     return DatapointXfund().get_token_class_results()
 
 
+def get_sequence_class_result(  # type: ignore
+        input_ids, attention_mask, token_type_ids, boxes, model) -> SequenceClassResult:    # pylint: disable=W0613
+    """
+    sequence class result
+    """
+    return DatapointXfund().get_sequence_class_results()
+
+
 class TestHFLayoutLmTokenClassifier:
     """
     Test HFLayoutLmTokenClassifier
@@ -50,7 +58,9 @@ class TestHFLayoutLmTokenClassifier:
 
     @staticmethod
     @mark.requires_pt
-    @patch("deepdoctection.extern.pt.ptutils.pytorch_available", MagicMock(return_value=False))
+    @patch(
+        "deepdoctection.extern.hflayoutlm.get_pytorch_requirement", MagicMock(return_value=("torch", False, "DUMMY"))
+    )
     @patch("deepdoctection.extern.hflayoutlm.PretrainedConfig.from_pretrained", MagicMock())
     @patch("deepdoctection.extern.hflayoutlm.LayoutLMForTokenClassification.from_pretrained", MagicMock())
     def test_hf_layout_lm_does_not_build_when_pt_not_available() -> None:
@@ -84,14 +94,13 @@ def test_categories_are_constructed_properly() -> None:
         model = HFLayoutLmTokenClassifier("path/to/json", "path/to/model", categories_semantics, categories_bio)
 
         # Assert
-        assert model.categories == {0: "B-FOO", 1: "I-FOO", 2: "O"}
+        assert model.categories == {"1": "B-FOO", "2": "I-FOO", "3": "O"}
 
         # Arrange
-        categories_explicit_list = ["FOO", "BAK", "O"]
-        categories_explicit = {0: "FOO", 1: "BAK", 2: "O"}
+        categories_explicit = {"1": "FOO", "2": "BAK", "3": "O"}
 
         # Act
-        model = HFLayoutLmTokenClassifier("path/to/json", "path/to/model", categories_explicit=categories_explicit_list)
+        model = HFLayoutLmTokenClassifier("path/to/json", "path/to/model", categories=categories_explicit)
 
         # Assert
         assert model.categories == categories_explicit
@@ -115,15 +124,20 @@ def test_hf_layout_lm_predicts_token(
         categories_semantics = ["FOO"]
         categories_bio = ["B", "I", "O"]
         layoutlm = HFLayoutLmTokenClassifier("path/to/json", "path/to/model", categories_semantics, categories_bio)
+        layoutlm.model.device = "cpu"
 
         # Act
-        inputs = {}
-        inputs["ids"] = layoutlm_input["ids"]
-        inputs["input_ids"] = torch.tensor(layoutlm_input["input_ids"])
-        inputs["attention_mask"] = torch.tensor(layoutlm_input["attention_mask"])
-        inputs["token_type_ids"] = torch.tensor(layoutlm_input["token_type_ids"])
-        inputs["boxes"] = torch.tensor(layoutlm_input["boxes"])
-        inputs["tokens"] = layoutlm_input["tokens"]
+        inputs = {
+            "image_ids": layoutlm_input["image_ids"],
+            "width": layoutlm_input["width"],
+            "height": layoutlm_input["height"],
+            "ann_ids": layoutlm_input["ann_ids"],
+            "tokens": layoutlm_input["tokens"],
+            "bbox": torch.tensor(layoutlm_input["bbox"]),
+            "input_ids": torch.tensor(layoutlm_input["input_ids"]),
+            "attention_mask": torch.tensor(layoutlm_input["attention_mask"]),
+            "token_type_ids": torch.tensor(layoutlm_input["token_type_ids"]),
+        }
 
         results = layoutlm.predict(**inputs)
 
@@ -131,3 +145,46 @@ def test_hf_layout_lm_predicts_token(
         assert len(results) == 18
         class_names = [res.class_name for res in results]
         assert class_names == token_class_names
+
+
+class TestHFLayoutLmSequenceClassifier:   # pylint: disable=R0903
+    """
+    Test HFLayoutLmSequenceClassifier
+    """
+
+    @staticmethod
+    @mark.requires_pt
+    @patch("deepdoctection.extern.hflayoutlm.LayoutLMForSequenceClassification.from_pretrained", MagicMock())
+    @patch("deepdoctection.extern.hflayoutlm.PretrainedConfig.from_pretrained", MagicMock())
+    @patch(
+        "deepdoctection.extern.hflayoutlm.predict_sequence_classes", MagicMock(side_effect=get_sequence_class_result)
+    )
+    def test_hf_layout_lm_predicts_token(
+        layoutlm_input: JsonDict,
+    ) -> None:
+        """
+        HFLayoutLmTokenClassifier calls predict_token_classes and post processes TokenClassResult correctly
+        """
+
+        # Arrange
+        categories = {"1": "FOO", "2": "BAK"}
+        layoutlm = HFLayoutLmSequenceClassifier("path/to/json", "path/to/model", categories)
+        layoutlm.model.device = "cpu"
+
+        # Act
+        inputs = {
+            "image_ids": layoutlm_input["image_ids"],
+            "width": layoutlm_input["width"],
+            "height": layoutlm_input["height"],
+            "ann_ids": layoutlm_input["ann_ids"],
+            "tokens": layoutlm_input["tokens"],
+            "bbox": torch.tensor(layoutlm_input["bbox"]),
+            "input_ids": torch.tensor(layoutlm_input["input_ids"]),
+            "attention_mask": torch.tensor(layoutlm_input["attention_mask"]),
+            "token_type_ids": torch.tensor(layoutlm_input["token_type_ids"]),
+        }
+
+        results = layoutlm.predict(**inputs)
+
+        # Assert
+        assert results.class_name == "BAK"
diff --git a/tests/mapper/conftest.py b/tests/mapper/conftest.py
index 94a1e574..f35bb6f5 100644
--- a/tests/mapper/conftest.py
+++ b/tests/mapper/conftest.py
@@ -179,6 +179,14 @@ def fixture_datapoint_image() -> Image:
     return DatapointImage().image
 
 
+@fixture(name="datapoint_image_with_summary")
+def fixture_datapoint_image_with_summary() -> Image:
+    """
+    Image with summary annotation
+    """
+    return DatapointImage().get_image_with_summary()
+
+
 @fixture(name="page_dict")
 def fixture_page_dict() -> JsonDict:
     """
@@ -213,6 +221,22 @@ def fixture_layoutlm_input() -> JsonDict:
     return DatapointXfund().get_layout_input()
 
 
+@fixture(name="raw_layoutlm_features")
+def fixture_raw_layoutlm_featurest() -> JsonDict:
+    """
+    Layoutlm input
+    """
+    return DatapointXfund().get_raw_layoutlm_features()
+
+
+@fixture(name="xfund_categories_dict_name_as_key")
+def fixture_xfund_categories_dict_name_as_key() -> JsonDict:
+    """
+    categories_dict_name_as_key
+    """
+    return DatapointXfund().get_categories_dict_names_as_key()
+
+
 @fixture(name="datapoint_iiitar13kjson")
 def fixture_datapoint_iiitar13kjson() -> Dict[str, Any]:
     """
diff --git a/tests/mapper/data.py b/tests/mapper/data.py
index c7ca202f..46302f14 100644
--- a/tests/mapper/data.py
+++ b/tests/mapper/data.py
@@ -25,9 +25,16 @@
 
 import numpy as np
 
-from deepdoctection.datapoint import BoundingBox, Image, ImageAnnotation, convert_np_array_to_b64
+from deepdoctection.datapoint import (
+    BoundingBox,
+    CategoryAnnotation,
+    Image,
+    ImageAnnotation,
+    SummaryAnnotation,
+    convert_np_array_to_b64,
+)
 from deepdoctection.datasets.info import DatasetCategories
-from deepdoctection.extern.base import TokenClassResult
+from deepdoctection.extern.base import SequenceClassResult, TokenClassResult
 from deepdoctection.utils.detection_types import ImageType, JsonDict
 from deepdoctection.utils.settings import names
 
@@ -1044,6 +1051,14 @@ def get_d2_frcnn_training_anns(self) -> JsonDict:
         """
         return self.d2_frcnn_training
 
+    def get_image_with_summary(self) -> Image:
+        """
+        Image with summary "BAK" and CategoryAnnotation "FOO"
+        """
+        self.image.summary = SummaryAnnotation()
+        self.image.summary.dump_sub_category("BAK", CategoryAnnotation(category_name="FOO", category_id="1"))
+        return self.image
+
 
 class DatapointPageDict:  # pylint: disable=R0903
     """
@@ -1750,67 +1765,90 @@ class DatapointXfund:
     dp = _SAMPLE_XFUND["documents"][0]
 
     category_names_mapping = {"other": names.C.O, "question": names.C.Q, "answer": names.C.A, "header": names.C.HEAD}
+    categories_dict_name_as_key = {
+        "B-ANSWER": "1",
+        "B-HEAD": "2",
+        "B-QUESTION": "3",
+        "E-ANSWER": "4",
+        "E-HEAD": "5",
+        "E-QUESTION": "6",
+        "I-ANSWER": "7",
+        "I-HEAD": "8",
+        "I-QUESTION": "9",
+        "O": "10",
+        "S-ANSWER": "11",
+        "S-HEAD": "12",
+        "S-QUESTION": "13",
+    }
     layout_input = {
-        "image": np.ones((1000, 1000, 3)),
-        "ids": [
-            "CLS",
-            "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
-            "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
-            "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
-            "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
-            "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
-            "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
-            "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
-            "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
-            "SEP",
+        "image_ids": ["t74dfkh3-12gr-17d9-8e41-c4d134c0uzo4"],
+        "width": [1000],
+        "height": [1000],
+        "ann_ids": [
+            [
+                "CLS",
+                "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
+                "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
+                "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
+                "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
+                "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
+                "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
+                "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
+                "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+                "SEP",
+            ]
         ],
-        "boxes": [
-            [0.0, 0.0, 0.0, 0.0],
-            [325.0, 184.0, 578.0, 230.0],
-            [325.0, 184.0, 578.0, 230.0],
-            [325.0, 184.0, 578.0, 230.0],
-            [325.0, 184.0, 578.0, 230.0],
-            [586.0, 186.0, 834.0, 232.0],
-            [586.0, 186.0, 834.0, 232.0],
-            [586.0, 186.0, 834.0, 232.0],
-            [586.0, 186.0, 834.0, 232.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1058.0, 413.0, 1701.0, 482.0],
-            [1000.0, 1000.0, 1000.0, 1000.0],
+        "bbox": [
+            [
+                [0, 0, 0, 0],
+                [325, 184, 578, 230],
+                [325, 184, 578, 230],
+                [325, 184, 578, 230],
+                [325, 184, 578, 230],
+                [586, 186, 834, 232],
+                [586, 186, 834, 232],
+                [586, 186, 834, 232],
+                [586, 186, 834, 232],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [858, 413, 961, 482],
+                [1000, 1000, 1000, 1000],
+            ]
         ],
         "tokens": [
-            "CLS",
-            "aka",
-            "##de",
-            "##mis",
-            "##ches",
-            "aus",
-            "##lands",
-            "##am",
-            "##t",
-            "be",
-            "##wer",
-            "##bu",
-            "##ng",
-            "##sf",
-            "##or",
-            "##mu",
-            "##lar",
-            "SEP",
+            [
+                "CLS",
+                "aka",
+                "##de",
+                "##mis",
+                "##ches",
+                "aus",
+                "##lands",
+                "##am",
+                "##t",
+                "be",
+                "##wer",
+                "##bu",
+                "##ng",
+                "##sf",
+                "##or",
+                "##mu",
+                "##lar",
+                "SEP",
+            ]
         ],
         "input_ids": [
             [
@@ -1837,6 +1875,20 @@ class DatapointXfund:
         "attention_mask": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
         "token_type_ids": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
     }
+    raw_layout_features = {
+        "image_id": "c421a065-cfd4-3057-8d50-4b98e3c09810",
+        "width": 1000,
+        "height": 1000,
+        "ann_ids": [
+            "0d0600cf-df94-34fa-9b30-5ecbbd1b36ab",
+            "34bb95dc-7fe6-3982-9dd5-e49d362b3fd7",
+            "a77dfce6-32ff-31b4-8e39-cbbdd4c0acf1",
+        ],
+        "words": ["Akademisches", "Auslandsamt", "Bewerbungsformular"],
+        "bbox": [[325.0, 184.0, 578.0, 230.0], [586.0, 186.0, 834.0, 232.0], [1058.0, 413.0, 1701.0, 482.0]],
+        "dataset_type": names.DS.TYPE.TOK,
+        "labels": [10, 10, 2],
+    }
 
     def get_category_names_mapping(self) -> Dict[str, str]:
         """
@@ -1850,19 +1902,32 @@ def get_layout_input(self) -> JsonDict:
         """
         return self.layout_input
 
+    def get_raw_layoutlm_features(self) -> JsonDict:
+        """
+        raw layoutlm features
+        """
+        return self.raw_layout_features
+
     def get_token_class_results(self) -> List[TokenClassResult]:
         """
         List of TokenClassResult
         """
-        uuids = self.layout_input["ids"]
+        uuids = self.layout_input["ann_ids"][0]  # type: ignore
         input_ids = self.layout_input["input_ids"][0]  # type: ignore
         token_class_predictions = [0, 1, 1, 0, 1, 2, 1, 1, 1, 0, 0, 0, 1, 2, 1, 0, 1, 1]
-        tokens = self.layout_input["tokens"]
+        tokens = self.layout_input["tokens"][0]  # type: ignore
         return [
             TokenClassResult(uuid=out[0], token_id=out[1], class_id=out[2], token=out[3])
-            for out in zip(uuids, input_ids, token_class_predictions, tokens)  # type: ignore
+            for out in zip(uuids, input_ids, token_class_predictions, tokens)
         ]
 
+    @staticmethod
+    def get_sequence_class_results() -> SequenceClassResult:
+        """
+        sequence class results
+        """
+        return SequenceClassResult(class_id=1, score=0.93)
+
     @staticmethod
     def get_categories_semantics() -> List[str]:
         """
@@ -1903,6 +1968,10 @@ def get_token_class_names() -> List[str]:
             "I-FOO",
         ]
 
+    def get_categories_dict_names_as_key(self) -> Dict[str, str]:
+        """categories dict names as key"""
+        return self.categories_dict_name_as_key
+
 
 @dataclass
 class IIITar13KJson:
diff --git a/tests/mapper/test_cats.py b/tests/mapper/test_cats.py
index 83330dc6..cf8a8a9d 100644
--- a/tests/mapper/test_cats.py
+++ b/tests/mapper/test_cats.py
@@ -23,8 +23,8 @@
 
 import pytest
 
-from deepdoctection.datapoint import CategoryAnnotation, Image
-from deepdoctection.mapper import cat_to_sub_cat, filter_cat, image_to_cat_id, pub_to_image, remove_cats
+from deepdoctection.datapoint import CategoryAnnotation, Image, SummaryAnnotation
+from deepdoctection.mapper import cat_to_sub_cat, filter_cat, filter_summary, image_to_cat_id, pub_to_image, remove_cats
 from deepdoctection.utils.detection_types import JsonDict
 from deepdoctection.utils.settings import names
 
@@ -105,6 +105,30 @@ def test_filter_categories(datapoint_pubtabnet: JsonDict, pubtabnet_results: Dat
     assert len(cells) == 0
 
 
+def test_filter_summary_1(datapoint_image_with_summary: Image) -> None:
+    """
+    test func:`filter_summary` does not filter dataset, if condition is satisfied.
+    """
+
+    # Arrange
+    output = filter_summary({"BAK": "FOO"}, True)(datapoint_image_with_summary)
+
+    # Assert
+    assert output is not None
+
+
+def test_filter_summary_2(datapoint_image_with_summary: Image) -> None:
+    """
+    test func:`filter_summary`  does filter dataset, if condition is not satisfied.
+    """
+
+    # Arrange
+    output = filter_summary({"BAK": ["BAZ"]}, True)(datapoint_image_with_summary)
+
+    # Assert
+    assert output is None
+
+
 def test_image_to_cat_id_1(dp_image_fully_segmented: Image) -> None:
     """
     test func: image_to_cat_id returns extraction of category_ids
@@ -115,8 +139,7 @@ def test_image_to_cat_id_1(dp_image_fully_segmented: Image) -> None:
     expected_output = [2]
 
     # Act
-    image_to_cat_id_mapper = image_to_cat_id(category_names)
-    output = image_to_cat_id_mapper(dp_image_fully_segmented)  # pylint: disable = E1102
+    output, _ = image_to_cat_id(category_names)(dp_image_fully_segmented)  # pylint: disable = E1102
 
     # Assert
     assert output[names.C.TAB] == expected_output
@@ -132,8 +155,7 @@ def test_image_to_cat_id_2(dp_image_fully_segmented: Image) -> None:
     expected_output = {names.C.TAB: [2], names.C.ROW: [6, 6], names.C.COL: [7, 7]}
 
     # Act
-    image_to_cat_id_mapper = image_to_cat_id(category_names)
-    output = image_to_cat_id_mapper(dp_image_fully_segmented)  # pylint: disable = E1102
+    output, _ = image_to_cat_id(category_names)(dp_image_fully_segmented)  # pylint: disable = E1102
 
     # Assert
     assert output[names.C.TAB] == expected_output[names.C.TAB]
@@ -151,8 +173,9 @@ def test_image_to_cat_id_3(dp_image_fully_segmented: Image) -> None:
     expected_output = {names.C.RS: [1, 1, 1, 1, 0]}
 
     # Act
-    image_to_cat_id_mapper = image_to_cat_id(sub_category_names=sub_category_names)  # pylint: disable = E1120
-    output = image_to_cat_id_mapper(dp_image_fully_segmented)  # pylint: disable = E1102
+    output, _ = image_to_cat_id(sub_categories=sub_category_names)(   # pylint: disable = E1102
+        dp_image_fully_segmented
+    )
 
     # Assert
     assert output[names.C.RS] == expected_output[names.C.RS]
@@ -173,8 +196,9 @@ def test_image_to_cat_id_4(dp_image_fully_segmented: Image) -> None:
     }
 
     # Act
-    image_to_cat_id_mapper = image_to_cat_id(sub_category_names=sub_category_names)  # pylint: disable = E1120
-    output = image_to_cat_id_mapper(dp_image_fully_segmented)  # pylint: disable = E1102
+    output, _ = image_to_cat_id(sub_categories=sub_category_names)(  # pylint: disable = E1102
+        dp_image_fully_segmented
+    )
 
     # Assert
     assert output[names.C.RN] == expected_output[names.C.RN]
@@ -244,3 +268,24 @@ def test_remove_cats_2(dp_image_fully_segmented: Image) -> None:
 
     assert isinstance(scd_ann_cell.get_sub_category(names.C.CN), CategoryAnnotation)
     assert isinstance(scd_ann_cell.get_sub_category(names.C.CS), CategoryAnnotation)
+
+
+def test_remove_cats_3(dp_image_fully_segmented: Image) -> None:
+    """
+    test func: remove_cats removes summary sub category
+    """
+
+    # Arrange
+    sub_category_ann = CategoryAnnotation(category_name="TEST")
+    summary = SummaryAnnotation()
+    summary.dump_sub_category("TEST_SUMMARY", sub_category_ann)
+    dp_image_fully_segmented.summary = summary
+
+    # Act
+    remove_cats_mapper = remove_cats(summary_sub_categories="TEST_SUMMARY")  # pylint: disable=E1120  # 259
+    dp = remove_cats_mapper(dp_image_fully_segmented)
+    assert dp.summary is not None
+
+    # Assert
+    with pytest.raises(Exception):
+        dp.summary.get_sub_category("TEST_SUMMARY")
diff --git a/tests/mapper/test_laylmstruct.py b/tests/mapper/test_laylmstruct.py
index e6d459a0..4d530064 100644
--- a/tests/mapper/test_laylmstruct.py
+++ b/tests/mapper/test_laylmstruct.py
@@ -27,9 +27,19 @@
 import numpy as np
 from pytest import mark
 
-from deepdoctection.mapper.laylmstruct import image_to_layoutlm
+from deepdoctection.datapoint import Image
+from deepdoctection.mapper.laylmstruct import (
+    image_to_layoutlm,
+    image_to_raw_layoutlm_features,
+    raw_features_to_layoutlm_features,
+)
 from deepdoctection.mapper.xfundstruct import xfund_to_image
 from deepdoctection.utils.detection_types import JsonDict
+from deepdoctection.utils.file_utils import transformers_available
+from deepdoctection.utils.settings import names
+
+if transformers_available():
+    from transformers import LayoutLMTokenizerFast
 
 
 @mark.requires_pt
@@ -49,21 +59,114 @@ def test_image_to_layoutlm(
         "attention_mask": layoutlm_input["attention_mask"],
         "token_type_ids": layoutlm_input["token_type_ids"],
     }
+
     tokenizer = MagicMock(return_value=tokenizer_output)
-    word_output = copy(layoutlm_input["tokens"])
+    word_output = copy(layoutlm_input["tokens"][0])  # tokens are now batched
     word_output.pop(0)
     word_output.pop(-1)
     word_output = [word_output[0:6], word_output[6:13], word_output[13:16]]
     tokenizer.tokenize = MagicMock(side_effect=word_output)
+    tokenizer.max_model_input_sizes = {"microsoft/layoutlm-base-uncased": 512}
 
     # Act
-    image_to_layoutlm_func = image_to_layoutlm(tokenizer=tokenizer)  # pylint: disable=E1120
-    output = image_to_layoutlm_func(image)  # pylint: disable=E1102
+    output = image_to_layoutlm(tokenizer=tokenizer)(image)  # pylint: disable=E1102, E1120
 
     # Assert
     assert len(output["ids"]) == 18
     assert output["boxes"].shape == (1, 18, 4)
-    assert output["tokens"] == layoutlm_input["tokens"]
+    assert output["tokens"] == layoutlm_input["tokens"][0]
     assert output["input_ids"] == layoutlm_input["input_ids"]
     assert output["attention_mask"] == layoutlm_input["attention_mask"]
     assert output["token_type_ids"] == layoutlm_input["token_type_ids"]
+
+
+@patch("deepdoctection.mapper.xfundstruct.load_image_from_file", MagicMock(return_value=np.ones((1000, 1000, 3))))
+def test_image_to_raw_layoutlm_features_for_token_data(
+    datapoint_xfund: JsonDict,
+    xfund_category_names: Dict[str, str],
+    xfund_categories_dict_name_as_key: Dict[str, str],
+    raw_layoutlm_features: JsonDict,
+) -> None:
+    """
+    testing image_to_raw_layoutlm_features is mapping correctly for dataset type "TOKEN_CLASSIFICATION"
+    """
+
+    # Arrange
+    image = xfund_to_image(True, False, xfund_category_names)(datapoint_xfund)  # pylint: disable=E1120
+
+    # Act
+    raw_features = image_to_raw_layoutlm_features(xfund_categories_dict_name_as_key, names.DS.TYPE.TOK)(image)
+
+    # Assert
+    assert raw_features is not None
+    assert raw_features["image_id"] == raw_layoutlm_features["image_id"]
+    assert raw_features["width"] == raw_layoutlm_features["width"]
+    assert raw_features["height"] == raw_layoutlm_features["height"]
+    assert raw_features["ann_ids"] == raw_layoutlm_features["ann_ids"]
+    assert raw_features["words"] == raw_layoutlm_features["words"]
+    assert raw_features["bbox"] == raw_layoutlm_features["bbox"]
+    assert raw_features["dataset_type"] == raw_layoutlm_features["dataset_type"]
+    assert raw_features["labels"] == raw_layoutlm_features["labels"]
+
+
+@patch("deepdoctection.mapper.xfundstruct.load_image_from_file", MagicMock(return_value=np.ones((1000, 1000, 3))))
+def test_image_to_raw_layoutlm_features_for_inference(
+    datapoint_xfund: JsonDict, xfund_category_names: Dict[str, str], raw_layoutlm_features: JsonDict
+) -> None:
+    """
+    testing image_to_raw_layoutlm_features is mapping correctly. Semantic entities and tags have been removed, so that
+    the scenario covers the inference case
+    """
+
+    # Arrange
+    image = xfund_to_image(True, False, xfund_category_names)(datapoint_xfund)  # pylint: disable=E1120
+
+    assert image is not None
+
+    for ann in image.get_annotation():
+        ann.remove_sub_category(names.C.SE)
+        ann.remove_sub_category(names.NER.TAG)
+
+    # Act
+    raw_features = image_to_raw_layoutlm_features(None, names.DS.TYPE.TOK)(image)
+
+    # Assert
+    assert raw_features is not None
+    assert raw_features["image_id"] == raw_layoutlm_features["image_id"]
+    assert raw_features["width"] == raw_layoutlm_features["width"]
+    assert raw_features["height"] == raw_layoutlm_features["height"]
+    assert raw_features["ann_ids"] == raw_layoutlm_features["ann_ids"]
+    assert raw_features["words"] == raw_layoutlm_features["words"]
+    assert raw_features["bbox"] == raw_layoutlm_features["bbox"]
+    assert raw_features["dataset_type"] == raw_layoutlm_features["dataset_type"]
+    assert "labels" not in raw_features
+
+
+@mark.requires_pt
+def test_raw_features_to_layoutlm_features(
+    dp_image_with_layout_and_word_annotations: Image, layoutlm_features: JsonDict
+) -> None:
+    """
+    testing image_to_layoutlm_features is mapping correctly
+    """
+
+    # Arrange
+    dp = image_to_raw_layoutlm_features()(dp_image_with_layout_and_word_annotations)  # pylint: disable=E1120
+    tokenizer_fast = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
+
+    # Act
+    assert dp is not None
+    feature = raw_features_to_layoutlm_features(dp, tokenizer_fast, padding="do_not_pad")
+
+    # Assert
+    # pylint: disable=E1136
+    assert feature["image_ids"] == layoutlm_features["image_ids"]
+    assert feature["width"] == layoutlm_features["width"]
+    assert feature["height"] == layoutlm_features["height"]
+    assert feature["ann_ids"] == layoutlm_features["ann_ids"]
+    assert feature["input_ids"] == layoutlm_features["input_ids"]
+    assert feature["token_type_ids"] == layoutlm_features["token_type_ids"]
+    assert feature["attention_mask"] == layoutlm_features["attention_mask"]
+    assert feature["bbox"] == layoutlm_features["bbox"]
+    assert feature["tokens"] == layoutlm_features["tokens"]
+    # pylint: enable=E1136
diff --git a/tests/pipe/test_anngen.py b/tests/pipe/test_anngen.py
index b58ced73..ac247289 100644
--- a/tests/pipe/test_anngen.py
+++ b/tests/pipe/test_anngen.py
@@ -152,8 +152,8 @@ def test_summary_annotation(dp_image: Image, layout_detect_results: List[Detecti
         ann_id = dp_manager.set_image_annotation(layout_detect_results[0], to_image=True)
 
         # Act
-        summ_id_1 = dp_manager.set_summary_annotation("foo", 1)
-        summ_id_2 = dp_manager.set_summary_annotation("bak", 2, annotation_id=ann_id)
+        summ_id_1 = dp_manager.set_summary_annotation("foo", "foo", 1)
+        summ_id_2 = dp_manager.set_summary_annotation("bak", "bak", 2, annotation_id=ann_id)
         ann = dp_manager.datapoint.get_annotation(annotation_ids=ann_id)
 
         # Assert
diff --git a/tests/pipe/test_tokenclass.py b/tests/pipe/test_lm.py
similarity index 50%
rename from tests/pipe/test_tokenclass.py
rename to tests/pipe/test_lm.py
index 56283cbd..a8125c3f 100644
--- a/tests/pipe/test_tokenclass.py
+++ b/tests/pipe/test_lm.py
@@ -26,14 +26,18 @@
 from pytest import mark
 
 from deepdoctection.datapoint import Image
-from deepdoctection.extern.base import TokenClassResult
-from deepdoctection.mapper.laylmstruct import image_to_layoutlm
-from deepdoctection.pipe import LMTokenClassifierService
+from deepdoctection.extern.base import SequenceClassResult, TokenClassResult
+from deepdoctection.mapper.laylmstruct import image_to_layoutlm, image_to_layoutlm_features
+from deepdoctection.pipe import LMSequenceClassifierService, LMTokenClassifierService
 from deepdoctection.utils.detection_types import JsonDict
+from deepdoctection.utils.file_utils import transformers_available
 from deepdoctection.utils.settings import names
 
+if transformers_available():
+    from transformers import LayoutLMTokenizerFast
 
-class TestLMTokenClassifierService:  # pylint: disable=R0903
+
+class TestLMTokenClassifierService:
     """
     Test LMTokenClassifierService
     """
@@ -65,6 +69,7 @@ def test_pass_datapoint(
         tokenizer.cls_token_id = 101
         tokenizer.sep_token_id = 102
         tokenizer.pad_token_id = 0
+        tokenizer.max_model_input_sizes = {"microsoft/layoutlm-base-uncased": 512}
 
         lm = MagicMock()  # pylint: disable=C0103
         lm.predict = MagicMock(return_value=token_class_result)
@@ -91,3 +96,74 @@ def test_pass_datapoint(
         words = dp.get_annotation(annotation_ids="f8227d59-ea7f-342a-97fa-23df1f189762")
         assert words[0].get_sub_category(names.C.SE).category_name == "FOO"
         assert words[0].get_sub_category(names.NER.TAG).category_name == "I"
+
+    @staticmethod
+    @mark.requires_pt
+    def test_pass_datapoint_2(
+        dp_image_with_layout_and_word_annotations: Image,
+        token_class_result: List[TokenClassResult],
+    ) -> None:
+        """
+        Testing pass_datapoint with new mapping functions and fast tokenizer
+        """
+
+        # Arrange
+        tokenizer_fast = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
+
+        language_model = MagicMock()
+        language_model.predict = MagicMock(return_value=token_class_result)
+        lm_service = LMTokenClassifierService(tokenizer_fast, language_model, image_to_layoutlm_features)
+
+        dp = dp_image_with_layout_and_word_annotations
+
+        # Act
+        dp = lm_service.pass_datapoint(dp)
+
+        # Assert
+        words = dp.get_annotation(annotation_ids="3a696daf-15d5-3b88-be63-02912ef35cfb")
+        assert words[0].get_sub_category(names.C.SE).category_name == "FOO"
+        assert words[0].get_sub_category(names.NER.TAG).category_name == "B"
+
+        words = dp.get_annotation(annotation_ids="37d79fd7-ab87-30fe-b460-9b6e62e901b9")
+        assert words[0].get_sub_category(names.C.SE).category_name == "FOO"
+        assert words[0].get_sub_category(names.NER.TAG).category_name == "B"
+
+        words = dp.get_annotation(annotation_ids="5d40236e-430c-3d56-a8a3-fe9e46b872ac")
+        assert words[0].get_sub_category(names.C.SE).category_name == "FOO"
+        assert words[0].get_sub_category(names.NER.TAG).category_name == "I"
+
+        words = dp.get_annotation(annotation_ids="f8227d59-ea7f-342a-97fa-23df1f189762")
+        assert words[0].get_sub_category(names.C.SE).category_name == "FOO"
+        assert words[0].get_sub_category(names.NER.TAG).category_name == "I"
+
+
+class TestLMSequenceClassifierService:  # pylint: disable=R0903
+    """
+    Test LMSequenceClassifierService
+    """
+
+    @staticmethod
+    @mark.requires_pt
+    def test_pass_datapoint(
+        dp_image_with_layout_and_word_annotations: Image,
+        sequence_class_result: SequenceClassResult,
+    ) -> None:
+        """
+        Testing pass_datapoint
+        """
+
+        # Arrange
+        tokenizer_fast = LayoutLMTokenizerFast.from_pretrained("microsoft/layoutlm-base-uncased")
+
+        language_model = MagicMock()
+        language_model.predict = MagicMock(return_value=sequence_class_result)
+        lm_service = LMSequenceClassifierService(tokenizer_fast, language_model, image_to_layoutlm_features)
+
+        dp = dp_image_with_layout_and_word_annotations
+
+        # Act
+        dp = lm_service.pass_datapoint(dp)
+        assert dp.summary is not None
+
+        # Assert
+        assert dp.summary.get_sub_category(names.C.DOC).category_name == "FOO"
diff --git a/tests/pipe/test_registry.py b/tests/pipe/test_registry.py
index 97c2e58c..2e09fd32 100644
--- a/tests/pipe/test_registry.py
+++ b/tests/pipe/test_registry.py
@@ -28,7 +28,7 @@ def test_pipe_registry_has_all_build_in_pipe_component_registered() -> None:
     """
     test pipe registry has all pipeline components registered
     """
-    assert len(pipeline_component_registry.get_all()) == 11
+    assert len(pipeline_component_registry.get_all()) == 12
 
 
 def test_pipe_registry_registered_new_pipeline_component() -> None:
diff --git a/tests/test_objects/test_file.txt b/tests/test_objects/test_file.txt
new file mode 100644
index 00000000..dd9825ec
--- /dev/null
+++ b/tests/test_objects/test_file.txt
@@ -0,0 +1,5 @@
+imagesg/g/t/h/gth35e00/2024525661.tif 11
+imagesi/i/y/k/iyk38c00/512015827+-5827.tif 0
+imagesr/r/r/e/rre21e00/87103403.tif 0
+imagesk/k/s/u/ksu44c00/03636607.tif 4
+imagesr/r/a/i/rai09d00/50437856-7857.tif 14
diff --git a/tests/test_objects/test_image.jsonl b/tests/test_objects/test_image.jsonl
new file mode 100644
index 00000000..9c1c6335
--- /dev/null
+++ b/tests/test_objects/test_image.jsonl
@@ -0,0 +1,1 @@
+{"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": null, "_image_id": "f180e66e-4c37-368e-9131-78d822b284e3", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 754.0, "lry": 1000.0}, "embeddings": {"f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 754.0, "lry": 1000.0}}, "annotations": [{"active": true, "external_id": null, "_annotation_id": "171cdce6-9adb-312a-84f6-5df77ee0bfd2", "category_name": "WORD", "category_id": "1", "score": 0.6643143892288208, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "75c56dda-cfb6-3551-bf9c-64421d618728", "category_name": "CHARS", "category_id": "None", "score": 0.9991207718849182, "sub_categories": {}, "relationships": {}, "value": "Crouse"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2626953125, "uly": 0.6396484375, "lrx": 0.3330078125, "lry": 0.654296875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "171cdce6-9adb-312a-84f6-5df77ee0bfd2", "_image_id": "171cdce6-9adb-312a-84f6-5df77ee0bfd2", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 53.015625, "lry": 14.6484375}, "embeddings": {"171cdce6-9adb-312a-84f6-5df77ee0bfd2": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 53.015625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2626953125, "uly": 0.6396484375, "lrx": 0.3330078125, "lry": 0.654296875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "0562a9a0-4daf-3d7b-be5a-43afc9686847", "category_name": "WORD", "category_id": "1", "score": 0.6705665588378906, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "f7cc34c8-f5d9-36fe-af58-448ca80ec150", "category_name": "CHARS", "category_id": "None", "score": 0.58823162317276, "sub_categories": {}, "relationships": {}, "value": "W."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2275390625, "uly": 0.638671875, "lrx": 0.2548828125, "lry": 0.654296875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "0562a9a0-4daf-3d7b-be5a-43afc9686847", "_image_id": "0562a9a0-4daf-3d7b-be5a-43afc9686847", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 20.6171875, "lry": 15.625}, "embeddings": {"0562a9a0-4daf-3d7b-be5a-43afc9686847": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 20.6171875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2275390625, "uly": 0.638671875, "lrx": 0.2548828125, "lry": 0.654296875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "ef2b9aa7-0854-302b-a2b0-33bb8235a8bf", "category_name": "WORD", "category_id": "1", "score": 0.6328416466712952, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "a613ea7b-e3d0-3e4a-a3c6-be123c7e1e25", "category_name": "CHARS", "category_id": "None", "score": 0.9980077147483826, "sub_categories": {}, "relationships": {}, "value": "E."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.1953125, "uly": 0.638671875, "lrx": 0.2236328125, "lry": 0.654296875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "ef2b9aa7-0854-302b-a2b0-33bb8235a8bf", "_image_id": "ef2b9aa7-0854-302b-a2b0-33bb8235a8bf", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "embeddings": {"ef2b9aa7-0854-302b-a2b0-33bb8235a8bf": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.1953125, "uly": 0.638671875, "lrx": 0.2236328125, "lry": 0.654296875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a7992194-732b-37b9-b09e-219c5087db3e", "category_name": "WORD", "category_id": "1", "score": 0.7367424964904785, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "e008f534-cd7a-33fb-9bd6-9b23c8501c24", "category_name": "CHARS", "category_id": "None", "score": 0.9888089299201965, "sub_categories": {}, "relationships": {}, "value": "Xc:"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.140625, "uly": 0.638671875, "lrx": 0.1787109375, "lry": 0.6533203125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a7992194-732b-37b9-b09e-219c5087db3e", "_image_id": "a7992194-732b-37b9-b09e-219c5087db3e", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 28.716796875, "lry": 14.6484375}, "embeddings": {"a7992194-732b-37b9-b09e-219c5087db3e": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 28.716796875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.140625, "uly": 0.638671875, "lrx": 0.1787109375, "lry": 0.6533203125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a8995ddf-442e-312f-97c3-8737433e9816", "category_name": "WORD", "category_id": "1", "score": 0.7324050664901733, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "65ce2436-cfd2-3c54-8647-0a1b3e04d8aa", "category_name": "CHARS", "category_id": "None", "score": 0.9985639452934265, "sub_categories": {}, "relationships": {}, "value": "/tb:1"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.1435546875, "uly": 0.611328125, "lrx": 0.2001953125, "lry": 0.6259765625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a8995ddf-442e-312f-97c3-8737433e9816", "_image_id": "a8995ddf-442e-312f-97c3-8737433e9816", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 42.70703125, "lry": 14.6484375}, "embeddings": {"a8995ddf-442e-312f-97c3-8737433e9816": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 42.70703125, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.1435546875, "uly": 0.611328125, "lrx": 0.2001953125, "lry": 0.6259765625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "169d463b-a8e9-358d-ac3a-831259b80533", "category_name": "WORD", "category_id": "1", "score": 0.6886751055717468, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "06ac6de1-473e-3cc0-801e-c2d5f41de63f", "category_name": "CHARS", "category_id": "None", "score": 0.9997110962867737, "sub_categories": {}, "relationships": {}, "value": "Deaton"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6953125, "uly": 0.5869140625, "lrx": 0.765625, "lry": 0.6015625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "169d463b-a8e9-358d-ac3a-831259b80533", "_image_id": "169d463b-a8e9-358d-ac3a-831259b80533", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 53.015625, "lry": 14.6484375}, "embeddings": {"169d463b-a8e9-358d-ac3a-831259b80533": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 53.015625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6953125, "uly": 0.5869140625, "lrx": 0.765625, "lry": 0.6015625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a3191593-bd95-3b6f-b84a-a8c26da4ed4d", "category_name": "WORD", "category_id": "1", "score": 0.5983853936195374, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "b07aabf4-372d-3c62-8261-0836052a5494", "category_name": "CHARS", "category_id": "None", "score": 0.9976556301116943, "sub_categories": {}, "relationships": {}, "value": "P."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6591796875, "uly": 0.5869140625, "lrx": 0.6884765625, "lry": 0.6025390625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a3191593-bd95-3b6f-b84a-a8c26da4ed4d", "_image_id": "a3191593-bd95-3b6f-b84a-a8c26da4ed4d", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.08984375, "lry": 15.625}, "embeddings": {"a3191593-bd95-3b6f-b84a-a8c26da4ed4d": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.08984375, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6591796875, "uly": 0.5869140625, "lrx": 0.6884765625, "lry": 0.6025390625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "2c2767e4-342c-36ff-beb5-5502b1f83828", "category_name": "WORD", "category_id": "1", "score": 0.554156482219696, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5205828b-eee6-3d18-a63b-23cbc02b59aa", "category_name": "CHARS", "category_id": "None", "score": 0.9995524287223816, "sub_categories": {}, "relationships": {}, "value": "A."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6279296875, "uly": 0.5859375, "lrx": 0.6650390625, "lry": 0.6015625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "2c2767e4-342c-36ff-beb5-5502b1f83828", "_image_id": "2c2767e4-342c-36ff-beb5-5502b1f83828", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 15.625}, "embeddings": {"2c2767e4-342c-36ff-beb5-5502b1f83828": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6279296875, "uly": 0.5859375, "lrx": 0.6650390625, "lry": 0.6015625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "e3ca83b3-8b8c-3604-b093-d7f45b351543", "category_name": "WORD", "category_id": "1", "score": 0.6648692488670349, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "72e95f43-5d63-3b0d-9177-1ad848c636d7", "category_name": "CHARS", "category_id": "None", "score": 0.3972274363040924, "sub_categories": {}, "relationships": {}, "value": "Deto"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.705078125, "uly": 0.5615234375, "lrx": 0.876953125, "lry": 0.5927734375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "e3ca83b3-8b8c-3604-b093-d7f45b351543", "_image_id": "e3ca83b3-8b8c-3604-b093-d7f45b351543", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 129.59375, "lry": 31.25}, "embeddings": {"e3ca83b3-8b8c-3604-b093-d7f45b351543": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 129.59375, "lry": 31.25}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.705078125, "uly": 0.5615234375, "lrx": 0.876953125, "lry": 0.5927734375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "db223a4d-df7a-34b1-8355-afabaccf6728", "category_name": "WORD", "category_id": "1", "score": 0.7401073575019836, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "1cfb0ae1-0f91-33fd-9886-ee6a260a05cb", "category_name": "CHARS", "category_id": "None", "score": 0.365085244178772, "sub_categories": {}, "relationships": {}, "value": "Cmulis"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5498046875, "uly": 0.5576171875, "lrx": 0.69921875, "lry": 0.5927734375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "db223a4d-df7a-34b1-8355-afabaccf6728", "_image_id": "db223a4d-df7a-34b1-8355-afabaccf6728", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 112.658203125, "lry": 35.15625}, "embeddings": {"db223a4d-df7a-34b1-8355-afabaccf6728": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 112.658203125, "lry": 35.15625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5498046875, "uly": 0.5576171875, "lrx": 0.69921875, "lry": 0.5927734375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "7209de9a-9059-36f6-89e0-7bb67d7bb05e", "category_name": "WORD", "category_id": "1", "score": 0.7639119029045105, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "ad2d0e2d-b234-382a-9fd8-dabea7f2d4c6", "category_name": "CHARS", "category_id": "None", "score": 0.9985188841819763, "sub_categories": {}, "relationships": {}, "value": "B199."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.59765625, "uly": 0.4931640625, "lrx": 0.6533203125, "lry": 0.5048828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "7209de9a-9059-36f6-89e0-7bb67d7bb05e", "_image_id": "7209de9a-9059-36f6-89e0-7bb67d7bb05e", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 41.970703125, "lry": 11.71875}, "embeddings": {"7209de9a-9059-36f6-89e0-7bb67d7bb05e": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 41.970703125, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.59765625, "uly": 0.4931640625, "lrx": 0.6533203125, "lry": 0.5048828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "c4dbe363-4261-35f9-bc0b-fa63d567acd2", "category_name": "WORD", "category_id": "1", "score": 0.7274430394172668, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "0ea764fc-81b4-3419-9850-18878ef68ed7", "category_name": "CHARS", "category_id": "None", "score": 0.9982366561889648, "sub_categories": {}, "relationships": {}, "value": "B61,"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5419921875, "uly": 0.4912109375, "lrx": 0.587890625, "lry": 0.5068359375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "c4dbe363-4261-35f9-bc0b-fa63d567acd2", "_image_id": "c4dbe363-4261-35f9-bc0b-fa63d567acd2", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 34.607421875, "lry": 15.625}, "embeddings": {"c4dbe363-4261-35f9-bc0b-fa63d567acd2": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 34.607421875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5419921875, "uly": 0.4912109375, "lrx": 0.587890625, "lry": 0.5068359375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "445a4302-a146-3d84-b97c-4259fe63e217", "category_name": "WORD", "category_id": "1", "score": 0.7256461977958679, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "07cea6d5-c026-30ac-96ac-6eabfe7822f2", "category_name": "CHARS", "category_id": "None", "score": 0.9975658655166626, "sub_categories": {}, "relationships": {}, "value": "SOP:"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.4755859375, "uly": 0.4912109375, "lrx": 0.521484375, "lry": 0.505859375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "445a4302-a146-3d84-b97c-4259fe63e217", "_image_id": "445a4302-a146-3d84-b97c-4259fe63e217", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 34.607421875, "lry": 14.6484375}, "embeddings": {"445a4302-a146-3d84-b97c-4259fe63e217": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 34.607421875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.4755859375, "uly": 0.4912109375, "lrx": 0.521484375, "lry": 0.505859375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "d18f47eb-ea93-3915-ae0e-b0657f5825a3", "category_name": "WORD", "category_id": "1", "score": 0.7626551985740662, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "82361754-846f-32d3-927b-aaddf9b17c73", "category_name": "CHARS", "category_id": "None", "score": 0.9996987581253052, "sub_categories": {}, "relationships": {}, "value": "this"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.4208984375, "uly": 0.490234375, "lrx": 0.46875, "lry": 0.5048828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "d18f47eb-ea93-3915-ae0e-b0657f5825a3", "_image_id": "d18f47eb-ea93-3915-ae0e-b0657f5825a3", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 36.080078125, "lry": 14.6484375}, "embeddings": {"d18f47eb-ea93-3915-ae0e-b0657f5825a3": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 36.080078125, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.4208984375, "uly": 0.490234375, "lrx": 0.46875, "lry": 0.5048828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "d7189ec9-6862-322d-820f-b87ed9e723b7", "category_name": "WORD", "category_id": "1", "score": 0.7192268371582031, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "0f4a0488-cb43-30e6-b4dd-1752d30e4ec0", "category_name": "CHARS", "category_id": "None", "score": 0.9998082518577576, "sub_categories": {}, "relationships": {}, "value": "to"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.38671875, "uly": 0.490234375, "lrx": 0.4140625, "lry": 0.505859375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "d7189ec9-6862-322d-820f-b87ed9e723b7", "_image_id": "d7189ec9-6862-322d-820f-b87ed9e723b7", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 20.6171875, "lry": 15.625}, "embeddings": {"d7189ec9-6862-322d-820f-b87ed9e723b7": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 20.6171875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.38671875, "uly": 0.490234375, "lrx": 0.4140625, "lry": 0.505859375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "99f204f9-51c5-30a7-996d-a74eff703078", "category_name": "WORD", "category_id": "1", "score": 0.7118909358978271, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "675167fa-b231-38c5-975f-61d4466a6e29", "category_name": "CHARS", "category_id": "None", "score": 0.9971983432769775, "sub_categories": {}, "relationships": {}, "value": "according"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2783203125, "uly": 0.490234375, "lrx": 0.37890625, "lry": 0.5048828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "99f204f9-51c5-30a7-996d-a74eff703078", "_image_id": "99f204f9-51c5-30a7-996d-a74eff703078", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 75.841796875, "lry": 14.6484375}, "embeddings": {"99f204f9-51c5-30a7-996d-a74eff703078": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 75.841796875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2783203125, "uly": 0.490234375, "lrx": 0.37890625, "lry": 0.5048828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "16b1652c-0134-32a1-a274-8c8479770a4d", "category_name": "WORD", "category_id": "1", "score": 0.709430456161499, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "8631dbaa-dc82-3712-91bd-f0d08728b775", "category_name": "CHARS", "category_id": "None", "score": 0.9981058835983276, "sub_categories": {}, "relationships": {}, "value": "Soluble"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.1884765625, "uly": 0.490234375, "lrx": 0.26953125, "lry": 0.50390625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "16b1652c-0134-32a1-a274-8c8479770a4d", "_image_id": "16b1652c-0134-32a1-a274-8c8479770a4d", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 61.115234375, "lry": 13.671875}, "embeddings": {"16b1652c-0134-32a1-a274-8c8479770a4d": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 61.115234375, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.1884765625, "uly": 0.490234375, "lrx": 0.26953125, "lry": 0.50390625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "2e0f89a9-cc45-3784-b20a-f355cc136a4c", "category_name": "WORD", "category_id": "1", "score": 0.6328796148300171, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "f2915544-c17c-3b1a-baf5-e23b9ca38b36", "category_name": "CHARS", "category_id": "None", "score": 0.9995896220207214, "sub_categories": {}, "relationships": {}, "value": "A."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.1416015625, "uly": 0.4892578125, "lrx": 0.1689453125, "lry": 0.5048828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "2e0f89a9-cc45-3784-b20a-f355cc136a4c", "_image_id": "2e0f89a9-cc45-3784-b20a-f355cc136a4c", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 20.6171875, "lry": 15.625}, "embeddings": {"2e0f89a9-cc45-3784-b20a-f355cc136a4c": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 20.6171875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.1416015625, "uly": 0.4892578125, "lrx": 0.1689453125, "lry": 0.5048828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a365bf35-7a4e-36f9-8871-1411dae640e0", "category_name": "WORD", "category_id": "1", "score": 0.6446238160133362, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "9041399a-bdef-3c94-bc0c-83c6d7736921", "category_name": "CHARS", "category_id": "None", "score": 0.9995706677436829, "sub_categories": {}, "relationships": {}, "value": "follows:"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.43359375, "uly": 0.4638671875, "lrx": 0.5205078125, "lry": 0.478515625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a365bf35-7a4e-36f9-8871-1411dae640e0", "_image_id": "a365bf35-7a4e-36f9-8871-1411dae640e0", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 65.533203125, "lry": 14.6484375}, "embeddings": {"a365bf35-7a4e-36f9-8871-1411dae640e0": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 65.533203125, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.43359375, "uly": 0.4638671875, "lrx": 0.5205078125, "lry": 0.478515625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a8d309ff-5752-360b-94a4-39daf5384ec8", "category_name": "WORD", "category_id": "1", "score": 0.6670494079589844, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "9f72193b-469f-3a2c-a23b-c9cbc1c7a661", "category_name": "CHARS", "category_id": "None", "score": 0.9998764991760254, "sub_categories": {}, "relationships": {}, "value": "as"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3984375, "uly": 0.46484375, "lrx": 0.4248046875, "lry": 0.4775390625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a8d309ff-5752-360b-94a4-39daf5384ec8", "_image_id": "a8d309ff-5752-360b-94a4-39daf5384ec8", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 19.880859375, "lry": 12.6953125}, "embeddings": {"a8d309ff-5752-360b-94a4-39daf5384ec8": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 19.880859375, "lry": 12.6953125}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3984375, "uly": 0.46484375, "lrx": 0.4248046875, "lry": 0.4775390625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "4dff6827-da39-322e-9c53-e17a35f6cf09", "category_name": "WORD", "category_id": "1", "score": 0.7321658134460449, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "59a38c92-b2bd-3cd5-bb1b-c95bec02758a", "category_name": "CHARS", "category_id": "None", "score": 0.9997039437294006, "sub_categories": {}, "relationships": {}, "value": "provided"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.30078125, "uly": 0.4638671875, "lrx": 0.390625, "lry": 0.478515625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "4dff6827-da39-322e-9c53-e17a35f6cf09", "_image_id": "4dff6827-da39-322e-9c53-e17a35f6cf09", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 67.7421875, "lry": 14.6484375}, "embeddings": {"4dff6827-da39-322e-9c53-e17a35f6cf09": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 67.7421875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.30078125, "uly": 0.4638671875, "lrx": 0.390625, "lry": 0.478515625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "699144f8-7cbd-3fbb-a26f-8222e9393760", "category_name": "WORD", "category_id": "1", "score": 0.7502725124359131, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "97e3d8b9-4ca9-3d38-ba1f-df2601b9f01e", "category_name": "CHARS", "category_id": "None", "score": 0.9999415874481201, "sub_categories": {}, "relationships": {}, "value": "are"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.255859375, "uly": 0.46484375, "lrx": 0.2919921875, "lry": 0.4765625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "699144f8-7cbd-3fbb-a26f-8222e9393760", "_image_id": "699144f8-7cbd-3fbb-a26f-8222e9393760", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.244140625, "lry": 11.71875}, "embeddings": {"699144f8-7cbd-3fbb-a26f-8222e9393760": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.244140625, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.255859375, "uly": 0.46484375, "lrx": 0.2919921875, "lry": 0.4765625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "cc808471-897d-38bc-a3e6-aa37e4aa523b", "category_name": "WORD", "category_id": "1", "score": 0.6718360781669617, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "39113956-895e-359e-a87e-e473364a73ab", "category_name": "CHARS", "category_id": "None", "score": 0.999440610408783, "sub_categories": {}, "relationships": {}, "value": "materials"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.14453125, "uly": 0.462890625, "lrx": 0.2470703125, "lry": 0.4765625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "cc808471-897d-38bc-a3e6-aa37e4aa523b", "_image_id": "cc808471-897d-38bc-a3e6-aa37e4aa523b", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 77.314453125, "lry": 13.671875}, "embeddings": {"cc808471-897d-38bc-a3e6-aa37e4aa523b": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 77.314453125, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.14453125, "uly": 0.462890625, "lrx": 0.2470703125, "lry": 0.4765625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "c97f0513-f28c-39c2-9244-a731bf58167c", "category_name": "WORD", "category_id": "1", "score": 0.7508115768432617, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "241301bb-6541-36c2-82d8-237e700e81ca", "category_name": "CHARS", "category_id": "None", "score": 0.999961256980896, "sub_categories": {}, "relationships": {}, "value": "tested"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.744140625, "uly": 0.4541015625, "lrx": 0.810546875, "lry": 0.4658203125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "c97f0513-f28c-39c2-9244-a731bf58167c", "_image_id": "c97f0513-f28c-39c2-9244-a731bf58167c", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 50.0703125, "lry": 11.71875}, "embeddings": {"c97f0513-f28c-39c2-9244-a731bf58167c": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 50.0703125, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.744140625, "uly": 0.4541015625, "lrx": 0.810546875, "lry": 0.4658203125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "cfc9d105-774d-303a-bbdb-d97eb9fc465e", "category_name": "WORD", "category_id": "1", "score": 0.6901625394821167, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "decc9371-076d-32af-9305-1babc604878d", "category_name": "CHARS", "category_id": "None", "score": 0.9947585463523865, "sub_categories": {}, "relationships": {}, "value": "recently"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6435546875, "uly": 0.453125, "lrx": 0.734375, "lry": 0.4677734375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "cfc9d105-774d-303a-bbdb-d97eb9fc465e", "_image_id": "cfc9d105-774d-303a-bbdb-d97eb9fc465e", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 68.478515625, "lry": 14.6484375}, "embeddings": {"cfc9d105-774d-303a-bbdb-d97eb9fc465e": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 68.478515625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6435546875, "uly": 0.453125, "lrx": 0.734375, "lry": 0.4677734375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "d1544e10-f920-3e78-89e7-75fae0c400a9", "category_name": "WORD", "category_id": "1", "score": 0.7074490189552307, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "30face5e-074c-33d1-8465-22bfea80bca0", "category_name": "CHARS", "category_id": "None", "score": 0.9999245405197144, "sub_categories": {}, "relationships": {}, "value": "most"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5869140625, "uly": 0.453125, "lrx": 0.634765625, "lry": 0.46484375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "d1544e10-f920-3e78-89e7-75fae0c400a9", "_image_id": "d1544e10-f920-3e78-89e7-75fae0c400a9", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 36.080078125, "lry": 11.71875}, "embeddings": {"d1544e10-f920-3e78-89e7-75fae0c400a9": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 36.080078125, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5869140625, "uly": 0.453125, "lrx": 0.634765625, "lry": 0.46484375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a81bfa64-322d-373a-8cde-0d2fd6c0b48e", "category_name": "WORD", "category_id": "1", "score": 0.7018741965293884, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "12f549b2-368e-3f9c-961f-1cbe49560d36", "category_name": "CHARS", "category_id": "None", "score": 0.9999845027923584, "sub_categories": {}, "relationships": {}, "value": "the"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.54296875, "uly": 0.451171875, "lrx": 0.580078125, "lry": 0.4658203125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a81bfa64-322d-373a-8cde-0d2fd6c0b48e", "_image_id": "a81bfa64-322d-373a-8cde-0d2fd6c0b48e", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"a81bfa64-322d-373a-8cde-0d2fd6c0b48e": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.54296875, "uly": 0.451171875, "lrx": 0.580078125, "lry": 0.4658203125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a03ef1f6-8447-3bc7-9d50-38ec81579163", "category_name": "WORD", "category_id": "1", "score": 0.7279581427574158, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "09aa330e-8326-3dee-9f88-9a6103c6bf36", "category_name": "CHARS", "category_id": "None", "score": 0.99928218126297, "sub_categories": {}, "relationships": {}, "value": "of"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5078125, "uly": 0.4501953125, "lrx": 0.537109375, "lry": 0.4658203125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a03ef1f6-8447-3bc7-9d50-38ec81579163", "_image_id": "a03ef1f6-8447-3bc7-9d50-38ec81579163", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.08984375, "lry": 15.625}, "embeddings": {"a03ef1f6-8447-3bc7-9d50-38ec81579163": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.08984375, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5078125, "uly": 0.4501953125, "lrx": 0.537109375, "lry": 0.4658203125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "ce6dbede-2eae-3bf5-9314-25db2c6f93dd", "category_name": "WORD", "category_id": "1", "score": 0.6899380683898926, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "ea8f79dc-7543-3894-9aa9-82ad925d713d", "category_name": "CHARS", "category_id": "None", "score": 0.9947904348373413, "sub_categories": {}, "relationships": {}, "value": "solubilities"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3681640625, "uly": 0.4501953125, "lrx": 0.5009765625, "lry": 0.4638671875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "ce6dbede-2eae-3bf5-9314-25db2c6f93dd", "_image_id": "ce6dbede-2eae-3bf5-9314-25db2c6f93dd", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 100.140625, "lry": 13.671875}, "embeddings": {"ce6dbede-2eae-3bf5-9314-25db2c6f93dd": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 100.140625, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3681640625, "uly": 0.4501953125, "lrx": 0.5009765625, "lry": 0.4638671875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "94235144-9eda-31b9-894b-010ea7a345f8", "category_name": "WORD", "category_id": "1", "score": 0.6826481819152832, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "94e33e43-1a93-345d-aff3-22417d37aed1", "category_name": "CHARS", "category_id": "None", "score": 0.9918198585510254, "sub_categories": {}, "relationships": {}, "value": "Dogs,"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.25390625, "uly": 0.44921875, "lrx": 0.3125, "lry": 0.466796875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "94235144-9eda-31b9-894b-010ea7a345f8", "_image_id": "94235144-9eda-31b9-894b-010ea7a345f8", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 44.1796875, "lry": 17.578125}, "embeddings": {"94235144-9eda-31b9-894b-010ea7a345f8": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 44.1796875, "lry": 17.578125}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.25390625, "uly": 0.44921875, "lrx": 0.3125, "lry": 0.466796875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "d02bdccb-4d90-3e52-837c-b9cf42834d69", "category_name": "WORD", "category_id": "1", "score": 0.739314615726471, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "a71d4a7b-aab3-3181-aedc-4e5ce1877489", "category_name": "CHARS", "category_id": "None", "score": 0.9999731779098511, "sub_categories": {}, "relationships": {}, "value": "the"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3212890625, "uly": 0.44921875, "lrx": 0.359375, "lry": 0.4638671875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "d02bdccb-4d90-3e52-837c-b9cf42834d69", "_image_id": "d02bdccb-4d90-3e52-837c-b9cf42834d69", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 28.716796875, "lry": 14.6484375}, "embeddings": {"d02bdccb-4d90-3e52-837c-b9cf42834d69": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 28.716796875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3212890625, "uly": 0.44921875, "lrx": 0.359375, "lry": 0.4638671875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "90d2cc53-8e75-3756-9709-f71adc39a617", "category_name": "WORD", "category_id": "1", "score": 0.7157018184661865, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "b0072bbd-5407-3e93-a15f-0c8d6fe3d172", "category_name": "CHARS", "category_id": "None", "score": 0.9996745586395264, "sub_categories": {}, "relationships": {}, "value": "Beagle"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.177734375, "uly": 0.44921875, "lrx": 0.2470703125, "lry": 0.4638671875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "90d2cc53-8e75-3756-9709-f71adc39a617", "_image_id": "90d2cc53-8e75-3756-9709-f71adc39a617", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 52.279296875, "lry": 14.6484375}, "embeddings": {"90d2cc53-8e75-3756-9709-f71adc39a617": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 52.279296875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.177734375, "uly": 0.44921875, "lrx": 0.2470703125, "lry": 0.4638671875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "c620732b-d577-337d-b1c5-a5380436f58c", "category_name": "WORD", "category_id": "1", "score": 0.6533200144767761, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5df050e9-6a96-37e9-a901-727713431067", "category_name": "CHARS", "category_id": "None", "score": 0.9998477697372437, "sub_categories": {}, "relationships": {}, "value": "in"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.14453125, "uly": 0.447265625, "lrx": 0.173828125, "lry": 0.4638671875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "c620732b-d577-337d-b1c5-a5380436f58c", "_image_id": "c620732b-d577-337d-b1c5-a5380436f58c", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.08984375, "lry": 16.6015625}, "embeddings": {"c620732b-d577-337d-b1c5-a5380436f58c": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.08984375, "lry": 16.6015625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.14453125, "uly": 0.447265625, "lrx": 0.173828125, "lry": 0.4638671875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "5107dabc-9a59-3d41-9627-b8577d964579", "category_name": "WORD", "category_id": "1", "score": 0.7590897083282471, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "593be76f-a0bd-3ba3-909f-d26a2c3ba4df", "category_name": "CHARS", "category_id": "None", "score": 0.9984775185585022, "sub_categories": {}, "relationships": {}, "value": "study"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.798828125, "uly": 0.439453125, "lrx": 0.8564453125, "lry": 0.45703125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "5107dabc-9a59-3d41-9627-b8577d964579", "_image_id": "5107dabc-9a59-3d41-9627-b8577d964579", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 43.443359375, "lry": 17.578125}, "embeddings": {"5107dabc-9a59-3d41-9627-b8577d964579": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 43.443359375, "lry": 17.578125}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.798828125, "uly": 0.439453125, "lrx": 0.8564453125, "lry": 0.45703125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "bf60f899-9ec0-3122-8c6a-bf0a115385be", "category_name": "WORD", "category_id": "1", "score": 0.7585740685462952, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "4b1ad44e-e6a0-33e4-8da5-c04b2a09995a", "category_name": "CHARS", "category_id": "None", "score": 0.9969390630722046, "sub_categories": {}, "relationships": {}, "value": "Effects"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.7099609375, "uly": 0.439453125, "lrx": 0.7900390625, "lry": 0.453125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "bf60f899-9ec0-3122-8c6a-bf0a115385be", "_image_id": "bf60f899-9ec0-3122-8c6a-bf0a115385be", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 60.37890625, "lry": 13.671875}, "embeddings": {"bf60f899-9ec0-3122-8c6a-bf0a115385be": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 60.37890625, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.7099609375, "uly": 0.439453125, "lrx": 0.7900390625, "lry": 0.453125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "0efcb707-ab98-3c8c-ac9a-93abc1df46aa", "category_name": "WORD", "category_id": "1", "score": 0.7114348411560059, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "82cfcd57-d445-36fc-8e2b-b666f49bd20c", "category_name": "CHARS", "category_id": "None", "score": 0.998715877532959, "sub_categories": {}, "relationships": {}, "value": "Respiratory"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.578125, "uly": 0.439453125, "lrx": 0.701171875, "lry": 0.4541015625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "0efcb707-ab98-3c8c-ac9a-93abc1df46aa", "_image_id": "0efcb707-ab98-3c8c-ac9a-93abc1df46aa", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 92.77734375, "lry": 14.6484375}, "embeddings": {"0efcb707-ab98-3c8c-ac9a-93abc1df46aa": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 92.77734375, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.578125, "uly": 0.439453125, "lrx": 0.701171875, "lry": 0.4541015625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "6beafb93-3a41-3c91-9131-7b43ea302641", "category_name": "WORD", "category_id": "1", "score": 0.7293094992637634, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "d36b451c-4dd9-364f-a55e-7ed6d36c8ec7", "category_name": "CHARS", "category_id": "None", "score": 0.9999011754989624, "sub_categories": {}, "relationships": {}, "value": "and"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5322265625, "uly": 0.4375, "lrx": 0.5693359375, "lry": 0.4521484375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "6beafb93-3a41-3c91-9131-7b43ea302641", "_image_id": "6beafb93-3a41-3c91-9131-7b43ea302641", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"6beafb93-3a41-3c91-9131-7b43ea302641": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5322265625, "uly": 0.4375, "lrx": 0.5693359375, "lry": 0.4521484375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "91589274-ea61-33ad-a095-d1aa3fc746ab", "category_name": "WORD", "category_id": "1", "score": 0.6732947826385498, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "40ff1940-3bfe-3b47-a9da-b8fdab474e03", "category_name": "CHARS", "category_id": "None", "score": 0.9005840420722961, "sub_categories": {}, "relationships": {}, "value": "Cardiovascular"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3671875, "uly": 0.4375, "lrx": 0.5234375, "lry": 0.451171875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "91589274-ea61-33ad-a095-d1aa3fc746ab", "_image_id": "91589274-ea61-33ad-a095-d1aa3fc746ab", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 117.8125, "lry": 13.671875}, "embeddings": {"91589274-ea61-33ad-a095-d1aa3fc746ab": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 117.8125, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3671875, "uly": 0.4375, "lrx": 0.5234375, "lry": 0.451171875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "e1dabda6-8688-3e21-b695-e58ff6e86673", "category_name": "WORD", "category_id": "1", "score": 0.7602477073669434, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5221b2d7-5dd8-31f5-8969-4e466d19dbdc", "category_name": "CHARS", "category_id": "None", "score": 0.999769389629364, "sub_categories": {}, "relationships": {}, "value": "Acute"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2998046875, "uly": 0.4375, "lrx": 0.357421875, "lry": 0.44921875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "e1dabda6-8688-3e21-b695-e58ff6e86673", "_image_id": "e1dabda6-8688-3e21-b695-e58ff6e86673", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 43.443359375, "lry": 11.71875}, "embeddings": {"e1dabda6-8688-3e21-b695-e58ff6e86673": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 43.443359375, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2998046875, "uly": 0.4375, "lrx": 0.357421875, "lry": 0.44921875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "952bade3-2982-3c18-94b7-e22aa1577278", "category_name": "WORD", "category_id": "1", "score": 0.7604010701179504, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "ef0b36ab-5e1b-3c22-aa65-71708c692556", "category_name": "CHARS", "category_id": "None", "score": 0.9999402761459351, "sub_categories": {}, "relationships": {}, "value": "for"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.255859375, "uly": 0.435546875, "lrx": 0.29296875, "lry": 0.4501953125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "952bade3-2982-3c18-94b7-e22aa1577278", "_image_id": "952bade3-2982-3c18-94b7-e22aa1577278", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"952bade3-2982-3c18-94b7-e22aa1577278": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.255859375, "uly": 0.435546875, "lrx": 0.29296875, "lry": 0.4501953125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "b0f88e3c-f70e-397a-aa33-a850704d7405", "category_name": "WORD", "category_id": "1", "score": 0.7240009903907776, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "93fd386a-c8bf-3f31-a0d3-2884b5a092f7", "category_name": "CHARS", "category_id": "None", "score": 0.9996585845947266, "sub_categories": {}, "relationships": {}, "value": "Materials"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.14453125, "uly": 0.435546875, "lrx": 0.2470703125, "lry": 0.44921875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "b0f88e3c-f70e-397a-aa33-a850704d7405", "_image_id": "b0f88e3c-f70e-397a-aa33-a850704d7405", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 77.314453125, "lry": 13.671875}, "embeddings": {"b0f88e3c-f70e-397a-aa33-a850704d7405": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 77.314453125, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.14453125, "uly": 0.435546875, "lrx": 0.2470703125, "lry": 0.44921875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "7957ef5c-62e1-3921-aa6e-b4ee915a9b8d", "category_name": "WORD", "category_id": "1", "score": 0.6741301417350769, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "67088f2e-d3f3-3798-ac65-eac882131646", "category_name": "CHARS", "category_id": "None", "score": 0.999180257320404, "sub_categories": {}, "relationships": {}, "value": "Solubility"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6552734375, "uly": 0.42578125, "lrx": 0.767578125, "lry": 0.4404296875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "7957ef5c-62e1-3921-aa6e-b4ee915a9b8d", "_image_id": "7957ef5c-62e1-3921-aa6e-b4ee915a9b8d", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 84.677734375, "lry": 14.6484375}, "embeddings": {"7957ef5c-62e1-3921-aa6e-b4ee915a9b8d": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 84.677734375, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6552734375, "uly": 0.42578125, "lrx": 0.767578125, "lry": 0.4404296875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "c38a3a08-a376-305b-a22b-195748037249", "category_name": "WORD", "category_id": "1", "score": 0.7428425550460815, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "3bc268c8-341f-3564-a731-3a4d875d2be3", "category_name": "CHARS", "category_id": "None", "score": 0.9999431371688843, "sub_categories": {}, "relationships": {}, "value": "of"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.7744140625, "uly": 0.4248046875, "lrx": 0.802734375, "lry": 0.4404296875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "c38a3a08-a376-305b-a22b-195748037249", "_image_id": "c38a3a08-a376-305b-a22b-195748037249", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "embeddings": {"c38a3a08-a376-305b-a22b-195748037249": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.7744140625, "uly": 0.4248046875, "lrx": 0.802734375, "lry": 0.4404296875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "25bcb036-b27b-38e5-a9aa-0dc73e20aeae", "category_name": "WORD", "category_id": "1", "score": 0.7493690848350525, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "6070a370-1a15-3856-88b7-7f8cbf5c26d6", "category_name": "CHARS", "category_id": "None", "score": 0.9999980926513672, "sub_categories": {}, "relationships": {}, "value": "of"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6201171875, "uly": 0.423828125, "lrx": 0.6484375, "lry": 0.439453125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "25bcb036-b27b-38e5-a9aa-0dc73e20aeae", "_image_id": "25bcb036-b27b-38e5-a9aa-0dc73e20aeae", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "embeddings": {"25bcb036-b27b-38e5-a9aa-0dc73e20aeae": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6201171875, "uly": 0.423828125, "lrx": 0.6484375, "lry": 0.439453125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "d1e7a0c1-49e1-35c1-a4e8-85cf551fbbcb", "category_name": "WORD", "category_id": "1", "score": 0.669765293598175, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "3b97b143-6288-320d-94da-10e9f8300a41", "category_name": "CHARS", "category_id": "None", "score": 0.9108487367630005, "sub_categories": {}, "relationships": {}, "value": "Determination"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.4658203125, "uly": 0.423828125, "lrx": 0.6123046875, "lry": 0.4375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "d1e7a0c1-49e1-35c1-a4e8-85cf551fbbcb", "_image_id": "d1e7a0c1-49e1-35c1-a4e8-85cf551fbbcb", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 110.44921875, "lry": 13.671875}, "embeddings": {"d1e7a0c1-49e1-35c1-a4e8-85cf551fbbcb": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 110.44921875, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.4658203125, "uly": 0.423828125, "lrx": 0.6123046875, "lry": 0.4375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a0227aba-87ad-30cb-b6c7-2f89e8b9b495", "category_name": "WORD", "category_id": "1", "score": 0.7577930092811584, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "9040b508-9cde-3e5d-abec-088c67831819", "category_name": "CHARS", "category_id": "None", "score": 0.9998480081558228, "sub_categories": {}, "relationships": {}, "value": "the"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.421875, "uly": 0.4228515625, "lrx": 0.458984375, "lry": 0.4375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a0227aba-87ad-30cb-b6c7-2f89e8b9b495", "_image_id": "a0227aba-87ad-30cb-b6c7-2f89e8b9b495", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"a0227aba-87ad-30cb-b6c7-2f89e8b9b495": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.421875, "uly": 0.4228515625, "lrx": 0.458984375, "lry": 0.4375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "73fd1a53-180b-3f01-b0e2-8a6d9e493cd3", "category_name": "WORD", "category_id": "1", "score": 0.6997153162956238, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "6d7e02b6-9059-399d-ae35-49c7313bf512", "category_name": "CHARS", "category_id": "None", "score": 0.9968010187149048, "sub_categories": {}, "relationships": {}, "value": "SOP"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3330078125, "uly": 0.4228515625, "lrx": 0.3701171875, "lry": 0.4375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "73fd1a53-180b-3f01-b0e2-8a6d9e493cd3", "_image_id": "73fd1a53-180b-3f01-b0e2-8a6d9e493cd3", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"73fd1a53-180b-3f01-b0e2-8a6d9e493cd3": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3330078125, "uly": 0.4228515625, "lrx": 0.3701171875, "lry": 0.4375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "518b519e-f071-346c-9541-18613e097170", "category_name": "WORD", "category_id": "1", "score": 0.6994335651397705, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "6b3c1874-3c8a-3247-b2d0-abb60dbf92cf", "category_name": "CHARS", "category_id": "None", "score": 0.7312585711479187, "sub_categories": {}, "relationships": {}, "value": "for"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.37890625, "uly": 0.421875, "lrx": 0.4150390625, "lry": 0.4375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "518b519e-f071-346c-9541-18613e097170", "_image_id": "518b519e-f071-346c-9541-18613e097170", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.244140625, "lry": 15.625}, "embeddings": {"518b519e-f071-346c-9541-18613e097170": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.244140625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.37890625, "uly": 0.421875, "lrx": 0.4150390625, "lry": 0.4375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "f4c6e559-b696-3c67-8028-e83c87a15f83", "category_name": "WORD", "category_id": "1", "score": 0.7355130314826965, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "3b93ad77-5a52-368a-ad62-20dec4ff7471", "category_name": "CHARS", "category_id": "None", "score": 0.9999716281890869, "sub_categories": {}, "relationships": {}, "value": "the"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2890625, "uly": 0.421875, "lrx": 0.326171875, "lry": 0.4365234375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "f4c6e559-b696-3c67-8028-e83c87a15f83", "_image_id": "f4c6e559-b696-3c67-8028-e83c87a15f83", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"f4c6e559-b696-3c67-8028-e83c87a15f83": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2890625, "uly": 0.421875, "lrx": 0.326171875, "lry": 0.4365234375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "7418c743-ce02-385c-a806-dd2a4bc900e2", "category_name": "WORD", "category_id": "1", "score": 0.6970658302307129, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "939bdfbe-5ff0-3fb3-bb80-d576bdecb384", "category_name": "CHARS", "category_id": "None", "score": 0.9999202489852905, "sub_categories": {}, "relationships": {}, "value": "to"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2548828125, "uly": 0.421875, "lrx": 0.283203125, "lry": 0.4375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "7418c743-ce02-385c-a806-dd2a4bc900e2", "_image_id": "7418c743-ce02-385c-a806-dd2a4bc900e2", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "embeddings": {"7418c743-ce02-385c-a806-dd2a4bc900e2": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2548828125, "uly": 0.421875, "lrx": 0.283203125, "lry": 0.4375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "1223f38e-5ee2-3f3b-834c-21d2d0b2d5a9", "category_name": "WORD", "category_id": "1", "score": 0.6959609389305115, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "c8e5ffa2-eac6-3095-9558-b720aa5c4dfa", "category_name": "CHARS", "category_id": "None", "score": 0.9989150762557983, "sub_categories": {}, "relationships": {}, "value": "According"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.1455078125, "uly": 0.421875, "lrx": 0.2470703125, "lry": 0.4365234375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "1223f38e-5ee2-3f3b-834c-21d2d0b2d5a9", "_image_id": "1223f38e-5ee2-3f3b-834c-21d2d0b2d5a9", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 76.578125, "lry": 14.6484375}, "embeddings": {"1223f38e-5ee2-3f3b-834c-21d2d0b2d5a9": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 76.578125, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.1455078125, "uly": 0.421875, "lrx": 0.2470703125, "lry": 0.4365234375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "1b1df9da-a247-3744-9cc2-8277707a64a5", "category_name": "WORD", "category_id": "1", "score": 0.7987104654312134, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "bf270eb4-d9e6-387f-a2a7-51b28f73d9a8", "category_name": "CHARS", "category_id": "None", "score": 0.9972905516624451, "sub_categories": {}, "relationships": {}, "value": "Respiratory"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2578125, "uly": 0.3828125, "lrx": 0.380859375, "lry": 0.396484375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "1b1df9da-a247-3744-9cc2-8277707a64a5", "_image_id": "1b1df9da-a247-3744-9cc2-8277707a64a5", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 92.77734375, "lry": 13.671875}, "embeddings": {"1b1df9da-a247-3744-9cc2-8277707a64a5": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 92.77734375, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2578125, "uly": 0.3828125, "lrx": 0.380859375, "lry": 0.396484375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "e9c6ad39-fe4a-3afd-8583-65d5e1da64aa", "category_name": "WORD", "category_id": "1", "score": 0.6680575013160706, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "44e6d2fc-bda9-3fdb-9afa-9e348cb3ef46", "category_name": "CHARS", "category_id": "None", "score": 0.9996377229690552, "sub_categories": {}, "relationships": {}, "value": "Studies"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3896484375, "uly": 0.3818359375, "lrx": 0.4697265625, "lry": 0.396484375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "e9c6ad39-fe4a-3afd-8583-65d5e1da64aa", "_image_id": "e9c6ad39-fe4a-3afd-8583-65d5e1da64aa", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 60.37890625, "lry": 14.6484375}, "embeddings": {"e9c6ad39-fe4a-3afd-8583-65d5e1da64aa": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 60.37890625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3896484375, "uly": 0.3818359375, "lrx": 0.4697265625, "lry": 0.396484375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "29485e95-8fc9-3e64-a7f6-09071898ee30", "category_name": "WORD", "category_id": "1", "score": 0.72645103931427, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "07f7bed6-8540-3153-9af3-368a10e707f5", "category_name": "CHARS", "category_id": "None", "score": 0.99930739402771, "sub_categories": {}, "relationships": {}, "value": "and"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.798828125, "uly": 0.37109375, "lrx": 0.8359375, "lry": 0.3857421875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "29485e95-8fc9-3e64-a7f6-09071898ee30", "_image_id": "29485e95-8fc9-3e64-a7f6-09071898ee30", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"29485e95-8fc9-3e64-a7f6-09071898ee30": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.798828125, "uly": 0.37109375, "lrx": 0.8359375, "lry": 0.3857421875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "3a908b6f-c313-3b41-894a-ca5d79ae5a4b", "category_name": "WORD", "category_id": "1", "score": 0.6828686594963074, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "40c3aa7a-f3a1-3994-a347-18c1c56d4845", "category_name": "CHARS", "category_id": "None", "score": 0.9836769104003906, "sub_categories": {}, "relationships": {}, "value": "Cardiovascular"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6337890625, "uly": 0.37109375, "lrx": 0.791015625, "lry": 0.384765625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "3a908b6f-c313-3b41-894a-ca5d79ae5a4b", "_image_id": "3a908b6f-c313-3b41-894a-ca5d79ae5a4b", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 118.548828125, "lry": 13.671875}, "embeddings": {"3a908b6f-c313-3b41-894a-ca5d79ae5a4b": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 118.548828125, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6337890625, "uly": 0.37109375, "lrx": 0.791015625, "lry": 0.384765625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "b6ab0c20-8e89-3756-a75b-5eaf2c660452", "category_name": "WORD", "category_id": "1", "score": 0.7557039856910706, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "2316f6f3-9ea9-3e1a-8741-88a4a70d7312", "category_name": "CHARS", "category_id": "None", "score": 0.9990918636322021, "sub_categories": {}, "relationships": {}, "value": "Acute"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5673828125, "uly": 0.37109375, "lrx": 0.625, "lry": 0.3828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "b6ab0c20-8e89-3756-a75b-5eaf2c660452", "_image_id": "b6ab0c20-8e89-3756-a75b-5eaf2c660452", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 43.443359375, "lry": 11.71875}, "embeddings": {"b6ab0c20-8e89-3756-a75b-5eaf2c660452": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 43.443359375, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5673828125, "uly": 0.37109375, "lrx": 0.625, "lry": 0.3828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "23c3c003-f821-3f0e-92ef-390498e90820", "category_name": "WORD", "category_id": "1", "score": 0.7629852294921875, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5a0593f9-7720-3c16-9b00-624a6887cda6", "category_name": "CHARS", "category_id": "None", "score": 0.9964393973350525, "sub_categories": {}, "relationships": {}, "value": "for"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.5224609375, "uly": 0.369140625, "lrx": 0.5595703125, "lry": 0.3837890625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "23c3c003-f821-3f0e-92ef-390498e90820", "_image_id": "23c3c003-f821-3f0e-92ef-390498e90820", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"23c3c003-f821-3f0e-92ef-390498e90820": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.5224609375, "uly": 0.369140625, "lrx": 0.5595703125, "lry": 0.3837890625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "44d20626-b4b5-328e-aba2-2782dd26ac30", "category_name": "WORD", "category_id": "1", "score": 0.7388620376586914, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "e64d5c29-67b0-32dc-8bed-cea6798f5b29", "category_name": "CHARS", "category_id": "None", "score": 0.9988136291503906, "sub_categories": {}, "relationships": {}, "value": "Materials"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.4111328125, "uly": 0.369140625, "lrx": 0.5146484375, "lry": 0.3828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "44d20626-b4b5-328e-aba2-2782dd26ac30", "_image_id": "44d20626-b4b5-328e-aba2-2782dd26ac30", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 78.05078125, "lry": 13.671875}, "embeddings": {"44d20626-b4b5-328e-aba2-2782dd26ac30": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 78.05078125, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.4111328125, "uly": 0.369140625, "lrx": 0.5146484375, "lry": 0.3828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "edc4a4a5-1982-37d5-a942-e270f704cd4a", "category_name": "WORD", "category_id": "1", "score": 0.7099655270576477, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "dc3af744-e99b-334b-b778-7415a2975fdb", "category_name": "CHARS", "category_id": "None", "score": 0.9998052716255188, "sub_categories": {}, "relationships": {}, "value": "Solubility"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2578125, "uly": 0.3681640625, "lrx": 0.369140625, "lry": 0.3828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "edc4a4a5-1982-37d5-a942-e270f704cd4a", "_image_id": "edc4a4a5-1982-37d5-a942-e270f704cd4a", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 83.94140625, "lry": 14.6484375}, "embeddings": {"edc4a4a5-1982-37d5-a942-e270f704cd4a": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 83.94140625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2578125, "uly": 0.3681640625, "lrx": 0.369140625, "lry": 0.3828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "2e0c0300-ee3b-3dda-901a-f8c5e1f2743e", "category_name": "WORD", "category_id": "1", "score": 0.7255033850669861, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "825d52b0-fba5-3184-91c1-b19b3c0949d6", "category_name": "CHARS", "category_id": "None", "score": 0.9999916553497314, "sub_categories": {}, "relationships": {}, "value": "of"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.376953125, "uly": 0.3671875, "lrx": 0.4052734375, "lry": 0.3828125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "2e0c0300-ee3b-3dda-901a-f8c5e1f2743e", "_image_id": "2e0c0300-ee3b-3dda-901a-f8c5e1f2743e", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "embeddings": {"2e0c0300-ee3b-3dda-901a-f8c5e1f2743e": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 21.353515625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.376953125, "uly": 0.3671875, "lrx": 0.4052734375, "lry": 0.3828125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "0e35658d-42cd-3922-a37d-b078828704cf", "category_name": "WORD", "category_id": "1", "score": 0.7275509238243103, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5b6d1b95-3b15-3fbb-b987-8e313b38638a", "category_name": "CHARS", "category_id": "None", "score": 0.736982524394989, "sub_categories": {}, "relationships": {}, "value": "SUBJECT:"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.146484375, "uly": 0.3671875, "lrx": 0.2353515625, "lry": 0.380859375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "0e35658d-42cd-3922-a37d-b078828704cf", "_image_id": "0e35658d-42cd-3922-a37d-b078828704cf", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 67.005859375, "lry": 13.671875}, "embeddings": {"0e35658d-42cd-3922-a37d-b078828704cf": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 67.005859375, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.146484375, "uly": 0.3671875, "lrx": 0.2353515625, "lry": 0.380859375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "33a44ff3-7e30-3089-a612-e3f8e535b5e0", "category_name": "WORD", "category_id": "1", "score": 0.6663978695869446, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "3f75c4ee-dc1b-3464-83e5-20807e82b0f9", "category_name": "CHARS", "category_id": "None", "score": 0.9999006986618042, "sub_categories": {}, "relationships": {}, "value": "Deaton"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3232421875, "uly": 0.3408203125, "lrx": 0.392578125, "lry": 0.35546875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "33a44ff3-7e30-3089-a612-e3f8e535b5e0", "_image_id": "33a44ff3-7e30-3089-a612-e3f8e535b5e0", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 52.279296875, "lry": 14.6484375}, "embeddings": {"33a44ff3-7e30-3089-a612-e3f8e535b5e0": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 52.279296875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3232421875, "uly": 0.3408203125, "lrx": 0.392578125, "lry": 0.35546875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "40d18977-8cfe-35de-8a41-8be2e7dba3cd", "category_name": "WORD", "category_id": "1", "score": 0.6031368970870972, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5df1b6f3-2f46-3317-b3df-6e1587c74995", "category_name": "CHARS", "category_id": "None", "score": 0.9960397481918335, "sub_categories": {}, "relationships": {}, "value": "P."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2890625, "uly": 0.33984375, "lrx": 0.3193359375, "lry": 0.35546875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "40d18977-8cfe-35de-8a41-8be2e7dba3cd", "_image_id": "40d18977-8cfe-35de-8a41-8be2e7dba3cd", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.826171875, "lry": 15.625}, "embeddings": {"40d18977-8cfe-35de-8a41-8be2e7dba3cd": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 22.826171875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2890625, "uly": 0.33984375, "lrx": 0.3193359375, "lry": 0.35546875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "8457577b-e55a-373d-b14a-30e171474a8b", "category_name": "WORD", "category_id": "1", "score": 0.5911276340484619, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "69e09651-ed62-3275-bb4b-d1d7f84e86ac", "category_name": "CHARS", "category_id": "None", "score": 0.9975519776344299, "sub_categories": {}, "relationships": {}, "value": "A."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2548828125, "uly": 0.33984375, "lrx": 0.2861328125, "lry": 0.35546875}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "8457577b-e55a-373d-b14a-30e171474a8b", "_image_id": "8457577b-e55a-373d-b14a-30e171474a8b", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 23.5625, "lry": 15.625}, "embeddings": {"8457577b-e55a-373d-b14a-30e171474a8b": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 23.5625, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2548828125, "uly": 0.33984375, "lrx": 0.2861328125, "lry": 0.35546875}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "3540b828-b375-338b-8f92-dc23a73f5224", "category_name": "WORD", "category_id": "1", "score": 0.7674006223678589, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "25087d9a-8841-3bff-8eda-fb7a36cb9e3b", "category_name": "CHARS", "category_id": "None", "score": 0.9244517087936401, "sub_categories": {}, "relationships": {}, "value": "FROM:"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.1474609375, "uly": 0.3408203125, "lrx": 0.2021484375, "lry": 0.3525390625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "3540b828-b375-338b-8f92-dc23a73f5224", "_image_id": "3540b828-b375-338b-8f92-dc23a73f5224", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 41.234375, "lry": 11.71875}, "embeddings": {"3540b828-b375-338b-8f92-dc23a73f5224": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 41.234375, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.1474609375, "uly": 0.3408203125, "lrx": 0.2021484375, "lry": 0.3525390625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "90e13bfa-d4fe-3a7d-8aeb-536726a02e4e", "category_name": "WORD", "category_id": "1", "score": 0.7167056202888489, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "06bfc84d-4403-335f-818e-5fa75f3560f2", "category_name": "CHARS", "category_id": "None", "score": 0.9996497631072998, "sub_categories": {}, "relationships": {}, "value": "Heck"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.3232421875, "uly": 0.3134765625, "lrx": 0.3720703125, "lry": 0.328125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "90e13bfa-d4fe-3a7d-8aeb-536726a02e4e", "_image_id": "90e13bfa-d4fe-3a7d-8aeb-536726a02e4e", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 36.81640625, "lry": 14.6484375}, "embeddings": {"90e13bfa-d4fe-3a7d-8aeb-536726a02e4e": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 36.81640625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.3232421875, "uly": 0.3134765625, "lrx": 0.3720703125, "lry": 0.328125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "83ac436e-c5db-3885-9a01-ca636c5b8452", "category_name": "WORD", "category_id": "1", "score": 0.5055802464485168, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "ac183028-8688-3d5b-9ad7-b6acbd5d52c5", "category_name": "CHARS", "category_id": "None", "score": 0.9982362985610962, "sub_categories": {}, "relationships": {}, "value": "J.D."}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.2548828125, "uly": 0.3115234375, "lrx": 0.322265625, "lry": 0.3291015625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "83ac436e-c5db-3885-9a01-ca636c5b8452", "_image_id": "83ac436e-c5db-3885-9a01-ca636c5b8452", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 50.806640625, "lry": 17.578125}, "embeddings": {"83ac436e-c5db-3885-9a01-ca636c5b8452": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 50.806640625, "lry": 17.578125}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.2548828125, "uly": 0.3115234375, "lrx": 0.322265625, "lry": 0.3291015625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "a24fd63e-1594-35b7-8fc7-9c71dc151c67", "category_name": "WORD", "category_id": "1", "score": 0.679437518119812, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "a8d370b6-d78c-3f1e-806c-1bffc8eb2572", "category_name": "CHARS", "category_id": "None", "score": 0.99770587682724, "sub_categories": {}, "relationships": {}, "value": "TO:"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.146484375, "uly": 0.3125, "lrx": 0.1826171875, "lry": 0.3271484375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "a24fd63e-1594-35b7-8fc7-9c71dc151c67", "_image_id": "a24fd63e-1594-35b7-8fc7-9c71dc151c67", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.244140625, "lry": 14.6484375}, "embeddings": {"a24fd63e-1594-35b7-8fc7-9c71dc151c67": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.244140625, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.146484375, "uly": 0.3125, "lrx": 0.1826171875, "lry": 0.3271484375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "832a2c60-e54d-39d8-ad1a-0c9fbf3a9483", "category_name": "WORD", "category_id": "1", "score": 0.6899117231369019, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "5eb05aa4-82b6-37dd-a367-6faddff9a429", "category_name": "CHARS", "category_id": "None", "score": 0.9132678508758545, "sub_categories": {}, "relationships": {}, "value": "1986"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.7705078125, "uly": 0.208984375, "lrx": 0.8173828125, "lry": 0.220703125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "832a2c60-e54d-39d8-ad1a-0c9fbf3a9483", "_image_id": "832a2c60-e54d-39d8-ad1a-0c9fbf3a9483", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 35.34375, "lry": 11.71875}, "embeddings": {"832a2c60-e54d-39d8-ad1a-0c9fbf3a9483": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 35.34375, "lry": 11.71875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.7705078125, "uly": 0.208984375, "lrx": 0.8173828125, "lry": 0.220703125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "2b103b88-7000-3a08-be1e-8dfb5c87ca9b", "category_name": "WORD", "category_id": "1", "score": 0.5382024049758911, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "7dfe688e-1f25-336d-ab9e-0fe242558d85", "category_name": "CHARS", "category_id": "None", "score": 0.895233690738678, "sub_categories": {}, "relationships": {}, "value": "12,"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.724609375, "uly": 0.2080078125, "lrx": 0.76171875, "lry": 0.22265625}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "2b103b88-7000-3a08-be1e-8dfb5c87ca9b", "_image_id": "2b103b88-7000-3a08-be1e-8dfb5c87ca9b", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "embeddings": {"2b103b88-7000-3a08-be1e-8dfb5c87ca9b": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 27.98046875, "lry": 14.6484375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.724609375, "uly": 0.2080078125, "lrx": 0.76171875, "lry": 0.22265625}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "4f4e76dc-fdb8-39b2-a88e-4835b3ca041c", "category_name": "WORD", "category_id": "1", "score": 0.48803526163101196, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "6872a788-6c8e-3d40-b521-c26812f2073e", "category_name": "CHARS", "category_id": "None", "score": 0.6428122520446777, "sub_categories": {}, "relationships": {}, "value": "May"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.6796875, "uly": 0.2080078125, "lrx": 0.7255859375, "lry": 0.2236328125}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "4f4e76dc-fdb8-39b2-a88e-4835b3ca041c", "_image_id": "4f4e76dc-fdb8-39b2-a88e-4835b3ca041c", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 34.607421875, "lry": 15.625}, "embeddings": {"4f4e76dc-fdb8-39b2-a88e-4835b3ca041c": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 34.607421875, "lry": 15.625}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.6796875, "uly": 0.2080078125, "lrx": 0.7255859375, "lry": 0.2236328125}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "ee4fa580-bf26-3f20-a8c1-855ac064e380", "category_name": "WORD", "category_id": "1", "score": 0.6678696274757385, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "096d4a7e-99da-328f-864c-0a164d4f9f37", "category_name": "CHARS", "category_id": "None", "score": 0.9991685152053833, "sub_categories": {}, "relationships": {}, "value": "MEMORANDUM"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.416015625, "uly": 0.1953125, "lrx": 0.56640625, "lry": 0.208984375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "ee4fa580-bf26-3f20-a8c1-855ac064e380", "_image_id": "ee4fa580-bf26-3f20-a8c1-855ac064e380", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 113.39453125, "lry": 13.671875}, "embeddings": {"ee4fa580-bf26-3f20-a8c1-855ac064e380": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 113.39453125, "lry": 13.671875}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.416015625, "uly": 0.1953125, "lrx": 0.56640625, "lry": 0.208984375}}, "annotations": [], "_annotation_ids": [], "summary": null}}, {"active": true, "external_id": null, "_annotation_id": "32be8e31-920c-3d80-a88a-0cb699a702bf", "category_name": "WORD", "category_id": "1", "score": 0.8320972323417664, "sub_categories": {"CHARS": {"active": true, "external_id": null, "_annotation_id": "391f552d-e403-38ef-9fd7-b0937644f35f", "category_name": "CHARS", "category_id": "None", "score": 0.35414305329322815, "sub_categories": {}, "relationships": {}, "value": "orilland"}}, "relationships": {}, "bounding_box": {"absolute_coords": false, "ulx": 0.4189453125, "uly": 0.150390625, "lrx": 0.5732421875, "lry": 0.177734375}, "image": {"file_name": "80035521.tif", "location": "/home/janis/.cache/deepdoctection/datasets/rvl-cdip/images/imagesq/q/o/c/qoc54c00/80035521.tif", "external_id": "32be8e31-920c-3d80-a88a-0cb699a702bf", "_image_id": "32be8e31-920c-3d80-a88a-0cb699a702bf", "_bbox": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 116.33984375, "lry": 27.34375}, "embeddings": {"32be8e31-920c-3d80-a88a-0cb699a702bf": {"absolute_coords": true, "ulx": 0.0, "uly": 0.0, "lrx": 116.33984375, "lry": 27.34375}, "f180e66e-4c37-368e-9131-78d822b284e3": {"absolute_coords": false, "ulx": 0.4189453125, "uly": 0.150390625, "lrx": 0.5732421875, "lry": 0.177734375}}, "annotations": [], "_annotation_ids": [], "summary": null}}], "_annotation_ids": ["171cdce6-9adb-312a-84f6-5df77ee0bfd2", "0562a9a0-4daf-3d7b-be5a-43afc9686847", "ef2b9aa7-0854-302b-a2b0-33bb8235a8bf", "a7992194-732b-37b9-b09e-219c5087db3e", "a8995ddf-442e-312f-97c3-8737433e9816", "169d463b-a8e9-358d-ac3a-831259b80533", "a3191593-bd95-3b6f-b84a-a8c26da4ed4d", "2c2767e4-342c-36ff-beb5-5502b1f83828", "e3ca83b3-8b8c-3604-b093-d7f45b351543", "db223a4d-df7a-34b1-8355-afabaccf6728", "7209de9a-9059-36f6-89e0-7bb67d7bb05e", "c4dbe363-4261-35f9-bc0b-fa63d567acd2", "445a4302-a146-3d84-b97c-4259fe63e217", "d18f47eb-ea93-3915-ae0e-b0657f5825a3", "d7189ec9-6862-322d-820f-b87ed9e723b7", "99f204f9-51c5-30a7-996d-a74eff703078", "16b1652c-0134-32a1-a274-8c8479770a4d", "2e0f89a9-cc45-3784-b20a-f355cc136a4c", "a365bf35-7a4e-36f9-8871-1411dae640e0", "a8d309ff-5752-360b-94a4-39daf5384ec8", "4dff6827-da39-322e-9c53-e17a35f6cf09", "699144f8-7cbd-3fbb-a26f-8222e9393760", "cc808471-897d-38bc-a3e6-aa37e4aa523b", "c97f0513-f28c-39c2-9244-a731bf58167c", "cfc9d105-774d-303a-bbdb-d97eb9fc465e", "d1544e10-f920-3e78-89e7-75fae0c400a9", "a81bfa64-322d-373a-8cde-0d2fd6c0b48e", "a03ef1f6-8447-3bc7-9d50-38ec81579163", "ce6dbede-2eae-3bf5-9314-25db2c6f93dd", "94235144-9eda-31b9-894b-010ea7a345f8", "d02bdccb-4d90-3e52-837c-b9cf42834d69", "90d2cc53-8e75-3756-9709-f71adc39a617", "c620732b-d577-337d-b1c5-a5380436f58c", "5107dabc-9a59-3d41-9627-b8577d964579", "bf60f899-9ec0-3122-8c6a-bf0a115385be", "0efcb707-ab98-3c8c-ac9a-93abc1df46aa", "6beafb93-3a41-3c91-9131-7b43ea302641", "91589274-ea61-33ad-a095-d1aa3fc746ab", "e1dabda6-8688-3e21-b695-e58ff6e86673", "952bade3-2982-3c18-94b7-e22aa1577278", "b0f88e3c-f70e-397a-aa33-a850704d7405", "7957ef5c-62e1-3921-aa6e-b4ee915a9b8d", "c38a3a08-a376-305b-a22b-195748037249", "25bcb036-b27b-38e5-a9aa-0dc73e20aeae", "d1e7a0c1-49e1-35c1-a4e8-85cf551fbbcb", "a0227aba-87ad-30cb-b6c7-2f89e8b9b495", "73fd1a53-180b-3f01-b0e2-8a6d9e493cd3", "518b519e-f071-346c-9541-18613e097170", "f4c6e559-b696-3c67-8028-e83c87a15f83", "7418c743-ce02-385c-a806-dd2a4bc900e2", "1223f38e-5ee2-3f3b-834c-21d2d0b2d5a9", "1b1df9da-a247-3744-9cc2-8277707a64a5", "e9c6ad39-fe4a-3afd-8583-65d5e1da64aa", "29485e95-8fc9-3e64-a7f6-09071898ee30", "3a908b6f-c313-3b41-894a-ca5d79ae5a4b", "b6ab0c20-8e89-3756-a75b-5eaf2c660452", "23c3c003-f821-3f0e-92ef-390498e90820", "44d20626-b4b5-328e-aba2-2782dd26ac30", "edc4a4a5-1982-37d5-a942-e270f704cd4a", "2e0c0300-ee3b-3dda-901a-f8c5e1f2743e", "0e35658d-42cd-3922-a37d-b078828704cf", "33a44ff3-7e30-3089-a612-e3f8e535b5e0", "40d18977-8cfe-35de-8a41-8be2e7dba3cd", "8457577b-e55a-373d-b14a-30e171474a8b", "3540b828-b375-338b-8f92-dc23a73f5224", "90e13bfa-d4fe-3a7d-8aeb-536726a02e4e", "83ac436e-c5db-3885-9a01-ca636c5b8452", "a24fd63e-1594-35b7-8fc7-9c71dc151c67", "832a2c60-e54d-39d8-ad1a-0c9fbf3a9483", "2b103b88-7000-3a08-be1e-8dfb5c87ca9b", "4f4e76dc-fdb8-39b2-a88e-4835b3ca041c", "ee4fa580-bf26-3f20-a8c1-855ac064e380", "32be8e31-920c-3d80-a88a-0cb699a702bf"], "summary": {"active": true, "external_id": null, "_annotation_id": null, "category_name": "SUMMARY", "category_id": "", "score": null, "sub_categories": {"DOC_CLASS": {"active": true, "external_id": null, "_annotation_id": "9af977e0-2258-3e08-a80e-d3c393074bc7", "category_name": "MEMO", "category_id": "16", "score": null, "sub_categories": {}, "relationships": {}}}, "relationships": {}}}
diff --git a/tests/train/test_tp_frcnn_train.py b/tests/train/test_tp_frcnn_train.py
index d2d5f20a..35afd97b 100644
--- a/tests/train/test_tp_frcnn_train.py
+++ b/tests/train/test_tp_frcnn_train.py
@@ -34,9 +34,6 @@
     from deepdoctection.train.tp_frcnn_train import get_train_dataflow, train_faster_rcnn
 
 
-
-
-
 @mark.requires_tf
 @mark.full
 @patch("deepdoctection.mapper.tpstruct.os.path.isfile", MagicMock(return_value=True))