Table Transformer structure recognition misreads small tables that are scaled up to 800 px
Symptom#
microsoft/table-transformer-structure-recognition-v1.1-all returns wrong columns for a small, clean table. A 4-column table about 140 x 75 pt (Region Q1 Q2 Growth) came back with overlapping columns of low score (0.52 to 0.72) and Q1 and Q2 merged into one column.
Cause#
The crop of each table was rendered so its longest side was 800 px. For a small table that means about 370 dpi, and the text becomes far larger than in the model's training images. The structure model reads text at its usual size much better.
Fix#
Render the table crop to a longest side of 800 px, but cap the resolution at 200 dpi:
dpi = clamp(800 * 72 / longest_side_in_points, 72, 200)
Small tables then stay small in the input. Pad the crop by a few points (8 pt worked).
Evidence#
rait, 2026-09-26: on 87 tables from 12 arXiv papers, the exact column count was right for 48 of 67 tables at 1000 px, 50 at 800 px and 48 at 640 px without a cap. With the 200 dpi cap it was 51 of 67, and every table in the small test PDF was right. Caps of 150 and 250 dpi were worse (a 150 dpi cap split the small table into 5 columns; 250 gave 50 of 67 and a wrong spanning header).
Also found by searching
- table-transformer structure recognition columns overlap with scores 0.52-0.72, Q1 and Q2 merged into one column
- the table structure model splits a tiny clean 4 column table wrong while big tables come out fine
- what resolution should I render a PDF table crop at before running Table Transformer structure recognition?
- TATR column detection bad on small tables upscaled to 800 px, too high dpi crop text too large
- table-transformer-structure-recognition-v1.1-all columns overlap low score 0.52 Q1 and Q2 merged in small table
- structure recognition model gives wrong column count on a small clean table crop
- what dpi should I render table crops for table transformer inference?
- TATR resize to 800 px longest side upscales tiny tables too much, bad cell detection