summaryrefslogtreecommitdiff
path: root/src/text_recognizer/datasets/iam_paragraphs_dataset.py
diff options
context:
space:
mode:
authoraktersnurra <gustaf.rydholm@gmail.com>2020-09-20 11:47:24 +0200
committeraktersnurra <gustaf.rydholm@gmail.com>2020-09-20 11:47:24 +0200
commit1b3b8073a19f939d18a0bb85247eb0d99284f7cc (patch)
treee74e78230ebb179237c063fecf0b52458ce3aa3e /src/text_recognizer/datasets/iam_paragraphs_dataset.py
parent6137f43c910946301279825e50759a9dd76c6131 (diff)
Bash scripts and some bug fixes.
Diffstat (limited to 'src/text_recognizer/datasets/iam_paragraphs_dataset.py')
-rw-r--r--src/text_recognizer/datasets/iam_paragraphs_dataset.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/text_recognizer/datasets/iam_paragraphs_dataset.py b/src/text_recognizer/datasets/iam_paragraphs_dataset.py
index 4b34bd1..c1e8fe2 100644
--- a/src/text_recognizer/datasets/iam_paragraphs_dataset.py
+++ b/src/text_recognizer/datasets/iam_paragraphs_dataset.py
@@ -266,11 +266,16 @@ def _load_iam_paragraphs() -> None:
@click.option(
"--subsample_fraction",
type=float,
- default=0.0,
+ default=None,
help="The subsampling factor of the dataset.",
)
def main(subsample_fraction: float) -> None:
"""Load dataset and print info."""
+ logger.info("Creating train set...")
+ dataset = IamParagraphsDataset(train=True, subsample_fraction=subsample_fraction)
+ dataset.load_or_generate_data()
+ print(dataset)
+ logger.info("Creating test set...")
dataset = IamParagraphsDataset(subsample_fraction=subsample_fraction)
dataset.load_or_generate_data()
print(dataset)