RF-DETR Segmentation Model for Leibniz's Manuscripts (17th–Early 18th Century)
Contributors
Annotator (2):
Project manager:
Supervisor (2):
Description
This is the second fine-tuned version of RF-DETR-Seg (Nano) model for instance segmentation and zone detection on scanned pages of Leibniz's manuscripts (17th-early 18th c.).
This model was developed within the framework of the ERC PHILIUMM project: The Philosophy of Leibniz in the Light of his Unpublished Mathematical Manuscripts, hosted at SPHERE (UMR 7219), Univ. Paris Cité - CNRS, Paris, France.
Dataset
We initially annotated the data to train a model for recognizing main text and graphic zones in manuscript pages with little or no mathematical content.
We later extended the dataset with manually annotated pages of Leibniz's manuscripts containing mathematical zones, available at: https://doi.org/10.5281/zenodo.18804566.
The mathematical annotations were added with the aim of developing a single model capable of detecting all layout classes present in Leibniz's manuscripts.
Class labels were converted to match the SegmOnto controlled vocabulary.
Total n° of pages manually annotated: 392.
What's new in v2 :
- corrected annotations, particularly for mathematical formulae zones.
- increased the training resolution from 720 px to 1272 px.
- renamed math classes
Classes
| Class | Description |
|---|---|
| MainZone | Main body text region |
| MarginTextZone | Marginal additions |
| NumberingZone | Page numbering |
| DigitizationArtefactZone | Digitization artefacts |
| GraphicZone-figure | Diagrams, other graphic zones |
| MathsRegion-complex | Complex/multi-line formulae |
| MathsRegion-inline | Inline formulae within text |
| MathsRegion-strikethrough | Struck-through/deleted formulae |
Preprocessing
- Auto-orient applied
- Resized (stretch) to 1280x1280 (changed from 728×728 in the previous version)
Augmentation
Data augmentation has been applied to the images originally annotated (x3 per image).
- Flip: Horizontal, Vertical
- Rotation: Between -3° and +3°
- Shear: ±5° Horizontal, ±5° Vertical
- Hue: Between -5° and +5°
- Brightness: Between -15% and +15%
- Noise: Up to 1.49% of pixels
Dataset Split after augmentation
| Images before data augmentation | Images after data augmentation | Percentage | |
| Train | 334 | 1,002 | 94% |
| Validation | 40 | 40 | 4% |
| Test | 18 | 18 | 2% |
| Total | 392 | 1,060 | 100% |
Performance
Validation metrics for the best checkpoint "checkpoint_best_regular.pth" :
| Checkpoint | segm mAP@50:95 |
| checkpoint_best_regular_v2.pth | 0.4670 |
| checkpoint_best_ema_v2.pth | 0.4700 |
Both checkpoints were added in case the users want to experiment with both models.
Further details on the model and dataset are available at the following links: model-v2, dataset-v2.
Integration with eScriptorium
The following pipeline prepares the prediction results of RF-DETR-Seg for import into eScriptorium : pipeline-RF-DETR-XML-Page.
Files
data.zip
Files
(753.5 MB)
| Name | Size | |
|---|---|---|
|
md5:e40d5c13fe390a9171e761c34cf45fc2
|
149.7 MB | Download |
|
md5:4b212d9b39fda419ce20aa3b10718250
|
299.2 MB | Download |
|
md5:ee595c3455a497837cc45cb798df002a
|
304.4 MB | Preview Download |
|
md5:3f5c7d1f025fe3d407722160052818e7
|
104.2 kB | Preview Download |
|
md5:e80ab5ff09fd3c81500c818676f57fe9
|
7.5 kB | Preview Download |
|
md5:c7962ac51ead872c82198c6e073780f2
|
4.4 kB | Preview Download |
Additional details
Funding
Software
- Programming language
- Python
References
- XIE, Y., Qian, Z., LI, Y., Mouchère, H.& Rabouin, D. (2026). HME-Leibniz: A Multi-level Mathematical Expression Dataset from Leibniz's Manuscripts [Dataset]. Zenodo. https://doi.org/10.5281/zenodo.18804566