summaryrefslogtreecommitdiff
path: root/text_recognizer/data/iam.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-05 23:39:11 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-05 23:39:11 +0200
commit65df6a72b002c4b23d6f2eb545839e157f7f2aa0 (patch)
treed78df1d7143dc9ff9e29afd4fd6bc7490bc79418 /text_recognizer/data/iam.py
parent8bc4b4cab00a2777a748c10fca9b3ee01e32277c (diff)
Remove attrs
Diffstat (limited to 'text_recognizer/data/iam.py')
-rw-r--r--text_recognizer/data/iam.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/text_recognizer/data/iam.py b/text_recognizer/data/iam.py
index 8166863..a4d1d21 100644
--- a/text_recognizer/data/iam.py
+++ b/text_recognizer/data/iam.py
@@ -9,7 +9,6 @@ from typing import Any, Dict, List
import xml.etree.ElementTree as ElementTree
import zipfile
-from attrs import define, field
from boltons.cacheutils import cachedproperty
from loguru import logger as log
import toml
@@ -27,7 +26,6 @@ DOWNSAMPLE_FACTOR = 2 # If images were downsampled, the regions must also be.
LINE_REGION_PADDING = 16 # Add this many pixels around the exact coordinates.
-@define(auto_attribs=True)
class IAM(BaseDataModule):
r"""The IAM Lines dataset.
@@ -44,7 +42,10 @@ class IAM(BaseDataModule):
contributed to one set only.
"""
- metadata: Dict = field(init=False, default=toml.load(METADATA_FILENAME))
+ def __init__(self) -> None:
+ super().__init__()
+
+ self.metadata: Dict = toml.load(METADATA_FILENAME)
def prepare_data(self) -> None:
"""Prepares the IAM dataset."""