Stage-0 multiscript pretrained weights for dfine-det — a D-FINE Large (HGNetv2-B4) detector adapted to predict text-line baselines as polylines (B-spline control points), not boxes.
This checkpoint is intended as a generic baseline pretrain for downstream Stage-1 fine-tunes (e.g. Hebrew/Samaritan, ICDAR cBAD, other PAGE/ALTO corpora).
Model summary
Architecture
PolylineDFINE — D-FINE detection core + polyline head
Size class
Large (D-FINE-L / backbone B4)
Parameters
~30.1 M trainable
Queries
300
Geometry
(K=8) cubic B-spline control points per line + height
Canvas
(1280\times1280) letterbox
Init
Official Peterande/D-FINEdfine_l_obj2coco_e25.pth (strict=False)
Task
Document baseline / text-line detection → PAGE or ALTO export
Detection is set prediction of scored polylines. Polygonal line environments (BLLA) are applied only at PAGE/ALTO serialize time, not in the training objective.
Intended use
Use for
Starting point for Stage-1 fine-tuning on a target script/corpus
Zero-shot / few-shot probing of baselines on heterogeneous manuscripts (expect domain gap)
Research on polyline baseline detectors built on D-FINE
Not for
Claiming official ICDAR cBAD 2019 test numbers from these Stage-0 val scores (see below)
Production OCR transcription (this model detects lines; it does not recognize text)
Replacing layout region detectors (paragraphs, tables, etc.)
Training data (Stage-0)
Multiscript PAGE-XML / ALTO baselines under baseline_pretrain_raw (HTR-United–style open corpora + private packs), compiled to Arrow with adaptive simplify → B-spline (K=8).
Split
Pages
Train
46 513
Val (holdout)
1 923 (~5%, seed 42)
Total XMLs inventoried
48 436 across 29 corpora
Corpora (train / val pages)
Corpus
Train
Val
Scripts / notes
de-dh-unibe
14309
80
German manuscripts
ar-Bulac
7461
394
Arabic
he-Sofer_Mahir
5474
289
Hebrew
se-Riksarkivet_page
3861
217
Swedish archival
cu-Generic_Church_Slavonic_Handwriting
2638
80
Church Slavonic
smp-private
2143
113
Samaritan (private)
la-cmmhwr26
2052
275
Latin
eu-cBAD-ICDAR2017
1859
98
cBAD 2017
eu-cBAD-ICDAR2019
1398
74
cBAD 2019 (subset in pretrain mix)
syr-MIDRASH
1055
56
Syriac
ar-Muharaf
907
48
Arabic
ar-OpenITI-arabic_print_data
819
45
Arabic print (ALTO)
fi-FCR_500
475
25
Finnish
de-ICFHR-2016
427
21
German (list entry; image availability varies)
sa-…Pracalit…Sanskrit_and_Newar…
417
22
Sanskrit / Newar
syr-HTR_Winter_School_2024
259
14
Syriac
la-HTR_Winter_School_Vienna
255
16
Latin
he-BiblIA
125
7
Hebrew
la-CREMMA
100
21
Latin
+ smaller packs
…
…
Greek, Czech, Polish, Judeo-Spanish, Icelandic, Estonian, papyri, etc.
Important: ICDAR cBAD pages appear inside this pretrain mixture. Stage-0 validation F1 is an internal multiscript holdout, not a fair official cBAD 2019 test score. For apples-to-apples cBAD bake-offs, use a separate Stage-1-cBAD fine-tune and the official test split.
This work builds on official D-FINE by Yansong Peng et al. (ICLR 2025 Spotlight). Backbone, hybrid encoder, deformable attention, and CDN utilities are adapted from their Apache-2.0 codebase; detection init uses their D-FINE-L Objects365→COCO checkpoint.
bibtex
1@inproceedings{peng2025dfine,
2 title = {D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement},
3 author = {Peng, Yansong and Li, Hebei and Wu, Peixi and Zhang, Yueyi and Sun, Xiaoyan and Wu, Feng},
4 booktitle = {The Thirteenth International Conference on Learning Representations},
5 year = {2025},
6 url = {https://arxiv.org/abs/2410.13842}
7}
Training corpora: respect each dataset’s original license (HTR-United / Zenodo / institutional terms). Private packs (smp-private, et-private, …) are not redistributed with this card; only model weights trained with them are released if your license allows.
License
Apache License 2.0 for the dfine-det code and these weights, consistent with D-FINE’s Apache-2.0 release. Downstream users must also comply with licenses of any datasets used in further fine-tuning.