From 41c3e99fe57874ba1855c893bf47087d474ec6b8 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 25 Oct 2021 22:32:10 +0200 Subject: Updates to configs --- .../datamodule/target_transform/word_piece.yaml | 3 ++ .../target_transform/word_piece_iam.yaml | 3 ++ .../datamodule/target_transform/word_pieces.yaml | 3 -- .../datamodule/transform/barlow_paragraphs.yaml | 46 ++++++++++++++++++++++ 4 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 training/conf/datamodule/target_transform/word_piece.yaml create mode 100644 training/conf/datamodule/target_transform/word_piece_iam.yaml delete mode 100644 training/conf/datamodule/target_transform/word_pieces.yaml create mode 100644 training/conf/datamodule/transform/barlow_paragraphs.yaml (limited to 'training/conf/datamodule') diff --git a/training/conf/datamodule/target_transform/word_piece.yaml b/training/conf/datamodule/target_transform/word_piece.yaml new file mode 100644 index 0000000..bf284fb --- /dev/null +++ b/training/conf/datamodule/target_transform/word_piece.yaml @@ -0,0 +1,3 @@ +word_piece: + _target_: text_recognizer.data.transforms.word_piece.WordPiece + max_len: 451 diff --git a/training/conf/datamodule/target_transform/word_piece_iam.yaml b/training/conf/datamodule/target_transform/word_piece_iam.yaml new file mode 100644 index 0000000..478987c --- /dev/null +++ b/training/conf/datamodule/target_transform/word_piece_iam.yaml @@ -0,0 +1,3 @@ +word_piece: + _target_: text_recognizer.data.transforms.word_piece.WordPiece + max_len: 72 diff --git a/training/conf/datamodule/target_transform/word_pieces.yaml b/training/conf/datamodule/target_transform/word_pieces.yaml deleted file mode 100644 index 8ace2af..0000000 --- a/training/conf/datamodule/target_transform/word_pieces.yaml +++ /dev/null @@ -1,3 +0,0 @@ -word_pieces: - _target_: text_recognizer.data.transforms.word_pieces.WordPieces - max_len: 451 diff --git a/training/conf/datamodule/transform/barlow_paragraphs.yaml b/training/conf/datamodule/transform/barlow_paragraphs.yaml new file mode 100644 index 0000000..5eefce5 --- /dev/null +++ b/training/conf/datamodule/transform/barlow_paragraphs.yaml @@ -0,0 +1,46 @@ + +barlow: + _target_: text_recognizer.data.transforms.barlow.BarlowTransform + prim: + random_crop: + _target_: torchvision.transforms.RandomCrop + size: [576, 640] + padding: null + pad_if_needed: true + fill: 0 + padding_mode: constant + + color_jitter: + _target_: torchvision.transforms.ColorJitter + brightness: [0.8, 1.6] + + random_affine: + _target_: torchvision.transforms.RandomAffine + degrees: 1 + shear: [-10, 10] + interpolation: BILINEAR + + to_tensor: + _target_: torchvision.transforms.ToTensor + + bis: + random_crop: + _target_: torchvision.transforms.RandomCrop + size: [576, 640] + padding: null + pad_if_needed: true + fill: 0 + padding_mode: constant + + color_jitter: + _target_: torchvision.transforms.ColorJitter + brightness: [0.8, 2.0] + + random_affine: + _target_: torchvision.transforms.RandomAffine + degrees: 1 + shear: [-5, 5] + interpolation: BILINEAR + + to_tensor: + _target_: torchvision.transforms.ToTensor -- cgit v1.2.3-70-g09d2