What is layout analysis?
Layout analysis is the determination of a page's regions and the relationships between them, performed before any text is interpreted. It establishes where a heading ends and where a table begins, and it pairs a field label with the value belonging to it. Everything downstream inherits whatever this step concluded.
Also called: Document layout analysis, Page segmentation
Why an extraction error is usually a layout error
When a field comes back carrying the value from the row below it, the recognition model is rarely at fault. The characters were read correctly and attributed to the wrong region, which is a layout failure wearing an extraction failure's clothes. Teams investigating accuracy problems therefore spend weeks tuning recognition while the structural step underneath stays untouched. Layout analysis deserves its own measurement, because its errors are the ones that look like something else.
- Correct characters attributed to the wrong region produce a confident wrong answer.
- Multi-column and stamped pages defeat a reading order that assumes one flow.
- Table detection happens here, so table extraction inherits this step's ceiling.
- Layout output is inspectable, which makes the failure localisable rather than mysterious.
How layout analysis works
- The page image is deskewed and its orientation corrected.
- Regions are detected and classified by kind, with tables distinguished from body text.
- Reading order is established across columns and around inserted blocks.
- Label and value regions are paired according to the geometry of the form.
- Table regions are resolved into rows and columns before any cell is read.
- The region map is retained, so an extraction can be traced back to it.
How layout analysis is evaluated
Layout analysis is assessed on the structure it produces rather than on the text that follows. Compare the following against a hand-marked set of real pages:
- region detection accuracy by region kind
- reading order correctness on multi-column pages
- label to value pairing accuracy across form variants
- table boundary accuracy including merged and spanning cells
- degradation on photographed pages against flatbed scans
Limitations, risks and common failure modes
- Stamps and signatures overlaying a field are read as part of its value.
- A form redesign moves regions, and the pairing rules silently stop matching.
- Pages fed at an angle shift every region by a predictable amount.
- Merged cells are resolved into the wrong row with high confidence.