update whl ()

pull/10923/head
andyj 2023-09-15 16:40:39 +08:00 committed by GitHub
parent 23fbdab33e
commit 79fc4c5bef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 11 deletions
ppstructure/recovery

View File

@ -59,7 +59,7 @@ __all__ = [
]
SUPPORT_DET_MODEL = ['DB']
VERSION = '2.7.0.1'
VERSION = '2.7.0.3'
SUPPORT_REC_MODEL = ['CRNN', 'SVTR_LCNet']
BASE_DIR = os.path.expanduser("~/.paddleocr/")
@ -616,7 +616,14 @@ class PaddleOCR(predict_system.TextSystem):
super().__init__(params)
self.page_num = params.page_num
def ocr(self, img, det=True, rec=True, cls=True, bin=False, inv=False, alpha_color=(255, 255, 255)):
def ocr(self,
img,
det=True,
rec=True,
cls=True,
bin=False,
inv=False,
alpha_color=(255, 255, 255)):
"""
OCR with PaddleOCR
args
@ -784,15 +791,13 @@ def main():
img_name = os.path.basename(img_path).split('.')[0]
logger.info('{}{}{}'.format('*' * 10, img_path, '*' * 10))
if args.type == 'ocr':
result = engine.ocr(
img_path,
det=args.det,
rec=args.rec,
cls=args.use_angle_cls,
bin=args.binarize,
inv=args.invert,
alpha_color=args.alphacolor
)
result = engine.ocr(img_path,
det=args.det,
rec=args.rec,
cls=args.use_angle_cls,
bin=args.binarize,
inv=args.invert,
alpha_color=args.alphacolor)
if result is not None:
for idx in range(len(result)):
res = result[idx]

View File

@ -36,6 +36,8 @@ def convert_info_docx(img, res, save_folder, img_name):
flag = 1
for i, region in enumerate(res):
if len(region['res']) == 0:
continue
img_idx = region['img_idx']
if flag == 2 and region['layout'] == 'single':
section = doc.add_section(WD_SECTION.CONTINUOUS)