tesseract
tesseract copied to clipboard
RFC: Info messages to stdout from training utils
https://groups.google.com/g/tesseract-dev/c/OoBUOPZtkrQ
@zdenop, I think your message will be more visible here as an RFC.
Zdenko Podobny Jan 20
I realized that several users did not recognize errors during the training process. IMO part of the problem is that all messages (error and standard output) from training tools are shown in stderr because of tprinf usage.
While this make sense in tesseract executable (OCR process output is sent to stdout, all other messages to stderr), in training we should use different approach: only errors (e.g. that should stop further process) should go to stderr and all other info should go to stdout.
Good example is unicharset_extractor: https://github.com/tesseract-ocr/tesseract/blob/4142b328157fa5acdb5780308ecf308f1c6e2ec7/src/training/unicharset_extractor.cpp#L75-L84 Are you ok with this proposal? This would mean that tprinf will be used for errors, and std::cout/fprintf(stdout for rest...
Zdenko
I prefer to keep using tprint in training and use a prefix (ERROR/WARNING) as suggested by @GerHobbelt.