diff options
Diffstat (limited to 'text_recognizer/data/iam_lines.py')
-rw-r--r-- | text_recognizer/data/iam_lines.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/text_recognizer/data/iam_lines.py b/text_recognizer/data/iam_lines.py index 391075a..78bc8e1 100644 --- a/text_recognizer/data/iam_lines.py +++ b/text_recognizer/data/iam_lines.py @@ -211,7 +211,9 @@ def load_line_crops_and_labels(split: str, data_dirname: Path) -> Tuple[List, Li def get_transform(image_width: int, augment: bool = False) -> transforms.Compose: """Augment with brigthness, sligth rotation, slant, translation, scale, and Gaussian noise.""" - def embed_crop(crop: Image, augment: bool = augment, image_width: int = image_width) -> Image: + def embed_crop( + crop: Image, augment: bool = augment, image_width: int = image_width + ) -> Image: # Crop is PIL.Image of dtype="L" (so value range is [0, 255]) image = Image.new("L", (image_width, IMAGE_HEIGHT)) |