summaryrefslogtreecommitdiff
path: root/text_recognizer/data/transforms
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/data/transforms')
-rw-r--r--text_recognizer/data/transforms/image.py4
-rw-r--r--text_recognizer/data/transforms/line.py2
-rw-r--r--text_recognizer/data/transforms/paragraph.py1
3 files changed, 3 insertions, 4 deletions
diff --git a/text_recognizer/data/transforms/image.py b/text_recognizer/data/transforms/image.py
index f04b3a0..05c9d94 100644
--- a/text_recognizer/data/transforms/image.py
+++ b/text_recognizer/data/transforms/image.py
@@ -1,7 +1,7 @@
-from PIL import Image
import torch
-from torch import Tensor
import torchvision.transforms as T
+from PIL import Image
+from torch import Tensor
class ImageStem:
diff --git a/text_recognizer/data/transforms/line.py b/text_recognizer/data/transforms/line.py
index 6c38213..e4473eb 100644
--- a/text_recognizer/data/transforms/line.py
+++ b/text_recognizer/data/transforms/line.py
@@ -1,8 +1,8 @@
import random
from typing import Any, Dict
-from PIL import Image
import torchvision.transforms as T
+from PIL import Image
import text_recognizer.metadata.iam_lines as metadata
from text_recognizer.data.transforms.image import ImageStem
diff --git a/text_recognizer/data/transforms/paragraph.py b/text_recognizer/data/transforms/paragraph.py
index b364f91..639bb59 100644
--- a/text_recognizer/data/transforms/paragraph.py
+++ b/text_recognizer/data/transforms/paragraph.py
@@ -4,7 +4,6 @@ import torchvision.transforms as T
import text_recognizer.metadata.iam_paragraphs as metadata
from text_recognizer.data.transforms.image import ImageStem
-
IMAGE_HEIGHT, IMAGE_WIDTH = metadata.IMAGE_HEIGHT, metadata.IMAGE_WIDTH
IMAGE_SHAPE = metadata.IMAGE_SHAPE