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
fix: rename doclayout_yolo.py to doclayoutyolo.py and add visualization method for bounding box results
myhlolicf2b74b030bf
diff --git a/mineru/model/mfd/yolo_v8.py b/mineru/model/mfd/yolo_v8.pyindex ed5d31eb..e5e4558f 100644--- a/mineru/model/mfd/yolo_v8.py+++ b/mineru/model/mfd/yolo_v8.py@@ -86,11 +86,11 @@ class YOLOv8MFDModel:# 使用PIL在图像上画框draw.rectangle([xmin, ymin, xmax, ymax], outline="red", width=2)# 在框旁边画置信度- draw.text((xmax + 10, ymin + 10), f"{res['score']:.2f}", fill="red")+ draw.text((xmax + 10, ymin + 10), f"{res['score']:.2f}", fill="red", font_size=22)return imageif __name__ == '__main__':- image_path = r"C:\Users\zhaoxiaomeng\Downloads\下载1.jpg"+ image_path = r"C:\Users\zhaoxiaomeng\Downloads\screenshot-20250821-192948.png"yolo_v8_mfd_weights = os.path.join(auto_download_and_get_model_root_path(ModelPath.yolo_v8_mfd),ModelPath.yolo_v8_mfd)device = 'cuda'