MCPcopy Create free account
hub / github.com/PaddlePaddle/PaddleOCR / PrintErrorInfo

Function PrintErrorInfo

deploy/cpp_infer/cli.cc:41–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 "text_recognition"};
40
41void 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
66std::tuple<PaddleOCRParams, DocPreprocessorParams,
67 DocImgOrientationClassificationParams, TextImageUnwarpingParams,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected