DocLayNet is a human-annotated dataset for document layout analysis that contains about 80,863 pages with bounding boxes for 11 layout classes, drawn from six distinct categories of real-world documents. In Document AI it serves both as training data for layout detection models and as a benchmark that measures how well those models generalize beyond the uniform look of scientific papers.
Released by IBM Research in 2022, DocLayNet was designed to address a weakness of earlier, automatically labeled datasets: models trained on them performed well on journal articles but poorly on financial reports, manuals, patents and legal texts. Because every page was annotated manually by trained experts, the dataset also includes measurements of human agreement that give a realistic ceiling for model accuracy.
What DocLayNet contains
DocLayNet provides page images, bounding boxes and class labels in the widely used COCO object detection format, together with the original PDF text cells for each page. This combination lets researchers train purely visual detectors as well as multimodal models that use both pixels and extracted text.
The table below lists the main characteristics of the dataset.
| Attribute | Value | Why it matters |
|---|---|---|
| Total pages | About 80,863 | Large enough to train modern detectors |
| Layout classes | 11 | Finer granularity than earlier datasets |
| Document categories | 6 | Tests generalization across domains |
| Annotation method | Manual, by trained annotators | Higher label quality than heuristic labeling |
| Data splits | Roughly 69,000 train, 6,500 validation, 5,000 test | Standard benchmark protocol |
| Format | COCO annotations, PNG images, PDF text cells | Compatible with common tooling |
| License | Community Data License Agreement, permissive | Allows commercial and research use |
A subset of pages was annotated two or three times independently, which allows the dataset to report inter-annotator agreement. That figure is essential for interpreting benchmark results, because a model that approaches human agreement has little room left to improve on the existing labels.
Layout classes and document categories
The 11 layout classes cover the elements that matter most for downstream tasks such as reading order detection, table extraction and document-to-Markdown conversion. They are Caption, Footnote, Formula, List-item, Page-footer, Page-header, Picture, Section-header, Table, Text and Title.
The six categories were chosen to represent visually and structurally different documents. Their distribution is intentionally less skewed than in datasets built from a single publisher, which makes DocLayNet a stronger test of cross-domain robustness.
| Category | Typical layout traits | Main difficulty for models |
|---|---|---|
| Financial reports | Dense tables, charts, multi-column text | Distinguishing tables from text blocks |
| Manuals | Pictures, lists, varied typography | Irregular layouts and nested lists |
| Scientific articles | Two columns, formulas, captions | Formulas and caption assignment |
| Laws and regulations | Long text, numbered sections | Separating section headers from text |
| Patents | Fixed structure, claims, drawings | Small headers and dense text |
| Government tenders | Forms, tables, mixed formatting | Inconsistent templates across issuers |
How DocLayNet compares with other layout datasets
DocLayNet is often contrasted with PubLayNet, a much larger dataset of about 360,000 pages that was labeled automatically by matching PDF content to XML from biomedical journals. PubLayNet offers scale but limited visual diversity, and models trained on it tend to lose accuracy sharply on business documents.
| Dataset | Primary purpose | Labeling | Domain coverage |
|---|---|---|---|
| DocLayNet | Layout detection | Manual | Six diverse categories |
| PubLayNet | Layout detection | Automatic from XML | Biomedical articles |
| DocBank | Token-level layout labeling | Weak supervision from LaTeX | Scientific papers |
| RVL-CDIP | Document classification | Category labels per page | Scanned business documents |
| FUNSD | Form understanding | Manual entity linking | Noisy scanned forms |
The key lesson from comparative studies is that label quality and domain diversity often matter more than raw page count. Models trained on DocLayNet typically generalize better to unseen document types than models trained on larger but homogeneous collections.
Benchmarking and evaluation
Results on DocLayNet are reported as mean average precision (mAP) over intersection-over-union thresholds from 0.5 to 0.95, following the COCO protocol. The original publication reported human agreement of roughly 82 to 83 percent mAP, while baseline detectors such as Mask R-CNN, Faster R-CNN and YOLOv5 reached roughly 73 to 77 percent.
Per-class scores vary widely. Tables, pictures and page headers are usually detected reliably, while titles, footnotes and list items are harder because their appearance overlaps with ordinary text. Reporting per-class and per-category results is therefore more informative than a single aggregate number.
- Use the official test split so that results are comparable with published work.
- Report per-class mAP, since aggregate figures hide weak classes such as Title.
- Compare against human agreement, not against an assumed ceiling of 100 percent.
- Check category balance, because strong scores on one category can mask failures in another.
Practical use and limitations
In practice, DocLayNet is a common pretraining or fine-tuning source for layout models used in PDF parsing pipelines, including open-source document converters such as Docling. Teams typically start from a DocLayNet-trained detector and then fine-tune on a few hundred pages of their own documents.
The decision table below shows how teams usually combine DocLayNet with their own data, depending on how closely their documents resemble the dataset.
| Situation | Recommended approach | Reason |
|---|---|---|
| Born-digital business PDFs in English | Use a DocLayNet-trained detector directly | Close match to the training distribution |
| Same document types with a house style | Fine-tune on a few hundred internal pages | Adapts to local templates at low cost |
| Scanned or photographed documents | Add scan augmentation and scanned training pages | DocLayNet contains few degraded images |
| Elements outside the 11 classes | Extend the label set and annotate new examples | Signatures or stamps are not labeled |
| Non-Latin scripts or right-to-left text | Collect language-specific annotations | Coverage of other scripts is limited |
The dataset has clear limits. It is predominantly English, it contains mostly born-digital PDFs rather than degraded scans or photographs, and its 11 classes do not cover elements such as signatures, stamps, checkboxes or handwritten notes. Its labels describe regions, not reading order or table structure, so additional models or datasets are needed for those tasks.
In simple terms
DocLayNet is a large collection of example pages with labels drawn on them. People marked where each title, table, picture and paragraph sits on about 80,000 pages. Computers study these examples to learn what a page looks like.
The pages come from reports, manuals, patents, laws and more. That variety matters. A model that saw only one kind of page would get confused by others. DocLayNet also acts as a shared test, so researchers can compare their models fairly.
A practical example
An accounting firm wants to turn thousands of annual reports into structured data for analysis. Its first layout model, trained only on scientific papers, often mistakes financial tables for text blocks and misses page headers, which corrupts the extracted figures.
The data team switches to a detector pretrained on DocLayNet and fine-tunes it on 400 annotated pages of the firm’s own reports. Table detection on the internal test set improves noticeably, and the share of reports needing manual correction falls from roughly one in three to about one in ten. Remaining errors cluster around footnotes and unusual title styles, which the team addresses with targeted additional annotations rather than a larger model.