diff options
-rw-r--r-- | text_recognizer/data/iam_lines.py | 4 | ||||
-rw-r--r-- | training/conf/datamodule/iam_lines.yaml | 4 | ||||
-rw-r--r-- | training/conf/datamodule/test_transform/lines.yaml (renamed from training/conf/datamodule/test_transform/iam_lines.yaml) | 0 | ||||
-rw-r--r-- | training/conf/datamodule/transform/lines.yaml (renamed from training/conf/datamodule/transform/iam_lines.yaml) | 6 |
4 files changed, 10 insertions, 4 deletions
diff --git a/text_recognizer/data/iam_lines.py b/text_recognizer/data/iam_lines.py index aa5473a..a79c202 100644 --- a/text_recognizer/data/iam_lines.py +++ b/text_recognizer/data/iam_lines.py @@ -211,6 +211,6 @@ def load_line_crops_and_labels(split: str, data_dirname: Path) -> Tuple[List, Li def generate_iam_lines() -> None: """Displays Iam Lines dataset statistics.""" - transform = load_transform_from_file("transform/iam_lines.yaml") - test_transform = load_transform_from_file("test_transform/iam_lines.yaml") + transform = load_transform_from_file("transform/lines.yaml") + test_transform = load_transform_from_file("test_transform/lines.yaml") load_and_print_info(IAMLines(transform=transform, test_transform=test_transform)) diff --git a/training/conf/datamodule/iam_lines.yaml b/training/conf/datamodule/iam_lines.yaml index 36e7093..ce4fa91 100644 --- a/training/conf/datamodule/iam_lines.yaml +++ b/training/conf/datamodule/iam_lines.yaml @@ -3,5 +3,5 @@ batch_size: 8 num_workers: 12 train_fraction: 0.8 pin_memory: false -transform: transform/iam_lines.yaml -test_transform: test_transform/iam_lines.yaml +transform: transform/lines.yaml +test_transform: test_transform/lines.yaml diff --git a/training/conf/datamodule/test_transform/iam_lines.yaml b/training/conf/datamodule/test_transform/lines.yaml index a14ec82..a14ec82 100644 --- a/training/conf/datamodule/test_transform/iam_lines.yaml +++ b/training/conf/datamodule/test_transform/lines.yaml diff --git a/training/conf/datamodule/transform/iam_lines.yaml b/training/conf/datamodule/transform/lines.yaml index 710f6e3..6949a15 100644 --- a/training/conf/datamodule/transform/iam_lines.yaml +++ b/training/conf/datamodule/transform/lines.yaml @@ -13,5 +13,11 @@ random_affine: interpolation: BILINEAR fill: 0 +random_perspective: + _target_: torchvision.transforms.RandomPerspective + distortion_scale: 0.2 + p: 0.5 + fill: 0 + to_tensor: _target_: torchvision.transforms.ToTensor |