PP-DocLayoutV3 LADaS: precise layout analysis for printed and historical books
2 min readupdated
This fine-tuned version of PP-DocLayoutV3_safetensors uses the LADaS 2.0 dataset to parse book pages. It accurately detects headings, headers, page numbers, and indices, splitting each footnote into an individual block. Created for the FluxOCR project to digitize scanned books from the 17th to 21st centuries, the model retains the original architecture and loads normally via the transformers library. It is ideal for researchers, archivists, and developers building text digitization pipelines.
Key features
- Targeted accuracy: enhanced detection of headings, headers, page numbers, and footnotes.
- Compatibility: fully integrated with the
transformersecosystem without altering the base architecture. - Performance: average F1 score increased from 0.574 to 0.871 on the test LADaS dataset.
- Footnote focus: every footnote is formatted as a separate block for proper text association.
What you can do
- Digitize antique scientific treatises and historical books into clean HTML or EPUB.
- Link page footnotes to their inline numbers when paired with OCR tools.
- Automatically structure index pages and tables of contents in printed publications.
Example
import torch
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForObjectDetection
repo = "lucacasarotti/pp-doclayoutv3-ladas"
processor = AutoImageProcessor.from_pretrained(repo)
model = AutoModelForObjectDetection.from_pretrained(repo).eval()
image = Image.open("page.png").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
Read more
DetailsMetrics (F1): overall accuracy rose from 0.574 to 0.871 (headings at 0.92, numbers at 0.91).
Training: 8 epochs on an RTX 5070 Laptop (8 GB VRAM) using the LADaS dataset.
Limitations: line order may break in multi-column indices; handwritten texts are not supported.
License: Apache-2.0, with the LADaS dataset under CC-BY-4.0.










Comments