SDS-KoPub-OCR
收藏SDS-KoPub OCR Results & Embeddings 数据集概述
数据集基本信息
- 许可证: CC BY 4.0
- 任务类别: 文档问答、视觉问答
- 语言: 韩语
- 标签: OCR、文档理解、嵌入、韩语
- 规模: 10K<n<100K
数据集描述
本数据集为 SDS-KoPub-VDR-Benchmark 语料库(包含 40,781 页韩语公共文档)提供了 OCR 布局解析结果和视觉语言嵌入。
文件内容
| 文件 | 描述 | 大小 |
|---|---|---|
ocr_results.jsonl |
GLM-OCR 结构化布局结果(区域、Markdown、边界框、标签) | 40,781 条记录 |
parsed_texts.jsonl |
每页提取的文本(嵌入输入) | 40,781 条记录 |
embeddings/corpus_regions.npy |
区域多模态嵌入(图像+标题) | (21052, 2048) |
embeddings/region_metadata.jsonl |
区域元数据(页面ID、标题、标签) | — |
embeddings/corpus_ocr_text.npy |
OCR 文本嵌入 | (40781, 2048) |
embeddings/queries.npy |
查询嵌入 | (600, 2048) |
crops.tar.gz |
图像/图表区域裁剪 | 21,052 张图像 |
使用的模型
- OCR: GLM-OCR (0.9B,布局通过 PP-DocLayoutV3 实现)
- 嵌入: Qwen3-VL-Embedding-2B-FP8 (2048 维)
OCR 结果格式
ocr_results.jsonl 中的每一行格式如下:
json
{
"page_id": "doc_123_page_0",
"page_idx": 0,
"regions": [
{"index": 0, "label": "doc_title", "bbox_2d": [x1, y1, x2, y2], "content": "..."},
{"index": 1, "label": "table", "bbox_2d": [...], "content": "<table>...</table>"},
{"index": 2, "label": "image", "bbox_2d": [...], "content": null}
],
"markdown": "# Title
| col1 | col2 | ...", "image_crops": [{"path": "crops/doc_123_page_0_crop_2.jpg", "bbox": [...], "label": "image"}] }
使用方法示例
python import json import numpy as np from huggingface_hub import hf_hub_download
加载 OCR 结果
path = hf_hub_download("Forturne/SDS-KoPub-OCR", "ocr_results.jsonl", repo_type="dataset") with open(path) as f: records = [json.loads(line) for line in f]
加载嵌入
reg_emb = np.load(hf_hub_download("Forturne/SDS-KoPub-OCR", "embeddings/corpus_regions.npy", repo_type="dataset")) txt_emb = np.load(hf_hub_download("Forturne/SDS-KoPub-OCR", "embeddings/corpus_ocr_text.npy", repo_type="dataset")) q_emb = np.load(hf_hub_download("Forturne/SDS-KoPub-OCR", "embeddings/queries.npy", repo_type="dataset"))
检索:余弦相似度(嵌入已进行 L2 归一化)
scores_text = q_emb @ txt_emb.T # (num_queries, num_pages) scores_region = q_emb @ reg_emb.T # (num_queries, num_regions)
生成信息
- 生成工具:
run_b200_pipeline.py - 硬件平台: NVIDIA B200 (192GB)



