From 34bdc8b74e3c6838ec52ccc2f28c9cf8a20d5470 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 10 May 2020 09:04:39 +0200 Subject: [PATCH] Allow line images with larger width Line images can be larger than the old limit, especially when training is made with newspaper lines. Image too large to learn!! Size = 2641x36 Image too large to learn!! Size = 2704x36 Image too large to learn!! Size = 2751x36 Image too large to learn!! Size = 3738x36 Signed-off-by: Stefan Weil --- src/lstm/lstmrecognizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lstm/lstmrecognizer.cpp b/src/lstm/lstmrecognizer.cpp index c7148781..82720d0b 100644 --- a/src/lstm/lstmrecognizer.cpp +++ b/src/lstm/lstmrecognizer.cpp @@ -266,7 +266,7 @@ bool LSTMRecognizer::RecognizeLine(const ImageData& image_data, bool invert, float* scale_factor, NetworkIO* inputs, NetworkIO* outputs) { // Maximum width of image to train on. - const int kMaxImageWidth = 2560; + const int kMaxImageWidth = 4096; // This ensures consistent recognition results. SetRandomSeed(); int min_width = network_->XScaleFactor();