Skip to content
AI360Xpert
Beta

Document Layout Finds Reading Order

Layout analysis labels titles, columns, tables, and figures, then orders them the way a person would actually read.

A page splits into title, two text columns, a table, and a figure, then reads down column one before column two at mAP 0.83
A page splits into title, two text columns, a table, and a figure, then reads down column one before column two at mAP 0.83

Why Does This Exist?

OCR without layout reads across columns. A two-column paper becomes word salad because lines interleave in the wrong order and tables shatter into stray cells.

Layout comes first. It maps regions for optical character recognition, reuses box ideas from text detection, and sequences crops for text recognition.

Think of It Like This

A librarian shelving a mixed donation

A librarian sorts novels, atlases, and photo albums before cataloging pages, then reads each shelf top to bottom.

It fails on magazines with text wrapped around figures. Rigid shelves cut articles that flow around images, just as boxes cut wrapped paragraphs.

How It Actually Works

Detect blocks bib_i with labels lil_i in title, text, table, figure, list, where lil_i sets how the block is read. Order by column then vertical position: sort into columns by xx center, then sort each column by yy. A page with 5 blocks at mAPmAP 0.83 means 83 percent of predicted areas match truth tightly.

Worked example

Blocks: title y=20y = 20, left text x=100,y=120x = 100, y = 120, right text x=400,y=120x = 400, y = 120, table x=100,y=400x = 100, y = 400, figure x=400,y=400x = 400, y = 400. Reading order is title, left text, table, right text, figure when columns group left before right. Naive top-to-bottom mixing would read left and right lines alternately and wreck every sentence.

Watch Out For

Reading tables as plain paragraphs

Tables need cell structure, not line order. The symptom is numbers strung into sentences. Route table blocks to a table parser instead of the paragraph reader.

The Quick Version

  • Layout labels blocks then orders them by column and height.
  • Fixture page holds 5 blocks at mAPmAP 0.83 with correct two-column order.
  • OCR runs after layout, not before, to avoid mixed lines.
  • Tables and figures need special readers beyond paragraphs.
  • Wrapped text around figures still breaks rigid boxes.