| 39 | "text_recognition"}; |
| 40 | |
| 41 | void PrintErrorInfo(const std::string &msg, const std::string &main_mode = "") { |
| 42 | auto join_modes = |
| 43 | [](const std::unordered_set<std::string> &modes) -> std::string { |
| 44 | std::string result; |
| 45 | for (const auto &mode : modes) { |
| 46 | result += mode + ", "; |
| 47 | } |
| 48 | if (!result.empty()) { |
| 49 | result.pop_back(); |
| 50 | result.pop_back(); |
| 51 | } |
| 52 | return result; |
| 53 | }; |
| 54 | |
| 55 | std::string pipeline_modes = join_modes(SUPPORT_MODE_PIPELINE); |
| 56 | std::string model_modes = join_modes(SUPPORT_MODE_MODEL); |
| 57 | |
| 58 | INFOE("%s%s", msg.c_str(), |
| 59 | main_mode.empty() ? "" : (": \"" + main_mode + "\"").c_str()); |
| 60 | INFO("=========================================="); |
| 61 | INFO("Supported pipeline : [%s]", pipeline_modes.c_str()); |
| 62 | INFO("Supported model : [%s]", model_modes.c_str()); |
| 63 | INFO("=========================================="); |
| 64 | } |
| 65 | |
| 66 | std::tuple<PaddleOCRParams, DocPreprocessorParams, |
| 67 | DocImgOrientationClassificationParams, TextImageUnwarpingParams, |