Datasets:
metadata
license: apache-2.0
PIN-10M
A mini version of "PIN: A Knowledge-Intensive Dataset for Paired and Interleaved Multimodal Documents"
This dataset contains 10M samples with PIN format.
0 Usage
解压缩
cat data.tar.part* > data.tar
tar -xvf data.tar
1 Dataset statistics
DocLayNet: 68, 757
OBELICS: 466, 503
2 Data Structure
2.1 Folder Structure
example_dataset/
│
├── content_image/ - 包含内容里面的图片。
├── overall_image/ - 包含每一个多模态文档的整体概览的图片。
└── example_dataset.jsonl - 包含数据集元数据的JSON Lines文件。
值得注意的是,单个文件夹下的文件数量最好不要超过 100,000个(10万)。假如是分part的话,我们可以考虑多个文件夹,如下:
example_dataset/
│
├── part00/
│ ├── content_image/
│ ├── overall_image/
│ └── part00.jsonl - 包含第一部分数据集元数据的JSON Lines文件。
│
├── part01/ - 数据集的第二部分,结构与part00相同。
│ ├── content_image/
│ ├── overall_image/
│ └── part01.jsonl
│
... - 更多类似的部分。
2.2 JSON Lines Format
该名称我们可以根据情况不同而进行讨论确定。不过我个人倾向于与父文件夹保持一致。
其中一条数据:
该名称我们可以根据情况不同而进行讨论确定。不过我个人倾向于与父文件夹保持一致。
其中一条数据:
{
"id": 0,
"meta": {
"language": "en",
"doc_id": "NYSE_F_2004.pdf",
"oi_exist": true,
"ori_meta": null,
"download_date": "2024-03-16",
"source_dataset": "DocLayNet",
"page_id": "72"
},
"quality_signals": null,
"license": "https://cdla.io/permissive-1-0/",
"overall_image": "overall_image/c6effb847ae7e4a80431696984fa90c98bb08c266481b9a03842422459c43bdd.png",
"md": "markdown file"
"content_image": [
"content_image/13.jpg",
"content_image/14.jpg"
]
}
解释:
- id: 每一个条数据的唯一id。
- meta: 每条数据(多模态文档)的meta信息。
- language: 语言,中文(zh),英文(en)等。
- source_dataset: 假如该文档是转换而来的,则在此标注出原始的数据集名称,如不是则为None。
- doc_id: 一个唯一的document id,标识该文档的名称信息等。
- page_id: 一个唯一的page id,标识该文档所在页码位置。如只有一个页码,那就为None,只有多文档的时候才会有page_id,一般从1开始。
- download_date: 下载日期。
- ori_meta: 原始的数据集也许会包含meta信息,所以在此保留了,假如无则为None。
- oi_exist: 是否存在overall image。True or False。假如是True,则意味着overall image来自于数据集本身,假如为False则是通过我们的代码的编译结果。
- ...
- quality_signals: 质量信号,参考了redpajama v2的设计。
- doc_length: 文档长度。
- ...
- content_image: 存放该文档内提到的images的列表,如无则为None。有的话,[image1, image2, image3, ...]。
- overall_image: 存放对应的overall image的路径。
- md:存放markdown内容本身。
- license:存放license。
2.3 content_image 文件夹
存放各个文档里面用到的图片。
注:需要全部都转换成png格式。文件名只要是文件夹内唯一即可。
content_image/
│
├── 1.png
├── 2.png
...
2.4 overall_image 文件夹
存放各个文档对应的overall图片。
注:需要全部都转换成png格式。文件名只要是文件夹内唯一即可。
overall_image/
│
├── 1.png
├── 2.png
...
2.5 Examples of jsonl files
考虑到文章的长度有限,所以我们特地选择了比较短的markdown文件的样例。
An example of DocLynet:
{
"id": 0,
"meta": {
"language": "en",
"oi_exist": true,
"source_dateset": "DocLayNet",
"ori_meta": null,
"doc_id": "NYSE_F_2004.pdf",
"page_id": "0",
"date_download": "2024-3-24"
},
"quality_signals": null,
"license": "https://cdla.io/permissive-1-0/",
"content_image": [
"content_image/34102.jpg"
],
"overall_image": "overall_image/3562e47265520f7a72f3eac73aadfe19a78531698c3b50d7670b8ad9b214106b.png",
"md": "<img src='/datasets/m-a-p/PIN-14M/resolve/main/content_image/34102.jpg'>\n\n# Ford Motor Company / 2004 Annual Report \n\n# R W A R D F O R W A R D \n\n"
}
An example of OBELICS:
{
"id": 466502,
"meta": {
"language": "en",
"oi_exist": true,
"source_dateset": "OBELICS",
"ori_meta": {
"document_url": "https://www.donegaldaily.com/2022/02/21/watch-incredible-storm-surge-at-portsalon-golf-club/",
"unformatted_src": "https://www.donegaldaily.com/wp-content/uploads/2022/02/Screenshot-2022-02-21-at-17.54.30.jpg",
"src": "https://www.donegaldaily.com/wp-content/uploads/2022/02/Screenshot-2022-02-21-at-17.54.30.jpg",
"formatted_filename": "Screenshot at",
"rendered_width": 817,
"rendered_height": 419,
"original_width": 817,
"original_height": 419,
"format": "jpeg",
"general_meta": {
"url": "https://www.donegaldaily.com/2022/02/21/watch-incredible-storm-surge-at-portsalon-golf-club/",
"warc_filename": "crawl-data/CC-MAIN-2022-27/segments/1656103271864.14/warc/CC-MAIN-20220626192142-20220626222142-00308.warc.gz",
"warc_record_offset": 795020636,
"warc_record_length": 31271
}
},
"doc_id": 98496,
"page_id": 0,
"date_download": "2024-4-22"
},
"md": "<img src='/datasets/m-a-p/PIN-14M/resolve/main/content_image/98496-0.png'>\n\nThe golf course at Portsalon Golf Club took a battering today as a result of Storm Franklin.\n\nDonegal had been left battered and bruised overnight after Storm Franklin ripped across the county.\n\nThere were trees down on the approach roads to Donegal Town and in Gartan.\n\nThere were also trees down in Inishowen while there is also heavy water reported along the sides of roads with motorists asked to slow down and not put themselves in danger.\n\nDonegal’s coastline took a huge impact with massive waves reported along the coastline around the county.\n\nThe video, taken by Johnny Shields was taken from the tee box of the third hole.",
"license": "CC-BY-4.0",
"quality_signals": null,
"content_image": [
"content_image/98496-0.png"
],
"overall_image": "overall_image/98496-0.png"
}
TODO
License
混合License。
如,该数据来自我们的工作,请遵循Apache 2.0 License。如,该数据来自第三方,请遵循该第三方的License。