From cda03760e9a128208671275b7f2bcf7a495eb00a Mon Sep 17 00:00:00 2001 From: Jules <16029431+jules-ai@users.noreply.github.com> Date: Tue, 22 Apr 2025 19:39:19 +0800 Subject: [PATCH] add full-image box to result --- fastdeploy/vision/ocr/ppocr/ppocr_v2.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/fastdeploy/vision/ocr/ppocr/ppocr_v2.cc b/fastdeploy/vision/ocr/ppocr/ppocr_v2.cc index b4ae7e25f6..5425cc181c 100755 --- a/fastdeploy/vision/ocr/ppocr/ppocr_v2.cc +++ b/fastdeploy/vision/ocr/ppocr/ppocr_v2.cc @@ -129,6 +129,7 @@ bool PPOCRv2::BatchPredict(const std::vector& images, std::vector image_list; if (boxes.size() == 0) { image_list.emplace_back(img); + ocr_result.boxes.emplace_back(std::array{0, 0, img.cols, 0, img.cols, img.rows, 0, img.rows}); }else{ image_list.resize(boxes.size()); for (size_t i_box = 0; i_box < boxes.size(); ++i_box) {