diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-06-01 23:10:12 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-06-01 23:10:12 +0200 |
| commit | db86cef2d308f58325278061c6aa177a535e7e03 (patch) | |
| tree | a013fa85816337269f9cdc5a8992813fa62d299d /text_recognizer/data/iam.py | |
| parent | b980a281712a5b1ee7ee5bd8f5d4762cd91a070b (diff) | |
Replace attr with attrs
Diffstat (limited to 'text_recognizer/data/iam.py')
| -rw-r--r-- | text_recognizer/data/iam.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/text_recognizer/data/iam.py b/text_recognizer/data/iam.py index 766f3e0..8166863 100644 --- a/text_recognizer/data/iam.py +++ b/text_recognizer/data/iam.py @@ -9,7 +9,7 @@ from typing import Any, Dict, List import xml.etree.ElementTree as ElementTree import zipfile -import attr +from attrs import define, field from boltons.cacheutils import cachedproperty from loguru import logger as log import toml @@ -27,7 +27,7 @@ DOWNSAMPLE_FACTOR = 2 # If images were downsampled, the regions must also be. LINE_REGION_PADDING = 16 # Add this many pixels around the exact coordinates. -@attr.s(auto_attribs=True) +@define(auto_attribs=True) class IAM(BaseDataModule): r"""The IAM Lines dataset. @@ -44,7 +44,7 @@ class IAM(BaseDataModule): contributed to one set only. """ - metadata: Dict = attr.ib(init=False, default=toml.load(METADATA_FILENAME)) + metadata: Dict = field(init=False, default=toml.load(METADATA_FILENAME)) def prepare_data(self) -> None: """Prepares the IAM dataset.""" |