From f53a7eb596ecfce0d36b5f5cb455dad6aff0360b Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 5 Nov 2021 19:23:48 +0100 Subject: Rename iam lines transforms Rename iam lines transform --- training/conf/datamodule/iam_lines.yaml | 4 ++-- .../conf/datamodule/test_transform/iam_lines.yaml | 6 ------ training/conf/datamodule/test_transform/lines.yaml | 6 ++++++ training/conf/datamodule/transform/iam_lines.yaml | 17 ---------------- training/conf/datamodule/transform/lines.yaml | 23 ++++++++++++++++++++++ 5 files changed, 31 insertions(+), 25 deletions(-) delete mode 100644 training/conf/datamodule/test_transform/iam_lines.yaml create mode 100644 training/conf/datamodule/test_transform/lines.yaml delete mode 100644 training/conf/datamodule/transform/iam_lines.yaml create mode 100644 training/conf/datamodule/transform/lines.yaml (limited to 'training/conf') 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/iam_lines.yaml deleted file mode 100644 index a14ec82..0000000 --- a/training/conf/datamodule/test_transform/iam_lines.yaml +++ /dev/null @@ -1,6 +0,0 @@ -embed_crop: - _target_: text_recognizer.data.transforms.embed_crop.EmbedCrop - augment: true - -to_tensor: - _target_: torchvision.transforms.ToTensor diff --git a/training/conf/datamodule/test_transform/lines.yaml b/training/conf/datamodule/test_transform/lines.yaml new file mode 100644 index 0000000..a14ec82 --- /dev/null +++ b/training/conf/datamodule/test_transform/lines.yaml @@ -0,0 +1,6 @@ +embed_crop: + _target_: text_recognizer.data.transforms.embed_crop.EmbedCrop + augment: true + +to_tensor: + _target_: torchvision.transforms.ToTensor diff --git a/training/conf/datamodule/transform/iam_lines.yaml b/training/conf/datamodule/transform/iam_lines.yaml deleted file mode 100644 index 710f6e3..0000000 --- a/training/conf/datamodule/transform/iam_lines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -embed_crop: - _target_: text_recognizer.data.transforms.embed_crop.EmbedCrop - augment: false - -color_jitter: - _target_: torchvision.transforms.ColorJitter - brightness: [0.8, 1.6] - -random_affine: - _target_: torchvision.transforms.RandomAffine - degrees: 1 - shear: [-30, 20] - interpolation: BILINEAR - fill: 0 - -to_tensor: - _target_: torchvision.transforms.ToTensor diff --git a/training/conf/datamodule/transform/lines.yaml b/training/conf/datamodule/transform/lines.yaml new file mode 100644 index 0000000..6949a15 --- /dev/null +++ b/training/conf/datamodule/transform/lines.yaml @@ -0,0 +1,23 @@ +embed_crop: + _target_: text_recognizer.data.transforms.embed_crop.EmbedCrop + augment: false + +color_jitter: + _target_: torchvision.transforms.ColorJitter + brightness: [0.8, 1.6] + +random_affine: + _target_: torchvision.transforms.RandomAffine + degrees: 1 + shear: [-30, 20] + 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 -- cgit v1.2.3-70-g09d2