The COTe score: A decomposable framework for evaluating Document Layout Analysis models
Organizations: THE 3TC AI · University College London · Amagi Brain Health
Abstract
Document Layout Analysis (DLA) is the process by which a page is parsed into meaningful elements, often using machine learning models. Typically, the quality of a model is judged using general machine vision metrics such as IoU, F1 or mAP. However, these metrics are designed for images that are 2D projections of 3D space, not for the natively 2D imagery of printed media. This discrepancy can result in misleading or uninformative interpretation of model performance. To encourage more robust, comparable, and nuanced DLA, we introduce: The Structural Semantic Unit (SSU), a relational labelling approach that shifts the focus from the physical to the semantic structure of the content; and the Coverage, Overlap, Trespass, and Excess (COTe) score, a decomposable metric for measuring page parsing quality. We demonstrate the value of these methods through case studies and by evaluating 5 common DLA models on 3 DLA datasets. We show that the COTe score is more informative than traditional metrics and reveals distinct failure modes across models, such as breaching semantic boundaries or repeatedly parsing the same region. We find that, under granularity differences between model and ground truth, the COTe score is substantially more robust than the F1. Even in the worst case, comparing character-level predictions against paragraph-level ground truth with otherwise perfect parsing, COTe returns 0.68 where F1 returns 0. Notably, we find that, on real datasets, the COTe's granularity robustness largely holds even without explicit SSU labelling, reducing the barrier to entry. Finally, we release an SSU labelled dataset and a Python library for applying COTe in DLA projects.
Figures & tables
| Paradigm | Machine Vision | Page Parsing |
| Spatial Model | 2D projection of 3D space | Natively 2D (Tessellation) |
| Primary Unit | Bounding Box | SSU |
| Structure | Atomic | Composite |
| Assignment | 1-to-1 | many-to-1-to-many |
| Failure Modes | Undifferentiated | Decomposable |
| Core Metric | mAP | COTe |
| Metric | Definition | Impact |
| Coverage | How much of the ground truth is covered by predictions | Rewards covering all content |
| Overlap | How much of the ground truth has more than one prediction covering the same area | Penalises stacked prediction, impossible in 2D space |
| Trespass | How much of the ground truth is covered by a prediction that belongs to a different SSU | Penalises breaches of the tessellation logic |
| Excess | How much area outside the ground truth is covered by predictions | Contextualises the core metrics |
| Dataset | Image Type | Images | Regions | Region Type | SSU |
| NCSE | Newspapers | 31 | 358 | Bounding Box | Yes |
| HNLA2013 | Newspapers | 50 | 2668 | Polygon | Yes |
| DocLayNet | Multi Format | 4999 | 66531 | Bounding Box | No |
| Model | Type | Parameters | Framework |
| DocLayout-YOLO | CNN | 15.4M | PyTorch |
| Heron | DETR-based | 42.9M | PyTorch |
| PP-DocLayout-L | DETR-based | 30.94M | PaddlePaddle |
| PP-DocLayout-M | PicoDet-M | 5.65M | PaddlePaddle |
| PP-DocLayout-S | PicoDet-S | 1.21M | PaddlePaddle |
| Metric | GT: Line Pred: Para | GT: Para Pred: Line |
|---|---|---|
| True Positive | 4 | 4 |
| False Positive | 3 | 14 |
| False Negative | 14 | 3 |
| Precision | 0.57 | 0.22 |
| Recall | 0.22 | 0.57 |
| F1 | 0.32 | 0.32 |
| COTe | Coverage | Overlap | Trespass | Excess | IoU | F1 | |
| Perfect | 1.00 | 1.00 | 0.00 | 0.00 | 0.00 | 1.00 | 1.00 |
| Figure 4 | 0.67 | 0.91 | 0.12 | 0.12 | 0.07 | 0.64 | 0.76 |
| Class | |||
| headline | 0.05 | 0.04 | 0.00 |
| text | 0.95 | 0.96 | 1.00 |
| GT / Pred | headline | text |
| headline | 1.00 | 0.05 |
| text | 0.00 | 0.95 |
| GT / Pred | headline | text |
| headline | 0.00 | 0.09 |
| text | 0.00 | 0.91 |
| GT / Pred | Character | Word | Line | Paragraph |
| Character | 1.00 | 1.00 | 1.00 | 1.00 |
| Word | 1.00 | 1.00 | 1.00 | 1.00 |
| Line | 0.90 | 0.90 | 1.00 | 1.00 |
| Paragraph | 0.68 | 0.68 | 0.76 | 1.00 |
| GT / Pred | Character | Word | Line | Paragraph |
| Character | 1.00 | 0.06 | 0.00 | 0.00 |
| Word | 0.06 | 1.00 | 0.01 | 0.00 |
| Line | 0.00 | 0.01 | 1.00 | 0.07 |
| Paragraph | 0.00 | 0.00 | 0.07 | 1.00 |
| Model | COTe | Coverage | Overlap | Trespass | Excess | IoU | mAP | F1@50 |
| Heron | 0.59 | 0.87 | 0.28 | 0.00 | 0.03 | 0.75 | 0.56 | 0.51 |
| PPDoc-L | 0.72 | 0.80 | 0.05 | 0.03 | 0.03 | 0.70 | 0.38 | 0.57 |
| PPDoc-M | 0.42 | 0.76 | 0.05 | 0.29 | 0.12 | 0.36 | 0.09 | 0.26 |
| PPDoc-S | 0.25 | 0.87 | 0.21 | 0.41 | 0.12 | 0.44 | 0.14 | 0.29 |
| YOLO | 0.59 | 0.92 | 0.17 | 0.16 | 0.06 | 0.72 | 0.37 | 0.55 |
| Model | COTe | Coverage | Overlap | Trespass | Excess | IoU | mAP | F1@50 |
| Heron | 0.80 | 0.98 | 0.18 | 0.01 | 0.13 | 0.81 | 0.62 | 0.82 |
| PPDoc-L | 0.73 | 0.83 | 0.05 | 0.05 | 0.16 | 0.61 | 0.46 | 0.74 |
| PPDoc-M | 0.25 | 0.69 | 0.00 | 0.44 | 0.45 | 0.06 | 0.01 | 0.02 |
| PPDoc-S | 0.18 | 0.81 | 0.08 | 0.55 | 0.48 | 0.09 | 0.02 | 0.06 |
| YOLO | 0.85 | 0.97 | 0.07 | 0.05 | 0.15 | 0.74 | 0.44 | 0.68 |
| Model | COTe | Coverage | Overlap | Trespass | Excess | IoU | mAP | F1@50 |
| Heron | 0.90 | 0.95 | 0.04 | 0.02 | 0.03 | 0.85 | 0.76 | 0.90 |
| PPDoc-L | 0.78 | 0.91 | 0.05 | 0.08 | 0.07 | 0.66 | 0.42 | 0.71 |
| PPDoc-M | 0.63 | 0.78 | 0.06 | 0.09 | 0.07 | 0.51 | 0.29 | 0.61 |
| PPDoc-S | 0.62 | 0.77 | 0.05 | 0.09 | 0.07 | 0.47 | 0.29 | 0.61 |
| YOLO | 0.71 | 0.96 | 0.15 | 0.11 | 0.08 | 0.72 | 0.49 | 0.76 |
| Model | SSU | No SSU | Difference |
| Heron | 0.00 | 0.01 | 0.01 |
| PPDoc-L | 0.03 | 0.05 | 0.02 |
| PPDoc-M | 0.29 | 0.35 | 0.06 |
| PPDoc-S | 0.41 | 0.49 | 0.08 |
| YOLO | 0.16 | 0.23 | 0.07 |
| Model | SSU | No SSU | Difference |
| Heron | 0.01 | 0.03 | 0.02 |
| PPDoc-L | 0.05 | 0.07 | 0.02 |
| PPDoc-M | 0.44 | 0.54 | 0.09 |
| PPDoc-S | 0.55 | 0.68 | 0.12 |
| YOLO | 0.05 | 0.09 | 0.03 |
| Dataset | IoU | F1@50 | mAP |
| DocLayNet | 0.90 | 0.90 | 0.80 |
| HNLA2013 | 0.80 | 0.60 | 0.60 |
| NCSE | 0.50 | 0.90 | 0.60 |
| All | 0.76 | 0.91 | 0.79 |
| Dataset | COTe | Coverage | Overlap | Trespass | IoU | mAP | F1@50 |
| DocLayNet | -0.59 | -0.29 | 0.13 | 0.31 | -0.67 | -0.67 | -0.83 |
| HNLA2013 | -0.83 | 0.21 | -0.46 | 0.59 | -0.88 | -0.88 | -0.93 |
| NCSE | -0.51 | 0.18 | 0.11 | 0.24 | -0.51 | -0.53 | -0.82 |
| Model | COTe | Coverage | Overlap | Trespass | Excess | mIoU | F1 |
| YOLO | -0.60 | 0.98 | 0.59 | 0.98 | 0.10 | 0.25 | 0.00 |
| Heron | 0.66 | 0.77 | 0.12 | 0.00 | 0.02 | 0.44 | 0.06 |
| PPDoc-L | 0.65 | 0.65 | 0.00 | 0.00 | 0.02 | 0.45 | 0.12 |
| Font | Layout | Columns |
| Ewert, Great Vibes, Kablammo, Roboto, UnifrakturMaguntia | Centered, Justified, Left aligned | 1, 2, 3 |
| Prediction set | COTe | Cov | Ovl | Tre | Exc | F1@0.5 | mIoU | CER |
| Missing regions | 0.85 | 0.85 | 0.00 | 0.00 | 0.00 | 0.83 | 0.71 | 0.17 |
| Duplicate regions | 0.39 | 1.00 | 0.61 | 0.00 | 0.00 | 0.87 | 1.00 | 0.59 |
| Granularity, line GT | 1.00 | 1.00 | 0.00 | 0.00 | 0.15 | 0.32 | 0.36 | 0.00 |
| Granularity, SSU GT | 0.84 | 0.84 | 0.00 | 0.00 | 0.00 | 0.32 | 0.61 | 0.00 |
| Complex errors | 0.67 | 0.91 | 0.12 | 0.12 | 0.07 | 0.76 | 0.64 | 0.36 |
| Model | COTe | Coverage | Overlap | Trespass | Excess | COTe F1 | PQ | SQ | RQ |
| Mask2Former | 0.96 | 0.97 | 0.00 | 0.01 | 0.03 | 0.91 | 0.76 | 0.76 | 1.00 |
| Yolo26 | 0.96 | 0.96 | 0.00 | 0.00 | 0.04 | 0.90 | 0.78 | 0.78 | 1.00 |
| Model | COTe | Coverage | Overlap | Trespass | Excess | COTe F1 | PQ | SQ | RQ |
| Mask2Former | 0.91 | 0.93 | 0.00 | 0.02 | 0.01 | 0.93 | 0.27 | 0.32 | 0.42 |
| Yolo26 | 0.11 | 0.92 | 0.78 | 0.02 | 0.02 | 0.92 | 0.58 | 0.58 | 0.75 |