Fix: Add atomic OCR method on client side

This commit is contained in:
LmeSzinc 2024-05-09 18:51:52 +08:00
parent 4e469098e2
commit 5aca54d438

View File

@ -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