# U-DIADS-Bib: Pixel-Precise Layout Analysis for Ancient Biblical Manuscripts

> U-DIADS-Bib is a pixel-precise, noiseless document layout analysis dataset of 200 pages from four ancient biblical manuscripts (6th-12th century), annotated with six semantic classes in close collaboration between computer vision and humanities researchers.

- Authors: Hunter Heidenreich
- Published: 2026-03-12
- Paper: Preprint (arXiv) <https://arxiv.org/abs/2401.08425>
- Paper: Published (Neural Computing and Applications 2024) <https://doi.org/10.1007/s00521-023-09356-5>
- Dataset: U-DIADS-Bib Dataset <https://ai4ch.uniud.it/udiadsbib/>
- Source: Bevaya Labs, <https://labs.bevaya.ai/>

---


## TL;DR

U-DIADS-Bib is a pixel-precise document layout analysis dataset containing 200 pages from four ancient biblical manuscripts (three Latin, one Syriac) dating from the 6th to 12th centuries. The dataset distinguishes six non-overlapping semantic classes chosen collaboratively by humanities scholars and computer vision researchers. The authors also release a standardized few-shot variant (U-DIADS-BibFS) with only 3 training images per manuscript and benchmark five segmentation architectures on both versions.

## What kind of paper is this?

**Dominant:** $\Psi\_{\text{Resource}}$ : the headline contribution is the dataset itself. The paper devotes the majority of its content to describing the manuscripts, the annotation taxonomy, the ground truth construction pipeline, and the data splits. The dataset and its few-shot variant are the primary reusable assets introduced.

**Secondary:** $\Psi\_{\text{Method}}$ : the authors propose a computer-aided annotation pipeline that alternates between ML-generated coarse segmentations and manual expert refinement, reducing the time needed to produce pixel-precise ground truth. $\Psi\_{\text{Evaluation}}$ : the paper benchmarks five semantic segmentation models (FCN, LRASPP, DeepLabV3, DeepLabV3+, PSPNet) plus a few-shot baseline on both the full and few-shot dataset versions, establishing reference results for future work.

## What is the motivation?

Document layout analysis for historical manuscripts requires pixel-precise segmentation maps as ground truth. Existing datasets in this space suffer from several limitations:

1. **Coarse annotation granularity.** Many historical DLA datasets provide only bounding boxes or polygons, which cannot capture the fine-grained, interleaved layout elements common in ancient manuscripts (e.g., marginal glosses weaving around decorations).

2. **Limited class vocabularies.** Several pixel-level datasets distinguish only between text and background (e.g., PHTD, HDRC-CHINESE) or offer only a handful of classes (e.g., DIVA-HisDB with three classes). This is insufficient for humanities scholars who need to differentiate between main text, paratextual elements, decorations, titles, and chapter headings.

3. **Noisy ground truth.** The HBA 1.0 dataset, one of the larger pixel-level alternatives, contains noisy segmentation maps that compromise model evaluation reliability.

4. **Mono-alphabetic focus.** Existing datasets typically cover a single script (Latin, Arabic, or Chinese), whereas real manuscript collections span multiple writing systems.

5. **Annotation cost.** Producing pixel-precise segmentation for complex manuscript pages is extremely time-consuming and requires domain expertise, creating a practical bottleneck for dataset creation.

## What is the novelty?

The core novelty is the dataset design and its annotation methodology:

**Interdisciplinary class selection.** The six segmentation classes (background, main text, paratext, decoration, title, chapter headings) were chosen through collaboration between humanities experts and computer vision researchers. The humanities scholars identified which layout elements are meaningful for studying biblical manuscripts, while the CV researchers ensured the annotations meet modern semantic segmentation standards (pixel-precise, non-overlapping, noiseless).

**Multi-script coverage.** U-DIADS-Bib includes manuscripts in both the Latin alphabet and the Syriac Abjad consonantal alphabet, making the segmentation task more challenging and the dataset more representative of real manuscript collections.

**Computer-aided annotation pipeline.** To address the annotation cost problem, the authors propose a pipeline that:

