diff --git a/3rdparty/resource/PaddleOCR/det/version.txt b/3rdparty/resource/PaddleOCR/det/version.txt index 3e35e11c98..02c07004e9 100644 --- a/3rdparty/resource/PaddleOCR/det/version.txt +++ b/3rdparty/resource/PaddleOCR/det/version.txt @@ -1 +1 @@ -ch_ppocr_mobile_v2.0_det_prune_infer \ No newline at end of file +ch_PP-OCRv2_det_slim_quant_infer diff --git a/src/MeoAssistant/OcrPack.cpp b/src/MeoAssistant/OcrPack.cpp index 74adeaa821..e8d5136340 100644 --- a/src/MeoAssistant/OcrPack.cpp +++ b/src/MeoAssistant/OcrPack.cpp @@ -61,6 +61,11 @@ std::vector asst::OcrPack::recognize(const cv::Mat image, const std::vector result; std::string log_str_raw; std::string log_str_proc; + +#ifdef ASST_DEBUG + cv::Mat draw = image.clone(); +#endif + for (size_t i = 0; i != size; ++i) { // the box rect like ↓ // 0 - 1 @@ -80,7 +85,9 @@ std::vector asst::OcrPack::recognize(const cv::Mat image, const float score = *(scores + i); TextRect tr{ score, rect, text }; - +#ifdef ASST_DEBUG + cv::rectangle(draw, utils::make_rect(rect), cv::Scalar(0, 0, 255), 2); +#endif log_str_raw += tr.to_string() + ", "; if (!pred || pred(tr)) { log_str_proc += tr.to_string() + ", ";