lstm.train: allow .box from .raw.png too

This commit is contained in:
Robert Sachunsky 2022-11-12 21:01:09 +01:00 committed by Stefan Weil
parent 78bcc0d84c
commit 8f4aae70b8

View File

@ -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('.');