From 8f4aae70b8665ad581762bbc7d6ac9ef04157417 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Sat, 12 Nov 2022 21:01:09 +0100 Subject: [PATCH] lstm.train: allow .box from .raw.png too --- src/ccstruct/boxread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ccstruct/boxread.cpp b/src/ccstruct/boxread.cpp index c7e3ad4da8..11b1ecc202 100644 --- a/src/ccstruct/boxread.cpp +++ b/src/ccstruct/boxread.cpp @@ -43,7 +43,7 @@ static std::string BoxFileName(const char *image_filename) { std::string box_filename = image_filename; size_t length = box_filename.length(); std::string last = (length > 8) ? box_filename.substr(length - 8) : ""; - if (last == ".bin.png" || last == ".nrm.png") { + if (last == ".bin.png" || last == ".nrm.png" || last == ".raw.png") { box_filename.resize(length - 8); } else { size_t lastdot = box_filename.find_last_of('.');