mmcoqa_doc
收藏资源简介:
MMCOQA_Doc 是一个为多模态问答与复杂推理任务设计的开源数据集,包含从维基百科爬取的文本、表格和图像数据。数据集旨在支持需要组合式和跨模态理解的问答研究。数据以 Parquet 格式存储,并通过加载脚本重构为包含结构化组件的 JSON 文档。每个文档按标题组织,包含文本、表格和图像组件,其中文本和表格保留标题路径、超链接等信息,图像则包含元数据和实际字节数据。数据集规模为小于 1K 文档示例,适用于多模态信息处理和问答系统开发等场景。数据加载后,文档结构包含标题、文本(含段落标题路径和超链接)、表格(二维数组形式)和图像(含文件名、标题路径和描述文字),图像文件以 PNG 格式单独存储。
MMCOQA_Doc is an open-source dataset designed for multimodal question answering and complex reasoning tasks. It contains text, table, and image data crawled from Wikipedia. This dataset aims to support research on question answering that requires compositional and cross-modal understanding. The data is stored in Parquet format and restructured into JSON documents with structured components via loading scripts. Each document is organized by title and includes text, table, and image components. Text and table components retain information such as title paths, hyperlinks, and other relevant details, while image components contain metadata and actual byte data. The dataset comprises fewer than 1,000 document instances, and is applicable to scenarios including multimodal information processing and question answering system development. Once loaded, the document structure includes title, text (with paragraph title paths and hyperlinks), tables (in two-dimensional array format), and images (with file names, title paths, and descriptive text). Image files are stored separately in PNG format.
MMCOQA_Doc 数据集概述
数据集基本信息
- 名称:MMCOQA_Doc Dataset
- 许可证:apache-2.0
- 语言:英语 (en)
- 数据规模:小于1K (n<1K)
数据集来源与目的
- 该数据集包含为MMCOQA数据集爬取的维基百科数据。
- MMCOQA是一个为需要复杂推理的多模态问答而设计的数据集。
- 数据集包含来自维基百科文章的文本、表格和图像,旨在支持需要组合式和跨模态理解的问题回答研究。
数据内容与结构
- 数据集包含一个数据加载脚本,用于读取以Parquet格式存储的文本、表格和图像数据,并将其重建为独立的JSON文档及其对应的图像文件。
- 每个JSON文档按
doc_title组织,包含文本、表格和图像的结构化组件,并为每个元素保留了标题、说明文字和超链接。
配置与文件
数据集包含以下配置及其对应的数据文件:
- text_component 配置:包含
text.parquet文件(文本组件)。 - table_component 配置:包含
table.parquet文件(表格组件)。 - image_component 配置:包含
image.parquet文件(图像元数据组件)。 - image_dump 配置:包含
image_dump.parquet文件(图像的实际字节数据,通过image_name映射)。 - dev 配置:包含
dev.parquet文件(测试集)。
输出数据结构
每个文档存储为以下JSON结构: json { "title": "文档标题", "text": { "component_id_1": { "text": "主文本内容", "heading_path": ["章节1", "子章节A"], "hyperlinks": ["https://example.com"], "label_id": 0 } }, "table": { "component_id_2": { "table": [[...], [...]], "heading_path": ["章节2"], "hyperlinks": [], "label_id": 1 } }, "image": { "component_id_3": { "image_name": "image_1.png", "heading_path": ["章节3"], "caption": "图像说明文字", "hyperlinks": [], "label_id": 2 } } }
text、table、image字段使用组件ID作为键,包含每个组件的详细信息。- 图像文件以
.png格式保存在images/文件夹中。
使用方法
通过以下命令使用数据加载脚本: bash python load.py --parquet_path /path/to/parquet_data --save_path /path/to/restored_data
--parquet_path:包含Parquet文件的文件夹路径。--save_path:用于保存重建的JSON文档和图像的路径(该路径必须不存在)。
成功重建后,终端将显示类似以下输出: text Loading Parquet Files... Restoring JSON Documents: 100%|█████████████| 483/483 [00:04<00:00, 102.10it/s] Successfully restored 483 documents. Folder Path: /workspace/mmcoqa_load




