From 594cc4f4c536bfcbb60b2b4ea2ccfb50548cd5b1 Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Sun, 18 Feb 2024 00:13:45 +0800 Subject: [PATCH] Update jp_ocr.py --- core/ocr/jp_ocr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ocr/jp_ocr.py b/core/ocr/jp_ocr.py index b7da10fe2..c4943ca61 100644 --- a/core/ocr/jp_ocr.py +++ b/core/ocr/jp_ocr.py @@ -41,7 +41,7 @@ def ocr(self, img): lower_right = [int(max_x), int(max_y)] rectangles.append((upper_left, upper_right, lower_right, lower_left)) rectangles.sort(key=lambda x: x[0][1]) - for upper_left, lower_right in rectangles: + for upper_left, upper_right, lower_right, lower_left in rectangles: img_list.append(img[upper_left[1]:lower_right[1], upper_left[0]:lower_right[0]]) res, _ = self.text_recognizer(img_list) res_list = []