Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
refactor(ocr): comment out det_count update and update OCR models
myhlolif8323ae07ca3
diff --git a/magic_pdf/model/batch_analyze.py b/magic_pdf/model/batch_analyze.pyindex 163bb8ae..3eca1056 100644--- a/magic_pdf/model/batch_analyze.py+++ b/magic_pdf/model/batch_analyze.py@@ -143,7 +143,8 @@ class BatchAnalyze:if ocr_res:ocr_result_list = get_ocr_result_list(ocr_res, useful_list, ocr_res_list_dict['ocr_enable'], new_image, _lang)ocr_res_list_dict['layout_res'].extend(ocr_result_list)- det_count += len(ocr_res_list_dict['ocr_res_list'])++ # det_count += len(ocr_res_list_dict['ocr_res_list'])# logger.info(f'ocr-det time: {round(time.time()-det_start, 2)}, image num: {det_count}')diff --git a/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml b/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.ymlindex 49fa2ddb..aefbe303 100644--- a/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml+++ b/magic_pdf/model/sub_modules/ocr/paddleocr2pytorch/pytorchocr/utils/resources/models_config.yml@@ -1,8 +1,12 @@lang:- ch:+ ch_lite:det: ch_PP-OCRv3_det_infer.pthrec: ch_PP-OCRv4_rec_infer.pthdict: ppocr_keys_v1.txt+ ch:+ det: ch_PP-OCRv3_det_infer.pth+ rec: ch_PP-OCRv4_rec_server_infer.pth+ dict: ppocr_keys_v1.txten:det: en_PP-OCRv3_det_infer.pthrec: en_PP-OCRv4_rec_infer.pth