From 8afa8e1c6e9623b0dea86236da04b2b4173e9443 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 7 Apr 2021 22:12:10 +0200 Subject: Fixed typing and typos, train script load config, reformatted --- text_recognizer/data/iam_paragraphs.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'text_recognizer/data/iam_paragraphs.py') diff --git a/text_recognizer/data/iam_paragraphs.py b/text_recognizer/data/iam_paragraphs.py index 314d458..f588587 100644 --- a/text_recognizer/data/iam_paragraphs.py +++ b/text_recognizer/data/iam_paragraphs.py @@ -161,10 +161,7 @@ def get_dataset_properties() -> Dict: "min": min(_get_property_values("num_lines")), "max": max(_get_property_values("num_lines")), }, - "crop_shape": { - "min": crop_shapes.min(axis=0), - "max": crop_shapes.max(axis=0), - }, + "crop_shape": {"min": crop_shapes.min(axis=0), "max": crop_shapes.max(axis=0),}, "aspect_ratio": { "min": aspect_ratio.min(axis=0), "max": aspect_ratio.max(axis=0), @@ -285,9 +282,7 @@ def get_transform(image_shape: Tuple[int, int], augment: bool) -> transforms.Com ), transforms.ColorJitter(brightness=(0.8, 1.6)), transforms.RandomAffine( - degrees=1, - shear=(-10, 10), - interpolation=InterpolationMode.BILINEAR, + degrees=1, shear=(-10, 10), interpolation=InterpolationMode.BILINEAR, ), ] else: -- cgit v1.2.3-70-g09d2