diff --git a/CHANGELOG.md b/CHANGELOG.md index 484006f5..4a36cdd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2 + +* adding parameter to table image preprocessor related to the image size + ## 1.0.1 * fix: moving the table transformer model to device when loading the model instead of once the model is loaded. diff --git a/unstructured_inference/__version__.py b/unstructured_inference/__version__.py index abd26d6a..86fbd395 100644 --- a/unstructured_inference/__version__.py +++ b/unstructured_inference/__version__.py @@ -1 +1 @@ -__version__ = "1.0.1" # pragma: no cover +__version__ = "1.0.2" # pragma: no cover diff --git a/unstructured_inference/models/tables.py b/unstructured_inference/models/tables.py index 3308f61d..b9a01226 100644 --- a/unstructured_inference/models/tables.py +++ b/unstructured_inference/models/tables.py @@ -62,6 +62,9 @@ def initialize( """Loads the donut model using the specified parameters""" self.device = device self.feature_extractor = DetrImageProcessor.from_pretrained(model) + # value not set in the configuration and needed for newer models + # https://huggingface.co/microsoft/table-transformer-structure-recognition-v1.1-all/discussions/1 + self.feature_extractor.size["shortest_edge"] = 800 try: logger.info("Loading the table structure model ...")