From 8eec5f3d4ce41c2ba30f0f1ab3f506fc3c0dd263 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 18 Sep 2022 18:12:54 +0200 Subject: Formats --- text_recognizer/data/emnist_lines.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'text_recognizer/data/emnist_lines.py') diff --git a/text_recognizer/data/emnist_lines.py b/text_recognizer/data/emnist_lines.py index b33c9e1..c36132e 100644 --- a/text_recognizer/data/emnist_lines.py +++ b/text_recognizer/data/emnist_lines.py @@ -4,23 +4,19 @@ from pathlib import Path from typing import Callable, DefaultDict, List, Optional, Tuple, Type import h5py -from loguru import logger as log import numpy as np import torch -from torch import Tensor import torchvision.transforms as T +from loguru import logger as log +from torch import Tensor -from text_recognizer.data.base_data_module import ( - BaseDataModule, - load_and_print_info, -) +from text_recognizer.data.base_data_module import BaseDataModule, load_and_print_info from text_recognizer.data.base_dataset import BaseDataset, convert_strings_to_labels from text_recognizer.data.emnist import EMNIST from text_recognizer.data.mappings import EmnistMapping from text_recognizer.data.transforms.load_transform import load_transform_from_file from text_recognizer.data.utils.sentence_generator import SentenceGenerator - DATA_DIRNAME = BaseDataModule.data_dirname() / "processed" / "emnist_lines" ESSENTIALS_FILENAME = ( Path(__file__).parents[0].resolve() / "mappings" / "emnist_lines_essentials.json" -- cgit v1.2.3-70-g09d2