Datasets:
Tasks:
Image-to-Text
Formats:
parquet
Sub-tasks:
document-question-answering
Languages:
Chinese
Size:
< 1K
License:
metadata
language:
- zh
license: other
pretty_name: FinePDFs OCR Training V1 Sample
size_categories:
- n<1K
task_categories:
- image-to-text
task_ids:
- document-question-answering
tags:
- ocr
- document-understanding
- chinese
- pdf
- parquet
- sample
configs:
- config_name: all
data_files:
- split: train
path: data/train/**/*.parquet
- config_name: text_no_table
data_files:
- split: train
path: data/train/text_no_table/*.parquet
- config_name: text_table_region
data_files:
- split: train
path:
- data/train/text_table_region_only/*.parquet
- data/train/text_table_region_and_table_expert/*.parquet
- config_name: table_expert
data_files:
- split: train
path:
- data/train/table_expert_only/*.parquet
- data/train/text_table_region_and_table_expert/*.parquet
FinePDFs OCR Training V1 Sample
这是 FinePDFs 中文 PDF OCR 训练数据 HuggingFace 发布格式的小样例。每条样本对应一个 PDF 页面图像,包含原图、MinerU doctag 伪标签、GLM/Paddle doctag 参考结果、一致性评分指标和训练目标分类。
规模
| 分区 | 样本数 |
|---|---|
text_no_table |
8 |
text_table_region_only |
8 |
table_expert_only |
8 |
text_table_region_and_table_expert |
8 |
| total unique rows | 32 |
总大小约 11.14 MiB。
构建流程
数据集按下面流程构建:
- 从 FinePDFs 中文 PDF 数据中下载 PDF,并过滤非简体中文材料。
- 将 PDF 拆分为单页图像,记录页面来源、尺寸、文件哈希等元信息。
- 对页面图像进行去重、图片质量过滤和 embedding 检索过滤,保留适合 OCR 训练的数据。
- 分别调用 MinerU、GLM OCR 和 PaddleOCR-VL 获取页面识别结果。
- 将 OCR 结果转换为统一的 doctag 表示,其中
mineru_doctags作为主要训练伪标签。 - 使用 MinerU 与 GLM 的结果计算一致性指标,包括文本编辑距离、表格 TEDS、表格 cell 文本编辑距离和 cell 字符准确率。
- 根据一致性指标筛选训练样本,并按训练用途划分为文本专家-无表格、文本专家-含表格和表格专家三类。
- 将通过筛选的样本写成 parquet,上传时只保留训练所需字段和可审计的评分字段。
mineru_doctags 是经过一致性筛选后的模型伪标签,不是人工逐字校对标注。
筛选口径
三类训练数据使用以下条件筛选:
text_no_table(文本专家-无表格):页面不含表格,且 MinerU/GLM 文本编辑距离mineru_glm_text_ed <= 0.30。text_table_region(文本专家-含表格):页面含表格,且表格外文本编辑距离mineru_glm_text_ed <= 0.30。这类数据用于提升表格外文本识别能力,并要求模型能表示表格区域,但不要求表格内部结构和内容完全准确。table_expert(表格专家):页面含表格,且mineru_glm_table_teds >= 0.70、mineru_glm_table_cell_text_ed <= 0.30、mineru_glm_table_cell_char_acc >= 0.70。这类数据用于训练表格结构和表格内容识别能力。
数据组织
样本按物理分区去重存储:
text_no_table: 文本专家-无表格。text_table_region_only: 只属于文本专家-含表格。table_expert_only: 只属于表格专家。text_table_region_and_table_expert: 同时属于文本专家-含表格和表格专家。
text_table_region 和 table_expert 两个逻辑 config 会共享重叠 combo 文件,但物理 parquet 只保存一份。
关键字段
image: 原始页面图像,使用 HuggingFaceImagefeature,可在数据集页面直接预览。mineru_doctags: MinerU doctag 伪标签,训练主标签。finepdfs_split: 原始 FinePDFs split。finepdfs_shard: 原始 FinePDFs parquet shard,相对 FinePDFsdata/目录。finepdfs_row_index: 原始 FinePDFs parquet shard 内的 0-based 行号。finepdfs_id: 原始 FinePDFs 记录 id。finepdfs_url: 原始 PDF URL。pdf_page_number: PDF 页码,1-based。glm_doctags: GLM doctag。paddle_doctags: Paddle doctag,如存在。is_text_no_table: 是否属于文本专家-无表格训练任务。is_text_table_region: 是否属于文本专家-含表格训练任务。is_table_expert: 是否属于表格专家训练任务。mineru_glm_text_ed: MinerU/GLM 文本编辑距离。mineru_glm_table_teds: 表格 TEDS。mineru_glm_table_cell_text_ed: 表格 cell 文本编辑距离。mineru_glm_table_cell_char_acc: 表格 cell 字符准确率。