diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-27 22:10:14 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-27 22:10:14 +0200 |
commit | 07a5b84b001756b06c6dc0c54f396ea42b11067b (patch) | |
tree | d878d498d7bd4aebab1194e6d9851dc16e0b6b8e | |
parent | eb672fa209d4a34124cce06bd8737164647a2b1b (diff) |
Rename mappings
-rw-r--r-- | text_recognizer/data/iam_lines.py | 2 | ||||
-rw-r--r-- | text_recognizer/data/iam_paragraphs.py | 2 | ||||
-rw-r--r-- | text_recognizer/data/iam_synthetic_paragraphs.py | 2 | ||||
-rw-r--r-- | text_recognizer/data/mappings/base.py (renamed from text_recognizer/data/mappings/base_mapping.py) | 0 | ||||
-rw-r--r-- | text_recognizer/data/mappings/emnist.py (renamed from text_recognizer/data/mappings/emnist_mapping.py) | 2 | ||||
-rw-r--r-- | text_recognizer/data/mappings/word_piece.py (renamed from text_recognizer/data/mappings/word_piece_mapping.py) | 6 |
6 files changed, 6 insertions, 8 deletions
diff --git a/text_recognizer/data/iam_lines.py b/text_recognizer/data/iam_lines.py index efd1cde..672a6f0 100644 --- a/text_recognizer/data/iam_lines.py +++ b/text_recognizer/data/iam_lines.py @@ -20,8 +20,8 @@ from text_recognizer.data.base_dataset import ( split_dataset, ) from text_recognizer.data.iam import IAM -from text_recognizer.data.mappings.emnist_mapping import EmnistMapping from text_recognizer.data.utils import image_utils +from text_recognizer.data.mappings.emnist import EmnistMapping from text_recognizer.data.transforms.load_transform import load_transform_from_file diff --git a/text_recognizer/data/iam_paragraphs.py b/text_recognizer/data/iam_paragraphs.py index 26674e0..033b93e 100644 --- a/text_recognizer/data/iam_paragraphs.py +++ b/text_recognizer/data/iam_paragraphs.py @@ -17,7 +17,7 @@ from text_recognizer.data.base_dataset import ( split_dataset, ) from text_recognizer.data.iam import IAM -from text_recognizer.data.mappings.emnist_mapping import EmnistMapping +from text_recognizer.data.mappings.emnist import EmnistMapping from text_recognizer.data.transforms.load_transform import load_transform_from_file diff --git a/text_recognizer/data/iam_synthetic_paragraphs.py b/text_recognizer/data/iam_synthetic_paragraphs.py index d6fea43..d906399 100644 --- a/text_recognizer/data/iam_synthetic_paragraphs.py +++ b/text_recognizer/data/iam_synthetic_paragraphs.py @@ -25,7 +25,7 @@ from text_recognizer.data.iam_paragraphs import ( NEW_LINE_TOKEN, resize_image, ) -from text_recognizer.data.mappings.emnist_mapping import EmnistMapping +from text_recognizer.data.mappings.emnist import EmnistMapping from text_recognizer.data.transforms.load_transform import load_transform_from_file diff --git a/text_recognizer/data/mappings/base_mapping.py b/text_recognizer/data/mappings/base.py index 572ac95..572ac95 100644 --- a/text_recognizer/data/mappings/base_mapping.py +++ b/text_recognizer/data/mappings/base.py diff --git a/text_recognizer/data/mappings/emnist_mapping.py b/text_recognizer/data/mappings/emnist.py index 3eed3d8..655169e 100644 --- a/text_recognizer/data/mappings/emnist_mapping.py +++ b/text_recognizer/data/mappings/emnist.py @@ -4,8 +4,8 @@ from typing import List, Optional, Set, Union import torch from torch import Tensor -from text_recognizer.data.mappings.base_mapping import AbstractMapping from text_recognizer.data.emnist import emnist_mapping +from text_recognizer.data.mappings.base import AbstractMapping class EmnistMapping(AbstractMapping): diff --git a/text_recognizer/data/mappings/word_piece_mapping.py b/text_recognizer/data/mappings/word_piece.py index f9e4e7a..861c3bd 100644 --- a/text_recognizer/data/mappings/word_piece_mapping.py +++ b/text_recognizer/data/mappings/word_piece.py @@ -1,12 +1,10 @@ """Word piece mapping.""" -from pathlib import Path -from typing import List, Optional, Set, Union +from typing import List, Set, Union -from loguru import logger as log import torch from torch import Tensor -from text_recognizer.data.mappings.emnist_mapping import EmnistMapping +from text_recognizer.data.mappings.emnist import EmnistMapping from text_recognizer.data.utils.iam_preprocessor import Preprocessor |