From 65df6a72b002c4b23d6f2eb545839e157f7f2aa0 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 5 Jun 2022 23:39:11 +0200 Subject: Remove attrs --- text_recognizer/data/iam_lines.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'text_recognizer/data/iam_lines.py') diff --git a/text_recognizer/data/iam_lines.py b/text_recognizer/data/iam_lines.py index 34cf605..5f38f14 100644 --- a/text_recognizer/data/iam_lines.py +++ b/text_recognizer/data/iam_lines.py @@ -7,7 +7,6 @@ import json from pathlib import Path from typing import List, Sequence, Tuple -from attrs import define, field from loguru import logger as log import numpy as np from PIL import Image, ImageFile, ImageOps @@ -35,14 +34,13 @@ MAX_LABEL_LENGTH = 89 MAX_WORD_PIECE_LENGTH = 72 -@define(auto_attribs=True, repr=False) class IAMLines(BaseDataModule): """IAM handwritten lines dataset.""" - dims: Tuple[int, int, int] = field( - init=False, default=(1, IMAGE_HEIGHT, IMAGE_WIDTH) - ) - output_dims: Tuple[int, int] = field(init=False, default=(MAX_LABEL_LENGTH, 1)) + def __init__(self) -> None: + super().__init__() + self.dims = (1, IMAGE_HEIGHT, IMAGE_WIDTH) + self.output_dims = (MAX_LABEL_LENGTH, 1) def prepare_data(self) -> None: """Creates the IAM lines dataset if not existing.""" -- cgit v1.2.3-70-g09d2