From 39b46ea98092946ff6c437a144b6735b734186c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=B0=8F=E8=92=99?= Date: Fri, 14 Jun 2024 18:16:41 +0800 Subject: [PATCH] update github workflow to Publish to PyPI --- magic_pdf/model/doc_analyze_by_360layout.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 magic_pdf/model/doc_analyze_by_360layout.py diff --git a/magic_pdf/model/doc_analyze_by_360layout.py b/magic_pdf/model/doc_analyze_by_360layout.py new file mode 100644 index 00000000..b333baf5 --- /dev/null +++ b/magic_pdf/model/doc_analyze_by_360layout.py @@ -0,0 +1,8 @@ +from ultralytics import YOLO + +image_path = '' # 待预测图片路径 +model_path = '' # 权重路径 +model = YOLO(model_path) + +result = model(image_path, save=True, conf=0.5, save_crop=False, line_width=2) +print(result) \ No newline at end of file