horae-lsv2-layout / README.md
davanstrien's picture
davanstrien HF Staff
Point load snippet at the biglam path ahead of the move
1242a99 verified
|
Raw
History Blame Contribute Delete
6.3 kB
---
license: cc-by-4.0
language:
- la
- fr
task_categories:
- object-detection
- image-segmentation
size_categories:
- n<1K
pretty_name: HORAE-LSv2 Books of Hours layout
tags:
- glam
- manuscripts
- document-layout-analysis
- medieval
- iiif
dataset_info:
features:
- name: image
dtype: image
- name: file_name
dtype: string
- name: width
dtype: int32
- name: height
dtype: int32
- name: iiif_url
dtype: string
- name: objects
list:
- name: bbox
list: int32
- name: category_id
dtype: int32
- name: category_name
dtype: string
- name: regions
list:
- name: polygon
list:
list: int32
- name: type
dtype: string
- name: class_name
dtype: string
splits:
- name: train
num_bytes: 1542963758
num_examples: 555
download_size: 1541191101
dataset_size: 1542963758
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
# HORAE-LSv2 — layout segmentation for Books of Hours
555 annotated page images from 334 medieval and early-modern Books of Hours, manuscript and printed,
marked up for page layout analysis. Created by the HORAE project at the [Institut de Recherche et
d'Histoire des Textes](https://www.irht.cnrs.fr/) (IRHT-CNRS) with [Teklia](https://teklia.com/), and
deposited on Zenodo in August 2025 as HORAE-LSv2 ([10.5281/zenodo.16919911](https://doi.org/10.5281/zenodo.16919911)).
This repository is a format conversion of that deposit. Same images, same annotations, repackaged so
it loads with `datasets` instead of requiring four zip files and three text encodings.
## Two annotation systems over the same pages
The deposit ships two independent markup schemes for the same 555 pages, and they do not map onto each
other. Both are carried here rather than picking one.
| Column | Scheme | Geometry | Count |
|---|---|---|---|
| `objects` | 14-class YOLO taxonomy | bounding boxes, COCO `[x, y, w, h]` in absolute pixels | 22,878 |
| `regions` | 7-type Arkindex taxonomy plus subclasses | polygons | 22,964 |
`regions` types and their subclasses:
| Type | Count | Subclasses |
|---|---|---|
| text_line | 13,879 | calendar |
| initial | 3,542 | simple_initial, decorated_initial, historiated_initial |
| decoration | 2,412 | line_filler, ornament, music_notation, decorated_border, illustrated_border |
| rubrication | 1,224 | red, blue, gold |
| text | 896 | border_text |
| single_page | 852 | calendar |
| miniature | 159 | — |
`text_line` is 60% of the polygon annotations. Filter it out if you are after decorative or structural
elements rather than lines.
## Structure
| Field | Type | Notes |
|---|---|---|
| `image` | image | JPEG at maximum available IIIF resolution |
| `file_name` | string | source filename; institution and shelfmark are encoded in it |
| `width`, `height` | int32 | as declared upstream; verified to match the decoded image |
| `iiif_url` | string | the IIIF source URL, preserved for provenance |
| `objects` | list of struct | `bbox`, `category_id`, `category_name` |
| `regions` | list of struct | `polygon`, `type`, `class_name` |
## Caveats
**Not every page is annotated.** 555 images, but only 545 carry YOLO labels and 542 carry polygon
regions. Roughly 13 pages have an image and nothing else. This is in the source deposit, not introduced
by the conversion. Filter on `len(objects) > 0` or `len(regions) > 0` before training.
**There are no splits.** The upstream README documents `metadata/train.csv`, `val.csv` and `test.csv`;
none of those files exist in the published archive, including in `extras.zip`. Everything is in a single
`train` split. Make your own splits — and group by manuscript, not by page, since 555 pages come from
only 334 books and pages from the same book are highly correlated.
**No transcriptions.** The upstream documentation describes `text_line` elements as carrying
transcription data. The published `elements.csv` has no transcription column, so none is present here.
This is a layout dataset only.
**Dating is unknown per item.** The deposit does not ship per-manuscript dates, so there is no date
field. "Medieval and early modern" is the collection-level description, not something you can filter on.
### If you go back to the original deposit
The three annotation files are in three different text encodings, which is worth knowing before you
parse them yourself:
| File | Encoding |
|---|---|
| `extras/HORAE_LSv2.csv` | UTF-8 |
| `metadata/HORAE_LSv2_elements.csv` | latin-1 |
| `metadata/HORAE_LSv2_image_data.csv` | UTF-7 (`+AF8-` for `_`) |
Reading any of them as UTF-8 either raises or silently mangles every accented library name. The
conversion here decodes each with its own encoding.
The 2019 first release (HORAE_LS) referenced images by IIIF URL rather than shipping them; those URLs
rotted, which is why v2 exists with images included.
## Load
```python
from datasets import load_dataset
ds = load_dataset("biglam/horae-lsv2-layout", split="train")
# pages with decorative elements only — text_line is 60% of the polygons
decorated = ds.filter(
lambda r: any(x["type"] in {"miniature", "initial", "decoration"} for x in r["regions"])
)
```
## Licence
CC BY 4.0, following the upstream deposit. Attribution to the HORAE project creators, below.
Note that the source institutions holding the digitised manuscripts apply their own terms to the
underlying images; the Zenodo deposit is the layer licensed CC BY 4.0. Where you need to go back to an
institution's own copy, `iiif_url` points at it.
## Credit
Data created by Dominique Stutzmann and Lise Bernard Leterme (Institut de Recherche et d'Histoire des
Textes), Mélodie Boillet and Christopher Kermorvant (Teklia), and Marie-Laurence Bonhomme.
Converted and repackaged for the Hub by [Daniel van Strien](https://huggingface.co/davanstrien).
```bibtex
@dataset{stutzmann_2025_horae_lsv2,
author = {Stutzmann, Dominique and Bernard Leterme, Lise and Boillet, M{\'e}lodie and
Bonhomme, Marie-Laurence and Kermorvant, Christopher},
title = {{HORAE-LSv2. Layout Segmentation Dataset for Medieval Books of Hours}},
year = {2025},
version = {2.0},
publisher = {Zenodo},
doi = {10.5281/zenodo.16919911}
}
```