glyph_machina_medieval_lines
收藏资源简介:
该数据集 glyph_machina_medieval_lines 是一个用于噪声手写文本识别(HTR)预训练的数据集。它由来自 AALT(英国法律手稿扫描项目)的前伊丽莎白一世时期英国法律手稿的文本行裁剪图像组成,并附带机器生成的转录文本。所有行图像均经过预处理:去扭曲、去除背景、颜色反转,并统一调整为 64 像素高度。转录文本去除了置信度前缀,并经过置信度过滤以降低噪声。数据以 WebDataset 格式组织,每个 tar 文件(约 1GB)是一个 shard,每个样本对应一页手稿。页面内包含按阅读顺序排序的行图像(最多 80 行),以及一个 JSON 文件存储该页所有行的转录文本。数据集适用于训练和评估手写文本识别模型,尤其是中世纪拉丁语手稿。使用建议通过 webdataset 库流式加载,避免本地存储,并支持多节点分布式训练。数据集为研究用途,仅限非商业使用。
The dataset glyph_machina_medieval_lines is a dataset for pre-training noise-robust handwritten text recognition (HTR). It consists of text line cropping images from pre-Elizabethan English legal manuscripts from the AALT (Anglo-American Legal Tradition) project, along with machine-generated transcriptions. All line images are preprocessed: dewarped, background removed, color inverted, and uniformly resized to 64 pixels in height. The transcriptions have confidence prefixes removed and are filtered by confidence to reduce noise. The data is organized in WebDataset format, with each tar file (approximately 1GB) being a shard, and each sample corresponding to a manuscript page. The page contains line images sorted by reading order (up to 80 lines) and a JSON file storing the transcriptions for all lines on that page. The dataset is suitable for training and evaluating handwritten text recognition models, especially for medieval Latin manuscripts. It is recommended to load the data via the webdataset library for streaming, avoiding local storage, and supporting multi-node distributed training. The dataset is for research purposes only and is limited to non-commercial use.
glyph_machina_medieval_lines 数据集概述
基本信息
- 任务类型:图像到文本(image-to-text)
- 语言:拉丁语(Latin)
- 标签:手写文本识别(HTR)、手写体、中世纪、拉丁语、WebDataset
- 许可证:仅限研究使用(research-only),许可链接指向 AALT 法律历史资源
数据集内容
数据来源与特点
- 来源:前伊丽莎白一世时期的英国法律手稿(AALT 扫描件)
- 转录方式:机器生成的转录文本,已去除置信度前缀,并经过置信度过滤
- 图像处理:文本行图像已进行去扭曲、背景去除、反色处理,高度统一为 64 像素
数据集格式
- 格式:按页面分组的 WebDataset 格式
- 分片结构:
data/*.tar为 WebDataset 分片文件,每片约 1 GB - 样本粒度:一个样本对应一个页面
页面样本结构
对于每个页面(例如 H4-E159no176-bE159no176dorses-IMG_0698),包含:
- 多个文本行图像文件(
.png),按阅读顺序(y 坐标排序)编号 - 一个 JSON 文件,包含该页面所有行的转录文本数组
关键参数
- 每个页面最多包含 80 行文本
- 分片文件命名规则:
b####.tar对应提取批次,loose-####.tar为原始运行批次 - 页面不会跨分片存储
- 数据集持续扩展中,新的
b####.tar分片会随提取进度不断添加
使用建议
流式加载
推荐使用 webdataset 库进行流式加载,特别适用于无本地存储的 GPU 集群环境。原因在于:
- 不同页面的行数不同,导致样本列数异构
- HF 的数据集构建器无法良好处理异构列,而
webdataset原生支持
解码方式
- PNG 图像使用
PIL.Image.open(io.BytesIO(b))解码 - 图像模式为灰度(
L),高度 64 像素,白字黑底




