From 5aca54d438f99bdd7faa4c5738b9869cd67c890c Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Thu, 9 May 2024 18:51:52 +0800 Subject: [PATCH] Fix: Add atomic OCR method on client side --- module/ocr/ocr.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/ocr/ocr.py b/module/ocr/ocr.py index c0faa79be..d245df754 100644 --- a/module/ocr/ocr.py +++ b/module/ocr/ocr.py @@ -87,7 +87,6 @@ class Ocr: """ start_time = time.time() - self.cnocr.set_cand_alphabet(self.alphabet) if direct_ocr: image_list = [self.pre_process(i) for i in image] else: @@ -96,7 +95,7 @@ class Ocr: # This will show the images feed to OCR model # self.cnocr.debug(image_list) - result_list = self.cnocr.ocr_for_single_lines(image_list) + result_list = self.cnocr.atomic_ocr_for_single_lines(image_list, self.alphabet) result_list = [''.join(result) for result in result_list] result_list = [self.after_process(result) for result in result_list] @@ -254,4 +253,3 @@ class Duration(Ocr): class DurationYuv(Duration, OcrYuv): pass -