Instructions to use pacoreyes/heron-physics-pdf-layout with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pacoreyes/heron-physics-pdf-layout with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="pacoreyes/heron-physics-pdf-layout")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForObjectDetection tokenizer = AutoTokenizer.from_pretrained("pacoreyes/heron-physics-pdf-layout") model = AutoModelForObjectDetection.from_pretrained("pacoreyes/heron-physics-pdf-layout", device_map="auto") - Notebooks
- Google Colab
- Kaggle
heron-physics-pdf-layout
A fine-tune of docling-project/docling-layout-heron
(RT-DETRv2) specialized for layout detection on physics PDFs โ articles, ICRC conference proceedings, theses, and book chapters. Same 17-class DocLayNet/Heron label schema and classification head as the base model; only the weights are tuned.
Training data
377 pages from 40 physics-domain PDFs, hand-labeled via a two-model annotation protocol (one model annotates, a second independently judg adjudicated) and split by document โ 249 train / 61 val / 67 test pages, no document crossing a split.
Training procedure
transformers.Trainer, AdamW, 20 epochs, batch size 2, tw (backbone lr 1e-5, rest of the model lr 1e-4), horizontal flip augmentation, no replay data mixed in from the base model's original traini
Evaluation (test split, same pages scored against the u
| model | mAP@[.5:.95] | AP@0.5 | footnote AP | footnote F |
|---|---|---|---|---|
base (docling-layout-heron) |
0.705 | 0.835 | 0.741* | |
| this model | 0.841 | 0.894 | 0.659 | 0.873 |
*the base model's footnote AP looks competitive but is misleading โ 21.4% precision means 4 of 5 footnote calls are wrong; it only posts a dec high across the whole precision-recall curve. footnote F1 is the fairer comparison.
Intended use and limitations
Scoped to physics-domain PDFs specifically โ not evaluated on, and not claimed to generalize to, general document layout. Part of the Physics-LLM Project.
License
Apache-2.0, inherited from the base model. Weights only; no training code or data redistributed here.
- Downloads last month
- 14
Model tree for pacoreyes/heron-physics-pdf-layout
Base model
docling-project/docling-layout-heron