Object Detection
Transformers
ONNX
PaddleOCR
English
Chinese
multilingual
pp_doclayout_v3
PaddlePaddle
image-segmentation
ocr
layout
layout_detection
Instructions to use beclab/PP-DocLayoutV3_onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beclab/PP-DocLayoutV3_onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="beclab/PP-DocLayoutV3_onnx")# Load model directly from transformers import AutoImageProcessor, AutoModelForObjectDetection processor = AutoImageProcessor.from_pretrained("beclab/PP-DocLayoutV3_onnx") model = AutoModelForObjectDetection.from_pretrained("beclab/PP-DocLayoutV3_onnx", device_map="auto") - PaddleOCR
How to use beclab/PP-DocLayoutV3_onnx with PaddleOCR:
# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle # 2. pip install paddleocr from paddleocr import LayoutDetection model = LayoutDetection(model_name="PP-DocLayoutV3_onnx") output = model.predict(input="path/to/image.png", batch_size=1) for res in output: res.print() res.save_to_img(save_path="./output/") res.save_to_json(save_path="./output/res.json") - Notebooks
- Google Colab
- Kaggle
File size: 13,147 Bytes
0c50b2f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | ---
license: apache-2.0
pipeline_tag: object-detection
tags:
- PaddleOCR
- PaddlePaddle
- image-segmentation
- ocr
- layout
- layout_detection
language:
- en
- zh
- multilingual
library_name: transformers
base_model:
- PaddlePaddle/PP-DocLayoutV3
---
<div align="center">
<h1 align="center">
Unified Layout Module for PaddleOCR-VL 1.5/1.6 & GLM-OCR
</h1>
[](https://github.com/PaddlePaddle/PaddleOCR)
[](https://huggingface.co/PaddlePaddle/PP-DocLayoutV3)
[](https://modelscope.cn/models/PaddlePaddle/PP-DocLayoutV3)
[](https://huggingface.co/spaces/PaddlePaddle/PaddleOCR-VL-1.5_Online_Demo)
[](https://modelscope.cn/studios/PaddlePaddle/PaddleOCR-VL-1.5_Online_Demo/summary)
[](https://discord.gg/JPmZXDsEEK)
[](https://x.com/PaddlePaddle)
[](./LICENSE)
**🔥 [Official Website](https://www.paddleocr.com)** |
**📝 [Technical Report](https://arxiv.org/abs/2606.23344)**
</div>
## Introduction
This is the model weights for PP-DocLayoutv3 in safetensors format. Get PaddlePaddle weights at [PP-DocLayoutV3](https://huggingface.co/PaddlePaddle/PP-DocLayoutV3)
**PP-DocLayoutV3 is specifically engineered to handle non-planar document images. It can directly predict multi-point bounding boxes for layout elements—as opposed to standard two-point boxes—and determine logical reading orders for skewed and curved surfaces within a single forward pass, significantly reducing cascading errors.** This model is an essential component of PaddleOCR-VL-1.5, providing crucial layout analysis for the high-precision parsing of various real-world documents in PaddleOCR-VL.
This work has been accepted to ECCV 2026! 🎉
### **Model Architecture**
<div align="center">
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/paddleocr_vl_1_5/PP-DocLayoutV3.png" width="800"/>
</div>
## Model Usage
```python
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForObjectDetection
model_path = "PaddlePaddle/PP-DocLayoutV3_safetensors"
model = AutoModelForObjectDetection.from_pretrained(model_path)
image_processor = AutoImageProcessor.from_pretrained(model_path)
image = Image.open(requests.get("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/layout_demo.jpg", stream=True).raw)
inputs = image_processor(images=image, return_tensors="pt")
outputs = model(**inputs)
results = image_processor.post_process_object_detection(outputs, target_sizes=[image.size[::-1]])
for result in results:
for idx, (score, label_id, box, polygon_points) in enumerate(zip(result["scores"], result["labels"], result["boxes"], result["polygon_points"])):
score, label = score.item(), label_id.item()
box = [round(i, 2) for i in box.tolist()]
print(f"Order {idx + 1}: {model.config.id2label[label]}, score: {score:.2f}, box: {box}, polygon_points: {polygon_points}")
```
## Visualization
### Light Variation
<div align="center">
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/paddleocr_vl_1_5/layout_lighting.jpg" width="800"/>
</div>
### Skewing
<div align="center">
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/paddleocr_vl_1_5/layout_skew.jpg" width="800"/>
</div>
### Screen-photo
<div align="center">
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/paddleocr_vl_1_5/layout_screen.jpg" width="800"/>
</div>
### Curving
<div align="center">
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/paddleocr_vl_1_5/layout_curv.jpg" width="800"/>
</div>
## Citation
If you find PP-DocLayoutV3 helpful, feel free to give us a star and citation.
```bibtex
@misc{cui2026rtdoclayoutrealtimeendtoenddocument,
title={RT-DocLayout: Real-Time End-to-End Document Layout Analysis with Reading Order in the Wild},
author={Cheng Cui and Tingquan Gao and Xueqing Wang and Changda Zhou and Hongen Liu and Ting Sun and Yubo Zhang and Zelun Zhang and Jiaxuan Liu and Manhui Lin and Yue Zhang and Suyin Liang and Yiqing Xiang and Yi Liu},
year={2026},
eprint={2606.23344},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2606.23344},
}
}
``` |