File size: 19,755 Bytes
1de72e5
 
4a1a271
 
 
 
1a509e9
4a1a271
 
 
1a509e9
4a1a271
 
 
 
1a509e9
1de72e5
4a1a271
1a509e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1dc1ac1
1a509e9
 
 
 
4a1a271
 
 
 
1a509e9
4a1a271
1a509e9
4a1a271
 
1a509e9
4a1a271
 
1a509e9
 
 
 
 
4a1a271
 
1a509e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a1a271
1a509e9
4a1a271
1a509e9
 
4a1a271
1a509e9
4a1a271
1a509e9
4a1a271
1a509e9
 
4a1a271
 
1a509e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a1a271
 
 
1a509e9
 
4a1a271
d77d298
1a509e9
d77d298
4a1a271
d77d298
4a1a271
 
d77d298
4a1a271
 
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
---
license: apache-2.0
pipeline_tag: object-detection
tags:
- PaddleOCR
- PaddlePaddle
- object-detection
- ocr
- layout
- layout_detection
- reading_order
language:
- en
- zh
- multilingual
library_name: PaddleOCR
---

<div align="center">


<h1 align="center">

PP-DocLayoutV4: Layout Analysis Module for PaddleOCR-VL-1.8

</h1>

[![repo](https://img.shields.io/github/stars/PaddlePaddle/PaddleOCR?color=ccf)](https://github.com/PaddlePaddle/PaddleOCR)
[![HuggingFace](https://img.shields.io/badge/HuggingFace-black.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAABYCAMAAACkl9t/AAAAk1BMVEVHcEz/nQv/nQv/nQr/nQv/nQr/nQv/nQv/nQr/wRf/txT/pg7/yRr/rBD/zRz/ngv/oAz/zhz/nwv/txT/ngv/0B3+zBz/nQv/0h7/wxn/vRb/thXkuiT/rxH/pxD/ogzcqyf/nQvTlSz/czCxky7/SjifdjT/Mj3+Mj3wMj15aTnDNz+DSD9RTUBsP0FRO0Q6O0WyIxEIAAAAGHRSTlMADB8zSWF3krDDw8TJ1NbX5efv8ff9/fxKDJ9uAAAGKklEQVR42u2Z63qjOAyGC4RwCOfB2JAGqrSb2WnTw/1f3UaWcSGYNKTdf/P+mOkTrE+yJBulvfvLT2A5ruenaVHyIks33npl/6C4s/ZLAM45SOi/1FtZPyFur1OYofBX3w7d54Bxm+E8db+nDr12ttmESZ4zludJEG5S7TO72YPlKZFyE+YCYUJTBZsMiNS5Sd7NlDmKM2Eg2JQg8awbglfqgbhArjxkS7dgp2RH6hc9AMLdZYUtZN5DJr4molC8BfKrEkPKEnEVjLbgW1fLy77ZVOJagoIcLIl+IxaQZGjiX597HopF5CkaXVMDO9Pyix3AFV3kw4lQLCbHuMovz8FallbcQIJ5Ta0vks9RnolbCK84BtjKRS5uA43hYoZcOBGIG2Epbv6CvFVQ8m8loh66WNySsnN7htL58LNp+NXT8/PhXiBXPMjLSxtwp8W9f/1AngRierBkA+kk/IpUSOeKByzn8y3kAAAfh//0oXgV4roHm/kz4E2z//zRc3/lgwBzbM2mJxQEa5pqgX7d1L0htrhx7LKxOZlKbwcAWyEOWqY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Paz0IGcOvTHvUIlE2+prqAxLSQxZlU2stql1NqCCLdIiIN/i1DBEHUoElM9dBravbiAnKqgpi4IBkw+utSPIoBijDXJipSVV7MpOEJUAc5Qmm3BnUN+w3hteEieYKfRZSIUcXKMVf0u5wD4EwsUNVvZOtUT7A2GkffHjByWpHqvRBYrTV72a6j8zZ6W0DTE86Hn04bmyWX3Ri9WH7ZU6Q7h+ZHo0nHUAcsQvVhXRDZHChwiyi/hnPuOsSEF6Exk3o6Y9DT1eZ+6cASXk2Y9k+6EOQMDGm6WBK10wOQJCBwren86cPPWUcRAnTVjGcU1LBgs9FURiX/e6479yZcLwCBmTxiawEwrOcleuu12t3tbLv/N4RLYIBhYexm7Fcn4OJcn0+zc+s8/VfPeddZHAGN6TT8eGczHdR/Gts1/MzDkThr23zqrVfAMFT33Nx1RJsx1k5zuWILLnG/vsH+Fv5D4NTVcp1Gzo8AAAAAElFTkSuQmCC&labelColor=white)](https://huggingface.co/PaddlePaddle/PP-DocLayoutV4)
[![ModelScope](https://img.shields.io/badge/ModelScope-black?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIzIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCiA8Zz4KICA8dGl0bGU+TGF5ZXIgMTwvdGl0bGU+CiAgPHBhdGggaWQ9InN2Z18xNCIgZmlsbD0iIzYyNGFmZiIgZD0ibTAsODkuODRsMjUuNjUsMGwwLDI1LjY0OTk5bC0yNS42NSwwbDAsLTI1LjY0OTk5eiIvPgogIDxwYXRoIGlkPSJzdmdfMTUiIGZpbGw9IiM2MjRhZmYiIGQ9Im05OS4xNCwxMTUuNDlsMjUuNjUsMGwwLDI1LjY1bC0yNS42NSwwbDAsLTI1LjY1eiIvPgogIDxwYXRoIGlkPSJzdmdfMTYiIGZpbGw9IiM2MjRhZmYiIGQ9Im0xNzYuMDksMTQxLjE0bC0yNS42NDk5OSwwbDAsMjIuMTlsNDc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IuMTksMGwwLDQ3Ljg0bDQ3Ljg0LDBsMCwtMjIuMTlsLTI1LjY1LDBsMCwtMjUuNjV6Ii8+CiA8L2c+Cjwvc3ZnPg==&labelColor=white)](https://modelscope.cn/models/PaddlePaddle/PP-DocLayoutV4)
[![HuggingFace](https://img.shields.io/badge/Demo_on_HuggingFace-black.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAABYCAMAAACkl9t/AAAAk1BMVEVHcEz/nQv/nQv/nQr/nQv/nQr/nQv/nQv/nQr/wRf/txT/pg7/yRr/rBD/zRz/ngv/oAz/zhz/nwv/txT/ngv/0B3+zBz/nQv/0h7/wxn/vRb/thXkuiT/rxH/pxD/ogzcqyf/nQvTlSz/czCxky7/SjifdjT/Mj3+Mj3wMj15aTnDNz+DSD9RTUBsP0FRO0Q6O0WyIxEIAAAAGHRSTlMADB8zSWF3krDDw8TJ1NbX5efv8ff9/fxKDJ9uAAAGKklEQVR42u2Z63qjOAyGC4RwCOfB2JAGqrSb2WnTw/1f3UaWcSGYNKTdf/P+mOkTrE+yJBulvfvLT2A5ruenaVHyIks33npl/6C4s/ZLAM45SOi/1FtZPyFur1OYofBX3w7d54Bxm+E8db+nDr12ttmESZ4zludJEG5S7TO72YPlKZFyE+YCYUJTBZsMiNS5Sd7NlDmKM2Eg2JQg8awbglfqgbhArjxkS7dgp2RH6hc9AMLdZYUtZN5DJr4molC8BfKrEkPKEnEVjLbgW1fLy77ZVOJagoIcLIl+IxaQZGjiX597HopF5CkaXVMDO9Pyix3AFV3kw4lQLCbHuMovz8FallbcQIJ5Ta0vks9RnolbCK84BtjKRS5uA43hYoZcOBGIG2Epbv6CvFVQ8m8loh66WNySsnN7htL58LNp+NXT8/PhXiBXPMjLSxtwp8W9f/1AngRierBkA+kk/IpUSOeKByzn8y3kAAAfh//0oXgV4roHm/kz4E2z//zRc3/lgwBzbM2mJxQEa5pqgX7d1L0htrhx7LKxOZlKbwcAWyEOWqYSI8YPtgDQVjpB5n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E2+prqAxLSQxZlU2stql1NqCCLdIiIN/i1DBEHUoElM9dBravbiAnKqgpi4IBkw+utSPIoBijDXJipSVV7MpOEJUAc5Qmm3BnUN+w3hteEieYKfRZSIUcXKMVf0u5wD4EwsUNVvZOtUT7A2GkffHjByWpHqvRBYrTV72a6j8zZ6W0DTE86Hn04bmyWX3Ri9WH7ZU6Q7h+ZHo0nHUAcsQvVhXRDZHChwiyi/hnPuOsSEF6Exk3o6Y9DT1eZ+6cASXk2Y9k+6EOQMDGm6WBK10wOQJCBwren86cPPWUcRAnTVjGcU1LBgs9FURiX/e6479yZcLwCBmTxiawEwrOcleuu12t3tbLv/N4RLYIBhYexm7Fcn4OJcn0+zc+s8/VfPeddZHAGN6TT8eGczHdR/Gts1/MzDkThr23zqrVfAMFT33Nx1RJsx1k5zuWILLnG/vsH+Fv5D4NTVcp1Gzo8AAAAAElFTkSuQmCC&labelColor=white)](https://huggingface.co/spaces/PaddlePaddle/PaddleOCR-VL-1.8_Online_Demo)
[![ModelScope](https://img.shields.io/badge/Demo_on_ModelScope-black?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIzIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCiA8Zz4KICA8dGl0bGU+TGF5ZXIgMTwvdGl0bGU+CiAgPHBhdGggaWQ9InN2Z18xNCIgZmlsbD0iIzYyNGFmZiIgZD0ibTAsODkuODRsMjUuNjUsMGwwLDI1LjY0OTk5bC0yNS42NSwwbDAsLTI1LjY0OTk5eiIvPgogIDxwYXRoIGlkPSJzdmdfMTUiIGZpbGw9IiM2MjRhZmYiIGQ9Im05OS4xNCwxMTUuNDlsMjUuNjUsMGwwLDI1LjY1bC0yNS42NSwwbDAsLTI1LjY1eiIvPgogIDxwYXRoIGlkPSJzdmdfMTYiIGZpbGw9IiM2MjRhZmYiIGQ9Im0xNzYuMDksMTQxLjE0bC0yNS42NDk5OSwwbDAsMjIuMT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WwtMjIuMTksMGwwLDQ3Ljg0bDQ3Ljg0LDBsMCwtMjIuMTlsLTI1LjY1LDBsMCwtMjUuNjV6Ii8+CiA8L2c+Cjwvc3ZnPg==&labelColor=white)](https://modelscope.cn/studios/PaddlePaddle/PaddleOCR-VL-1.8_Online_Demo/summary)
[![Discord](https://img.shields.io/badge/Discord-ERNIE-5865F2?logo=discord&logoColor=white)](https://discord.gg/JPmZXDsEEK)
[![X](https://img.shields.io/badge/X-PaddlePaddle-6080F0)](https://x.com/PaddlePaddle)
[![License](https://img.shields.io/badge/license-Apache_2.0-green)](./LICENSE)

**🔥 [Official Website](https://www.paddleocr.com)** | 
**📝 [Technical Report](https://arxiv.org/pdf/2612.04209)**

</div>




## Introduction

This is the PP-DocLayoutV4 model weights for the PaddlePaddle framework. Get safetensors weights at [PP-DocLayoutV4_safetensors](https://huggingface.co/PaddlePaddle/PP-DocLayoutV4_safetensors)

**PP-DocLayoutV4 is a purely visual, query-based, end-to-end layout model. In a single forward pass it predicts element categories, quadrilateral boxes and reading order, and it additionally estimates page-level geometric deformation (roll, shear and perspective) so that regions on photographed, skewed or perspective-distorted pages can be rectified before recognition.** This model is the layout analysis component of PaddleOCR-VL-1.8, where it replaces PP-DocLayoutV3 with more accurate coordinates, more accurate reading order and explicit geometric modeling of deformed pages, stopping cascaded errors at the stage where they originate.


### **What's New Compared with PP-DocLayoutV3**

| | PP-DocLayoutV3 | PP-DocLayoutV4 |
| :-- | :-- | :-- |
| Element localization | Multi-point polygons derived from a mask branch | Quadrilaterals regressed directly; the mask branch is removed |
| Prediction heads | Category and box heads shared with the encoder | Each decoder layer has its own category head and quadrilateral head |
| Page geometry | Not modeled | A deformation head predicts page-level roll, shear and perspective, used to rectify region images before recognition |
| Reading order | A single global precedence relation | D²RO: dual-relation modeling of local successor relations and global precedence relations |


### **Model Architecture** 

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/wrLCqIniwGMLoq1nObmAo.png" width="800"/>
</div>

Like PP-DocLayoutV3, PP-DocLayoutV4 is built on the RT-DETR framework. An HGNetV2 backbone extracts multi-scale features, a hybrid encoder (AIFI + FPN/PAN) performs intra-scale interaction and cross-scale fusion, and a Transformer decoder decodes the fused features into a set of shared element queries. Each query serves three predictions:

- a **category head** outputs the element class;
- a **quadrilateral head** outputs the four corners of the element;
- the reading-order module **D²RO** infers the page order from pairwise relations between queries.

In addition, a **deformation head** reads encoder features and predicts page-level geometric deformation parameters.


## Key Features

### Quadrilateral Representation

Under the main real-world degradations (scanning, skew, perspective and screen photography), the boundary of a layout region is well approximated by a quadrilateral. Contours derived from masks, in contrast, are error-prone when adjacent regions touch, background texture interferes or the mask is fragmented, producing boxes that include neighboring elements, split one element into several pieces or have irregular boundaries. A quadrilateral has a fixed number of parameters and a strong shape prior, and does not suffer from these failure modes.

- Each element is parameterized by a ten-dimensional vector `[cx, cy, Δx1, Δy1, ..., Δx4, Δy4]`: the region center plus four corner offsets.
- Quadrilaterals are trained end to end without non-differentiable polygon clipping: geometric overlap is measured with a differentiable Gaussian approximation, treating each quadrilateral as a 2D Gaussian and computing overlap from the Bhattacharyya distance.
- Training augmentation covers right-angle rotation, skew of up to 45°, random perspective transforms, natural-image backgrounds and random cropping, all applied consistently to the quadrilateral annotations.

### Geometric Deformation Modeling

A quadrilateral can tightly enclose a skewed or perspective-distorted region, but the content inside is still distorted. The deformation head therefore predicts a page-level rectifying transform so that each region can be restored to its fronto-parallel form before recognition.

- The transform is decomposed into four geometrically meaningful components: a **roll** angle, a **shear** angle, and **horizontal and vertical perspective (keystone)** coefficients.
- Roll is predicted as a four-way quadrant classification (0°, 90°, 180°, 270°) plus a residual angle within ±45°; the maximum quadrant probability also serves as the confidence of page rectification.
- Page rectification is **off by default**. When enabled, the rectification mode is chosen per page to avoid unnecessary resampling:
  1. if the quadrant confidence is below 0.9, no rectification is applied;
  2. if the residual rotation, the shear or an edge tilt reaches 2°, all regions share the page homography and are resampled and cropped individually;
  3. otherwise, if the page is rotated by a multiple of 90°, only a lossless right-angle rotation is applied;
  4. in all other cases the original crops are kept.

### D²RO: Local–Global Dual-Relation Reading Order

A single ordering relation cannot distinguish "continuity within a block" from "precedence between blocks": on a multi-column newspaper, the many cross-region element pairs can overwhelm the few critical one-step transitions, causing the reading flow to jump elsewhere before the current content is finished. D²RO (Dual-Relation Reading Order) describes the page with two relations, both derived from the same reading indices and requiring no additional block-boundary annotation:

- **Direct successor relation**: captures local one-step transitions and answers "which element is read next".
- **Global precedence relation**: captures the overall precedence between elements at any distance, providing evidence when local links are missing or ambiguous and when different paths must be ordered.

Successor-to-relative reconciliation (S2R) injects the multi-step precedence implied by the successor relation into the global relation scores. At inference, a local–global structural decoder builds a graph from confident successor edges, removes the lowest-confidence edge of any cycle, runs a topological sort within each connected component with ties broken by global precedence, and orders the components by their precedence votes to obtain the full reading order.

### Two-Phase Training

- **Phase 1** trains the backbone, encoder, decoder, category and quadrilateral heads and D²RO, initialized from the pre-trained PP-DocLayout_plus-L weights.
- **Phase 2** freezes all of them and trains only the deformation head on synthetically deformed pages with photographic degradations, so adding page-geometry estimation leaves the layout detection and reading-order outputs exactly as they were after Phase 1.


## Performance

**Layout speed.** Because PP-DocLayoutV4 outputs quadrilaterals, categories and reading order directly, transferring pixel-level masks and polygon post-processing are no longer needed, reducing per-page layout time by about **52%** relative to PP-DocLayoutV3 on the same A100 GPU.

**End-to-end document parsing.** The table below compares PaddleOCR-VL-1.6 (PP-DocLayoutV3) with PaddleOCR-VL-1.8 (PP-DocLayoutV4, page rectification enabled). These are system-level results: PaddleOCR-VL-1.8 also updates the recognition model weights, so the differences are not attributable to the layout model alone.

| Benchmark | Metric | PaddleOCR-VL-1.6<br>(PP-DocLayoutV3) | PaddleOCR-VL-1.8<br>(PP-DocLayoutV4) |
| :-- | :-- | :-: | :-: |
| OmniDocBench v1.6 | Overall ↑ | 96.33 | **97.44** |
| OmniDocBench v1.6 | Reading-order edit ↓ | 0.127 | **0.113** |
| Real5-OmniDocBench | Overall ↑ | 93.19 | **94.67** |
| Wild-OmniDocBench | Overall ↑ | 84.83 | **91.18** |
| Wild-OmniDocBench | Reading-order edit ↓ | 0.1345 | **0.0635** |

On the skew and warping subsets of Real5-OmniDocBench, which the quadrilateral boxes and geometric modeling of PP-DocLayoutV4 target, PaddleOCR-VL-1.8 improves over PaddleOCR-VL-1.6 by 2.12 and 2.10 points.


## Visualization


### Orientation and Perspective Rectification

Input photographs next to the pages rectified with the orientation and deformation parameters predicted by PP-DocLayoutV4; detected layout regions are overlaid on both images.

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/BNFbThI-MyQuUln3LyPf5.png" width="800"/>
</div>

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/77rFySHot9bJpFbXQawMJ.png" width="800"/>
</div>

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/xXrf_UW3WAtgmUWFhUe2e.png" width="800"/>
</div>


### Layout Detection: PP-DocLayoutV3 vs. PP-DocLayoutV4

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/cLMjStp0MgjvyFUbMa856.png" width="800"/>
</div>

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/9lsgfFSK40FRkTNV0e_60.png" width="800"/>
</div>


### Reading Order: PP-DocLayoutV3 vs. PP-DocLayoutV4

Reading order is drawn as arrows between regions in predicted sequence.

<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/SIDy9uVI7yRGEC8gCHixK.png" width="800"/>
</div>


<div align="center">
<img src="https://cdn-uploads.huggingface.co/production/uploads/684ad4f6eb7d8ee8f6a92a3a/Xs1y2AfMcjb_Bxfv-qUn_.png" width="800"/>
</div>


## Citation

If you find PP-DocLayoutV4 helpful, feel free to give us a star and citation.

```bibtex
@misc{cui2026paddleocrvl18higheraccuracyfaster,
      title={PaddleOCR-VL-1.8: Higher Accuracy, Faster Inference and Broader Language Coverage for Document Parsing}, 
      author={Cheng Cui and Zhichao Liu and Yubo Zhang and Mengjie Wang and Jiyu Zhuang and Yizhan Huang and Changda Zhou and Yannian Fu and Qunyi Xie and Xiaolong Ma and Hongbin Zhang and Yi Yang and Lei Jia},
      year={2026},
      eprint={2612.04209},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2612.04209}, 
}
```