1. Selects 10 images per manuscript and binarizes them using the Sauvola thresholding technique.
2. Has humanities experts manually segment these 10 images at pixel level.
3. Trains a few-shot segmentation model (following De Nardin et al.) on the manual annotations to produce coarse segmentation of remaining pages (initially for 4 classes).
4. Has humanities experts refine the machine-generated segmentations and add missing classes.

This approach ensures that the final ground truth is always verified by a human expert, while reducing the total manual effort compared to annotating every page from scratch.

**Standardized few-shot split.** The U-DIADS-BibFS variant provides a fixed split with only 3 training images per manuscript (chosen to cover all classes), 10 for validation, and 30 for testing. This standardized split is intended to encourage research on low-data document layout analysis.

**Class weighting for imbalanced data.** The dataset exhibits severe class imbalance (background occupies 85-93% of pixels). The authors propose a weighted cross-entropy loss where each class weight is computed as:

$$W\_i = \sqrt{\frac{1}{F\_i}}$$

where $F\_i$ is the frequency of class $i$ in the corresponding manuscript. This helps the models attend to underrepresented classes.

## What experiments were performed?

### Full dataset setting

Five semantic segmentation architectures were benchmarked on U-DIADS-Bib:

- **FCN** (Fully Convolutional Network)
- **LRASPP** (Lite Reduced Atrous Spatial Pyramid Pooling)
- **DeepLabV3**
- **DeepLabV3+**
- **PSPNet** (Pyramid Scene Parsing Network)

All models except LRASPP use a ResNet34 backbone; LRASPP uses MobileNetV3-Large. Training uses the Adam optimizer with a learning rate of $10^{-3}$ and weight decay of $10^{-5}$, running for up to 200 epochs with early stopping (patience of 20 epochs after a 50-epoch buffer).

Each model is trained and evaluated per manuscript, with the final score computed as the average across all four manuscripts. Evaluation metrics include Precision, Recall, IoU, and F1-Score, reported as both weighted and macro averages.

### Few-shot setting

The same five architectures were evaluated on U-DIADS-BibFS (3 training images per manuscript). Additionally, the few-shot method of De Nardin et al. was included as a baseline specifically designed for low-data document layout segmentation.

### Analysis

Confusion matrices for the best-performing model (DeepLabV3+) on each manuscript are provided, allowing inspection of per-class failure modes.

## What are the outcomes/conclusions?

**Full dataset.** DeepLabV3+ achieved the best overall performance across all four manuscripts. However, even the best model showed notable weaknesses: Paratext and Title classes proved difficult across manuscripts, with particularly low macro-averaged scores. The weighted averages (which are dominated by the background class) were consistently high, but the macro averages reveal that minority classes remain challenging.

**Few-shot dataset.** In the few-shot setting, the method of De Nardin et al. (designed for few-shot document layout segmentation) achieved the best results, outperforming the general-purpose segmentation models trained on only 3 images. This result supports the paper's argument that specialized few-shot approaches are needed for practical deployment where large annotated corpora are unavailable.

**Class imbalance is a persistent challenge.** The large gap between weighted and macro metrics across all models highlights that severe class imbalance (with minority classes like Paratext and Title comprising less than 1% of pixels) remains a difficult problem. The confusion matrices show that models frequently confuse minority classes with the dominant background and main text classes.

**Limitations.** The dataset is relatively small (200 pages total) and covers only biblical manuscripts, which limits the diversity of document types. The authors note plans to expand to modern manuscripts, letters, and printed documents with manual annotations. The Syriac manuscript lacks the Chapter Headings class, creating some inconsistency across manuscripts.

## Reproducibility

### Models

- Five standard architectures: FCN, LRASPP, DeepLabV3, DeepLabV3+, PSPNet.
- Backbones: ResNet34 for all except LRASPP (MobileNetV3-Large). The paper does not state whether backbones are initialized from ImageNet-pretrained weights or trained from scratch, though pretrained initialization is standard practice for these architectures.
- The few-shot baseline follows De Nardin et al. (WACV 2023 / IJNS 2023).
- No parameter counts are reported for any of the models.
- No pretrained weights or trained checkpoints are released.

