summaryrefslogtreecommitdiff
path: root/text_recognizer/data/transforms
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-15 21:47:54 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-15 21:47:54 +0200
commit9ce21f569ecac03f15f2ad669fde3dd4a512f8cc (patch)
treee6f5bbf4cfe758788fd6ad3679b714d4ecfad568 /text_recognizer/data/transforms
parenta93dcc5b9c8160a441c5b5f99f2f59264778ef91 (diff)
Format
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