summaryrefslogtreecommitdiff
path: root/text_recognizer/metadata/iam_lines.py
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/metadata/iam_lines.py')
-rw-r--r--text_recognizer/metadata/iam_lines.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/text_recognizer/metadata/iam_lines.py b/text_recognizer/metadata/iam_lines.py
new file mode 100644
index 0000000..73b2a28
--- /dev/null
+++ b/text_recognizer/metadata/iam_lines.py
@@ -0,0 +1,15 @@
+import text_recognizer.metadata.emnist as emnist
+import text_recognizer.metadata.shared as shared
+
+PROCESSED_DATA_DIRNAME = shared.DATA_DIRNAME / "processed" / "iam_lines"
+
+IMAGE_SCALE_FACTOR = 2
+
+CHAR_WIDTH = emnist.INPUT_SHAPE[0] // IMAGE_SCALE_FACTOR # rough estimate
+IMAGE_HEIGHT = 112 // IMAGE_SCALE_FACTOR
+IMAGE_WIDTH = 3072 // IMAGE_SCALE_FACTOR # rounding up IAMLines empirical maximum width
+
+DIMS = (1, IMAGE_HEIGHT, IMAGE_WIDTH)
+OUTPUT_DIMS = (89, 1)
+
+MAPPING = emnist.MAPPING