diff options
author | aktersnurra <gustaf.rydholm@gmail.com> | 2020-09-09 23:31:31 +0200 |
---|---|---|
committer | aktersnurra <gustaf.rydholm@gmail.com> | 2020-09-09 23:31:31 +0200 |
commit | 2b63fd952bdc9c7c72edd501cbcdbf3231e98f00 (patch) | |
tree | 1c0e0898cb8b66faff9e5d410aa1f82d13542f68 /src/text_recognizer/datasets/iam_dataset.py | |
parent | e1b504bca41a9793ed7e88ef14f2e2cbd85724f2 (diff) |
Created an abstract Dataset class for common methods.
Diffstat (limited to 'src/text_recognizer/datasets/iam_dataset.py')
-rw-r--r-- | src/text_recognizer/datasets/iam_dataset.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/text_recognizer/datasets/iam_dataset.py b/src/text_recognizer/datasets/iam_dataset.py index 5e47350..f4a869d 100644 --- a/src/text_recognizer/datasets/iam_dataset.py +++ b/src/text_recognizer/datasets/iam_dataset.py @@ -7,10 +7,8 @@ from boltons.cacheutils import cachedproperty import defusedxml.ElementTree as ET from loguru import logger import toml -from torch.utils.data import Dataset -from text_recognizer.datasets import DATA_DIRNAME -from text_recognizer.datasets.util import _download_raw_dataset +from text_recognizer.datasets.util import _download_raw_dataset, DATA_DIRNAME RAW_DATA_DIRNAME = DATA_DIRNAME / "raw" / "iam" METADATA_FILENAME = RAW_DATA_DIRNAME / "metadata.toml" @@ -20,7 +18,7 @@ DOWNSAMPLE_FACTOR = 2 # If images were downsampled, the regions must also be. LINE_REGION_PADDING = 0 # Add this many pixels around the exact coordinates. -class IamDataset(Dataset): +class IamDataset: """IAM dataset. "The IAM Lines dataset, first published at the ICDAR 1999, contains forms of unconstrained handwritten text, |