### Algorithms

- **Optimizer:** Adam, learning rate $10^{-3}$, weight decay $10^{-5}$.
- **Batch size:** Not reported.
- **Training schedule:** Up to 200 epochs, early stopping with 20-epoch patience after a 50-epoch warmup buffer (early stopping only activates after 50 epochs to reduce the risk of stopping at a local minimum early in training).
- **Loss function:** Weighted cross-entropy with class weights $W\_i = \sqrt{1 / F\_i}$, where $F\_i$ is the pixel-level frequency of class $i$ in the corresponding manuscript.
- **Data augmentation:** Not reported. The Sauvola binarization mentioned in the paper is part of the annotation pipeline, not training-time augmentation.
- **Sampling/decoding:** Not applicable (segmentation task, no generation or decoding involved).

### Data

- 200 images total: 50 per manuscript, split into 10 train / 10 validation / 30 test.
- U-DIADS-BibFS: 43 images per manuscript (3 train / 10 validation / 30 test). The 3 training images per manuscript were chosen to cover all segmentation classes.
- Images stored as JPEG at $1344 \times 2016$ pixels; ground truth as PNG with RGB-encoded class labels.
- Six non-overlapping classes encoded by distinct RGB values: Background (0,0,0), Paratext (255,255,0), Decoration (0,255,255), Main Text (255,0,255), Title (255,0,0), Chapter Headings (0,255,0). Syriaque 341 has only five classes (no Chapter Headings).
- Severe class imbalance: Background dominates at 85-93% of pixels, while minority classes like Paratext and Title each comprise less than 1%.
- Source images collected from Gallica (Bibliothèque nationale de France digital library). Specific Gallica URLs for each manuscript are provided in the paper.
- Annotation: hybrid process combining ML-generated coarse segmentation (for 4 classes initially) with manual expert refinement to add the remaining classes and correct errors. The final ground truth is always verified by a human domain expert.
- No filtering or deduplication pipeline is described; pages were selected to be representative of all segmentation classes.
- The dataset is available at [https://ai4ch.uniud.it/udiadsbib/](https://ai4ch.uniud.it/udiadsbib/). The specific license for the dataset is not explicitly stated in the paper; the underlying manuscript images come from Gallica.

### Evaluation

- Metrics: Precision, Recall, IoU, F1-Score, with standard definitions (Equations 2-5 in the paper). Both weighted average (based on class distribution) and macro average (equal weight per class) are computed per manuscript, then averaged across all four manuscripts.
- Confusion matrices are provided for the best-performing model (DeepLabV3+) on each manuscript, allowing per-class failure mode inspection.
- No error bars, confidence intervals, or multi-seed runs are reported. Each model appears to have been trained once per manuscript.
- Baselines: five general-purpose segmentation models on both full and few-shot settings, plus one few-shot-specific baseline (De Nardin et al.) on the few-shot setting only.
- The authors acknowledge the severe class imbalance as a key challenge and the limited manuscript diversity (only biblical manuscripts) as a scope restriction.
- The large gap between weighted and macro metrics across all models indicates that high weighted scores are dominated by the background class and may overstate practical performance on minority layout elements.

### Hardware

- No hardware specifications are reported in the paper: GPU type/count, training time, memory requirements, and inference latency are all absent.
- The dataset and models are relatively small (200 images at $1344 \times 2016$ pixels, standard segmentation architectures with ResNet34/MobileNetV3 backbones), so training is likely feasible on a single consumer GPU, though the paper does not confirm this.

## BibTeX

```bibtex
@article{zottin2024udiadsbib,
  title={U-DIADS-Bib: a full and few-shot pixel-precise dataset for document layout analysis of ancient manuscripts},
  author={Zottin, Silvia and De Nardin, Axel and Colombi, Emanuela and Piciarelli, Claudio and Pavan, Filippo and Foresti, Gian Luca},
  journal={Neural Computing and Applications},
  year={2024},
  doi={10.1007/s00521-023-09356-5},
  publisher={Springer}
}
```


