CoolFace
Modelpublic

tuandunghcmut/doclaynet-yolo26l

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes65downloads
Model Card

doclaynet-yolo26l โ€” Document Layout Analysis

A YOLO26-Large model fine-tuned on DocLayNet v1.2 for Document Layout Analysis (DLA). It detects 10 semantic layout element types across diverse document styles (financial reports, patents, scientific papers, laws, manuals, and more).

๐Ÿš€ Try it live: doclaynet-yolo26l-demo Space


โš ๏ธ Class Index Note

The docling-project/DocLayNet-v1.2 HuggingFace dataset uses 1-indexed category_id values (1=Caption โ€ฆ 11=Title). The training script stored these directly as YOLO label indices without subtracting 1. As a result:

  • โ€”YOLO class 0 (unknown) โ€” never appeared in any label; output is unreliable
  • โ€”YOLO class 1โ€“10 โ†’ Caption, Footnote, Formula, List-item, Page-footer, Page-header, Picture, Section-header, Table, Text
  • โ€”Title (category_id=11) โ€” was skipped during dataset preparation; this checkpoint does not detect Titles

The model weights, class names in the checkpoint, and this card have all been corrected to reflect the true mapping. Retraining with the fixed prepare_dataset.py (which now subtracts 1) will recover the Title class.


Model Details

PropertyValue
ArchitectureYOLO26-Large
Parameters24.8M
GFLOPs86.1
Input size1024 ร— 1024
OptimizerAdamW
Epochs trained20 (best at epoch 17)
Batch size80
Training deviceNVIDIA H200 NVL

Test Set Evaluation (DocLayNet v1.2 โ€” test split, 4 999 images)

Evaluated with conf=0.001, iou=0.5, imgsz=1024. Class names corrected to reflect actual training data mapping.

Overall Metrics

MetricValue
mAP@500.9152
mAP@50-950.7806
Precision0.8877
Recall0.8438
F1 (mean)0.8652

Per-Class AP@50 (corrected class names)

ClassAP@50PrecisionRecallF1
Text0.95810.91570.90430.9100
List-item0.95100.90420.89190.8981
Page-footer0.93960.91110.86960.8898
Formula0.92550.88110.86930.8752
Section-header0.92340.87500.85770.8663
Page-header0.92250.90580.78550.8414
Table0.91290.90790.85230.8792
Caption0.89010.86360.79390.8273
Footnote0.88590.90660.81140.8563
Picture0.84330.80560.80200.8038
Titlenot trainedโ€”โ€”โ€”

Classes

YOLO IDClassNotes
0unknownNever in training labels
1Caption
2Footnote
3Formula
4List-item
5Page-footer
6Page-header
7Picture
8Section-header
9Table
10Text
โ€”TitleSkipped in this checkpoint; retrain with fixed prepare_dataset.py

Training Configuration

ParameterValue
Base modelyolo26l.pt
DatasetDocLayNet v1.2
Epochs20
Patience7
Batch size80
Image size1024
OptimizerAdamW
AMPTrue
AugmentationRandAugment + erasing

Usage

python
from ultralytics import YOLO

model = YOLO("tuandunghcmut/doclaynet-yolo26l")

results = model.predict(
    source="your_document.jpg",
    imgsz=1024,
    conf=0.25,
    iou=0.7,
    line_width=1,
)
results[0].show()

Citation

bibtex
@article{doclaynet2022,
  title     = {DocLayNet: A Large Human-Annotated Dataset for Document-Layout Segmentation},
  author    = {Pfitzmann, Birgit and Auer, Christoph and Dolfi, Michele and Nassar, Ahmed S and Staar, Peter},
  booktitle = {Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year      = {2022}
}