Views
No views yet
| Model | mAP(0.5) (%) |
|---|---|
| PP-DocBlockLayout | 95.9 |
1# for CUDA11.8
2python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
3
4# for CUDA12.6
5python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
6
7# for CPU
8python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/python -m pip install paddleocrpaddleocr layout_detection --model_name PP-DocBlockLayout -i https://cdn-uploads.huggingface.co/production/uploads/63d7b8ee07cd1aa3c49a2026/SCL4KLVcaUKkinua_bTec.png1from paddleocr import LayoutDetection
2
3model = LayoutDetection(model_name="PP-DocBlockLayout")
4output = model.predict("SCL4KLVcaUKkinua_bTec.png", batch_size=1, layout_nms=True)
5for res in output:
6 res.print()
7 res.save_to_img(save_path="./output/")
8 res.save_to_json(save_path="./output/res.json"){'res': {'input_path': '/root/.paddlex/predict_input/SCL4KLVcaUKkinua_bTec.png', 'page_index': None, 'boxes': [{'cls_id': 0, 'label': 'Region', 'score': 0.9768685698509216, 'coordinate': [31.313992, 298.04843, 479.92798, 1994.14]}, {'cls_id': 0, 'label': 'Region', 'score': 0.9728955626487732, 'coordinate': [648.478, 1233.5554, 1552.8765, 1992.712]}, {'cls_id': 0, 'label': 'Region', 'score': 0.9725626707077026, 'coordinate': [647.51337, 295.63956, 1550.7095, 1181.5878]}, {'cls_id': 0, 'label': 'Region', 'score': 0.9079533219337463, 'coordinate': [644.75916, 59.31064, 1468.8861, 264.68124]}, {'cls_id': 0, 'label': 'Region', 'score': 0.8413463234901428, 'coordinate': [31.890125, 60.103912, 470.73123, 284.72952]}]}}