From ab382646b765065e8042a36aedcc9e7f1847f2e7 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Sun, 3 Apr 2022 04:47:49 +0200 Subject: [PATCH] applied black --- image_prediction/redai_adapter/efficient_net_wrapper.py | 1 - image_prediction/redai_adapter/model_wrapper.py | 1 - .../transformers/coordinate/coordinate_transformer.py | 1 - image_prediction/transformer/transformers/coordinate/fitz.py | 1 - image_prediction/transformer/transformers/coordinate/fpdf.py | 1 - .../transformer/transformers/coordinate/pdfnet.py | 1 - image_prediction/utils/pdf_annotation.py | 4 ++-- 7 files changed, 2 insertions(+), 8 deletions(-) diff --git a/image_prediction/redai_adapter/efficient_net_wrapper.py b/image_prediction/redai_adapter/efficient_net_wrapper.py index d35b20c..12a11b0 100644 --- a/image_prediction/redai_adapter/efficient_net_wrapper.py +++ b/image_prediction/redai_adapter/efficient_net_wrapper.py @@ -4,7 +4,6 @@ from image_prediction.redai_adapter.model_wrapper import ModelWrapper class EfficientNetWrapper(ModelWrapper): - def __init__(self, classes, base_weights_path=None, weights_path=None): self.__input_shape = (224, 224, 3) super().__init__(classes=classes, base_weights_path=base_weights_path, weights_path=weights_path) diff --git a/image_prediction/redai_adapter/model_wrapper.py b/image_prediction/redai_adapter/model_wrapper.py index c31f4fa..776931e 100644 --- a/image_prediction/redai_adapter/model_wrapper.py +++ b/image_prediction/redai_adapter/model_wrapper.py @@ -5,7 +5,6 @@ import tensorflow as tf class ModelWrapper(abc.ABC): - def __init__(self, classes, base_weights_path=None, weights_path=None): self.__classes = classes self.model = self.__build(base_weights_path) diff --git a/image_prediction/transformer/transformers/coordinate/coordinate_transformer.py b/image_prediction/transformer/transformers/coordinate/coordinate_transformer.py index d713bf3..d208d87 100644 --- a/image_prediction/transformer/transformers/coordinate/coordinate_transformer.py +++ b/image_prediction/transformer/transformers/coordinate/coordinate_transformer.py @@ -4,7 +4,6 @@ from image_prediction.transformer.transformer import Transformer class CoordinateTransformer(Transformer): - @abc.abstractmethod def _forward(self, metadata): raise NotImplementedError diff --git a/image_prediction/transformer/transformers/coordinate/fitz.py b/image_prediction/transformer/transformers/coordinate/fitz.py index 50c7a36..87b854e 100644 --- a/image_prediction/transformer/transformers/coordinate/fitz.py +++ b/image_prediction/transformer/transformers/coordinate/fitz.py @@ -2,7 +2,6 @@ from image_prediction.transformer.transformers.coordinate.coordinate_transformer class FitzCoordinateTransformer(CoordinateTransformer): - def _forward(self, metadata: dict): """Fitz uses top left corner as origin; we take this as the reference coordinate system.""" return metadata diff --git a/image_prediction/transformer/transformers/coordinate/fpdf.py b/image_prediction/transformer/transformers/coordinate/fpdf.py index ea98ea2..7c5fad6 100644 --- a/image_prediction/transformer/transformers/coordinate/fpdf.py +++ b/image_prediction/transformer/transformers/coordinate/fpdf.py @@ -2,7 +2,6 @@ from image_prediction.transformer.transformers.coordinate.coordinate_transformer class FPDFCoordinateTransformer(CoordinateTransformer): - def _forward(self, metadata: dict): """FPDF uses top left corner as origin; we take this as the reference coordinate system.""" return metadata diff --git a/image_prediction/transformer/transformers/coordinate/pdfnet.py b/image_prediction/transformer/transformers/coordinate/pdfnet.py index 03568c1..72dfeef 100644 --- a/image_prediction/transformer/transformers/coordinate/pdfnet.py +++ b/image_prediction/transformer/transformers/coordinate/pdfnet.py @@ -7,7 +7,6 @@ from image_prediction.transformer.transformers.coordinate.coordinate_transformer class PDFNetCoordinateTransformer(CoordinateTransformer): - def _forward(self, metadata: dict): """PDFNet coordinate system origin is in the bottom left corner.""" y1, y2, page_height = itemgetter(Info.Y1, Info.Y2, Info.PAGE_HEIGHT)(metadata) diff --git a/image_prediction/utils/pdf_annotation.py b/image_prediction/utils/pdf_annotation.py index a463a53..43b8b12 100644 --- a/image_prediction/utils/pdf_annotation.py +++ b/image_prediction/utils/pdf_annotation.py @@ -54,10 +54,10 @@ def annotate_image(doc, image_info): add_note() - def init(): PDFNet.Initialize( - "Knecon AG(en.knecon.swiss):OEM:DDA-R::WL+:AMS(20211029):BECC974307DAB4F34B513BC9B2531B24496F6FCB83CD8AC574358A959730B622FABEF5C7") + "Knecon AG(en.knecon.swiss):OEM:DDA-R::WL+:AMS(20211029):BECC974307DAB4F34B513BC9B2531B24496F6FCB83CD8AC574358A959730B622FABEF5C7" + ) def draw_metadata_box(pdf_path, metadata, store_path):