{"id":26356566,"url":"https://github.com/ds4sd/doclaynet","last_synced_at":"2026-02-11T10:02:34.756Z","repository":{"id":37426557,"uuid":"457430807","full_name":"DS4SD/DocLayNet","owner":"DS4SD","description":"DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis","archived":false,"fork":false,"pushed_at":"2023-02-01T06:44:02.000Z","size":62748,"stargazers_count":365,"open_issues_count":3,"forks_count":21,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-10T23:51:47.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DS4SD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-09T16:07:30.000Z","updated_at":"2025-08-10T14:19:08.000Z","dependencies_parsed_at":"2023-02-17T03:00:30.587Z","dependency_job_id":null,"html_url":"https://github.com/DS4SD/DocLayNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DS4SD/DocLayNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FDocLayNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FDocLayNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FDocLayNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FDocLayNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DS4SD","download_url":"https://codeload.github.com/DS4SD/DocLayNet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FDocLayNet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29331602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-16T13:31:09.622Z","updated_at":"2026-02-11T10:02:34.735Z","avatar_url":"https://github.com/DS4SD.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocLayNet\n\nDocLayNet is a human-annotated document layout segmentation dataset containing `80863` pages from a broad variety of document sources.\n\n## News\n\n|   |    |\n| :---------- | :----------------------------------- |\n| **Jan. 26th, 2023**      | The DocLayNet dataset is available on Hugging Face [ds4sd/DocLayNet](https://huggingface.co/datasets/ds4sd/DocLayNet). |\n| **Jan. 13th, 2023**      | We are hosting a competition on layout segmentation in corporate documents in ICDAR 2023. Find the details in the [competition website](https://ds4sd.github.io/icdar23-doclaynet/). |\n\n## Overview\n\nDocLayNet provides page-by-page layout segmentation ground-truth using bounding-boxes for 11 distinct class labels on 80863 unique pages from 6 document categories. It provides several unique features compared to related work such as PubLayNet or DocBank:\n\n1. *Human Annotation*: DocLayNet is hand-annotated by well-trained experts, providing a gold-standard in layout segmentation through human recognition and interpretation of each page layout\n2. *Large layout variability*: DocLayNet includes diverse and complex layouts from a large variety of public sources in Finance, Science, Patents, Tenders, Law texts and Manuals\n3. *Detailed label set*: DocLayNet defines 11 class labels to distinguish layout features in high detail.\n4. *Redundant annotations*: A fraction of the pages in DocLayNet are double- or triple-annotated, allowing to estimate annotation uncertainty and an upper-bound of achievable prediction accuracy with ML models\n5. *Pre-defined train- test- and validation-sets*: DocLayNet provides fixed sets for each to ensure proportional representation of the class-labels and avoid leakage of unique layout styles across the sets.\n\n## Using the dataset with :hugs: Hugging Face\n\nThe DocLayNet dataset is available on Hugging Face at [ds4sd/DocLayNet](https://huggingface.co/datasets/ds4sd/DocLayNet).\n\n```py\n\u003e\u003e\u003e from datasets import load_dataset\n\n\u003e\u003e\u003e dataset = load_dataset(\"ds4sd/DocLayNet\")\n\n\u003e\u003e\u003e dataset\nDatasetDict({\n    train: Dataset({\n        features: ['image_id', 'image', 'width', 'height', 'doc_category', 'collection', 'doc_name', 'page_no', 'objects'],\n        num_rows: 69375\n    })\n    validation: Dataset({\n        features: ['image_id', 'image', 'width', 'height', 'doc_category', 'collection', 'doc_name', 'page_no', 'objects'],\n        num_rows: 6489\n    })\n    test: Dataset({\n        features: ['image_id', 'image', 'width', 'height', 'doc_category', 'collection', 'doc_name', 'page_no', 'objects'],\n        num_rows: 4999\n    })\n})\n```\n\n## Download\n\n| Dataset | Records | Size(GB) | URL  |\n|------------------|---------|----------|-------------|\n| DocLayNet core dataset| 80,863    | 28 GiB     | [Download](https://codait-cos-dax.s3.us.cloud-object-storage.appdomain.cloud/dax-doclaynet/1.0.0/DocLayNet_core.zip)|\n| DocLayNet extra files| 80,863    | 7.5 GiB     | [Download](https://codait-cos-dax.s3.us.cloud-object-storage.appdomain.cloud/dax-doclaynet/1.0.0/DocLayNet_extra.zip)|\n\nAdditionally, we provide the labeling guideline used for training of the annotation experts [here](https://raw.githubusercontent.com/DS4SD/DocLayNet/main/assets/DocLayNet_Labeling_Guide_Public.pdf). \n\n## Dataset structure\n\nDocLayNet provides four types of data assets:\n\n1. PNG images of all pages, resized to square `1025 x 1025px`\n2. Bounding-box annotations in COCO format for each PNG image\n3. Extra: Single-page PDF files matching each PNG image\n4. Extra: JSON file matching each PDF page, which provides the digital text cells with coordinates and content\n\nThe dataset is organized in the following directory structure:\n\n*Doclaynet core dataset*\n\n```\n├── COCO\n│   ├── test.json\n│   ├── train.json\n│   └── val.json\n├── PNG\n│   ├── \u003chash\u003e.png\n│   ├── ...\n```\n\n*Doclaynet extra files*\n\n```\n├── PDF\n│   ├── \u003chash\u003e.pdf\n│   ├── ...\n├── JSON\n│   ├── \u003chash\u003e.json\n│   ├── ...\n\n```\n\n## Data format details\n\n### Pages\nDocument pages are provided as bitmap images (PNG) and in original PDF format. The layout annotations in COCO format are referring to the PNG images only.\n\n\n### COCO annotations\nFor bounding-box annotations, DocLayNet provides standard COCO format annotations as defined [here](https://cocodataset.org/#format-data).\nEach COCO image record contains additional custom fields to allow data sub-selection and provide provenance.\n\n\n#### Example page with bounding-box annotations\n\n![example_page](assets/132a855ee8b23533d8ae69af0049c038171a06ddfcac892c3c6d7e6b4091c642.png)\n\n#### Example COCO image record\n\n```js\n    ...\n    {\n      \"id\": 1,\n      \"width\": 1025,\n      \"height\": 1025,\n      \"file_name\": \"132a855ee8b23533d8ae69af0049c038171a06ddfcac892c3c6d7e6b4091c642.png\",\n\n      // Custom fields:\n      \"doc_category\": \"financial_reports\" // high-level document category\n      \"collection\": \"ann_reports_00_04_fancy\", // sub-collection name\n      \"doc_name\": \"NASDAQ_FFIN_2002.pdf\", // original document filename\n      \"page_no\": 9, // page number in original document\n      \"precedence\": 0, // Annotation order, non-zero in case of redundant double- or triple-annotation\n    },\n    ...\n```\n\nThe `doc_category` field uses one of the following constants:\n\n```\nfinancial_reports,\nscientific_articles,\nlaws_and_regulations,\ngovernment_tenders,\nmanuals,\npatents\n```\n\n\n#### Example COCO annotation records\n\nThe annotation records shown below all belong to the page image shown above. Every bounding-box is a separate record, matched to the common `image_id`.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand...\u003c/summary\u003e\n\n```\n  \"annotations\": [\n    {\n      \"id\": 8,\n      \"image_id\": 1,\n      \"category_id\": 1,\n      \"bbox\": [\n        210.06018382352943,\n        31.14536268939389,\n        173.9850743464052,\n        39.270946654040586\n      ],\n      \"segmentation\": [\n        [\n          210.06018382352943,\n          31.14536268939389,\n          210.06018382352943,\n          70.41630934343448,\n          384.04525816993464,\n          70.41630934343448,\n          384.04525816993464,\n          31.14536268939389\n        ]\n      ],\n      \"area\": 6832.558573256964,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 9,\n      \"image_id\": 1,\n      \"category_id\": 7,\n      \"bbox\": [\n        434.9334063800317,\n        -0.4906348977078778,\n        589.8585905504372,\n        590.2337819428021\n      ],\n      \"segmentation\": [\n        [\n          434.9334063800317,\n          -0.4906348977078778,\n          434.9334063800317,\n          589.7431470450942,\n          1024.791996930469,\n          589.7431470450942,\n          1024.791996930469,\n          -0.4906348977078778\n        ]\n      ],\n      \"area\": 348154.46671203536,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 10,\n      \"image_id\": 1,\n      \"category_id\": 8,\n      \"bbox\": [\n        66.99346405228758,\n        112.10344760101009,\n        290.869358251634,\n        13.66279703282828\n      ],\n      \"segmentation\": [\n        [\n          66.99346405228758,\n          112.10344760101009,\n          66.99346405228758,\n          125.76624463383837,\n          357.8628223039216,\n          125.76624463383837,\n          357.8628223039216,\n          112.10344760101009\n        ]\n      ],\n      \"area\": 3974.0890048610913,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 11,\n      \"image_id\": 1,\n      \"category_id\": 10,\n      \"bbox\": [\n        66.99346405228758,\n        133.5865287247475,\n        325.3560694444444,\n        131.31064046717177\n      ],\n      \"segmentation\": [\n        [\n          66.99346405228758,\n          133.5865287247475,\n          66.99346405228758,\n          264.89716919191926,\n          392.34953349673196,\n          264.89716919191926,\n          392.34953349673196,\n          133.5865287247475\n        ]\n      ],\n      \"area\": 42722.71385863161,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 12,\n      \"image_id\": 1,\n      \"category_id\": 10,\n      \"bbox\": [\n        66.99346405228758,\n        272.84557828282834,\n        325.4857017973857,\n        131.3025\n      ],\n      \"segmentation\": [\n        [\n          66.99346405228758,\n          272.84557828282834,\n          66.99346405228758,\n          404.14807828282835,\n          392.4791658496732,\n          404.14807828282835,\n          392.4791658496732,\n          272.84557828282834\n        ]\n      ],\n      \"area\": 42737.08636025123,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 13,\n      \"image_id\": 1,\n      \"category_id\": 10,\n      \"bbox\": [\n        66.99346405228758,\n        414.8919160353536,\n        325.69678145424837,\n        80.83059406565656\n      ],\n      \"segmentation\": [\n        [\n          66.99346405228758,\n          414.8919160353536,\n          66.99346405228758,\n          495.72251010101013,\n          392.6902455065359,\n          495.72251010101013,\n          392.6902455065359,\n          414.8919160353536\n        ]\n      ],\n      \"area\": 26326.26433021921,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 14,\n      \"image_id\": 1,\n      \"category_id\": 10,\n      \"bbox\": [\n        112.37566899509804,\n        626.7556887626263,\n        863.111772998366,\n        310.9754294507576\n      ],\n      \"segmentation\": [\n        [\n          112.37566899509804,\n          626.7556887626263,\n          112.37566899509804,\n          937.7311182133839,\n          975.487441993464,\n          937.7311182133839,\n          975.487441993464,\n          626.7556887626263\n        ]\n      ],\n      \"area\": 268406.55427217163,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    {\n      \"id\": 15,\n      \"image_id\": 1,\n      \"category_id\": 5,\n      \"bbox\": [\n        18.32874183006536,\n        1005.2406660353536,\n        7.4496732026143775,\n        10.353535094696968\n      ],\n      \"segmentation\": [\n        [\n          18.32874183006536,\n          1005.2406660353536,\n          18.32874183006536,\n          1015.5942011300506,\n          25.77841503267974,\n          1015.5942011300506,\n          25.77841503267974,\n          1005.2406660353536\n        ]\n      ],\n      \"area\": 77.13045294729152,\n      \"iscrowd\": 0,\n      \"precedence\": 0\n    },\n    ...\n  ]\n\n```\n\u003c/details\u003e\n\n\n### Extra: JSON files\n\nDocLayNet provides auxiliary JSON files which contain the bounding-box coordinates and text for every PDF cell, and additional metadata. This data is generated only from the PDFs and is independent from the annotations.  \n\n#### Example JSON data\n\nThe snippet below shows part of the JSON data for the page shown further above. The text cell shown is the section heading (index: 3). \n\n```js\n{\n  \"metadata\": {\n    \"page_hash\": \"132a855ee8b23533d8ae69af0049c038171a06ddfcac892c3c6d7e6b4091c642\", // unique identifier, equal to filename\n    \"original_filename\": \"NASDAQ_FFIN_2002.pdf\", // original document filename\n    \"page_no\": 9, // page number in original document\n    \"num_pages\": 28, // total pages in original document\n    \"original_width\": 612, // width in pixels @72 ppi\n    \"original_height\": 792, // height in pixels @72 ppi\n    \"coco_width\": 1025, // with in pixels in PNG and COCO format\n    \"coco_height\": 1025, // with in pixels in PNG and COCO format\n    \"collection\": \"ann_reports_00_04_fancy\", // sub-collection name\n    \"doc_category\": \"financial_reports\" // high-level document category\n  },\n  \"cells\": [ // all text cells in the digital PDF data\n    {\n      // Bounding-box coordinates of text cells,\n      // formatted as [x,y,w,h] (same as COCO annotations)\n      // where (x,y) is the upper-left corner and\n      //       (w,h) is the width and height\n      // in the coordinate space of (0,0, coco_width, coco_height)\n      \"bbox\": [\n        66.99346405228758,\n        112.10344760101009,\n        290.869358251634,\n        13.66279703282828\n      ],\n      \"text\": \"Leigh Taliaferro, M.D., values consistency.\", // string content of cell\n      \"font\": {\n        \"color\": [\n          12,\n          72,\n          142,\n          255\n        ],\n        \"name\": \"/AAAAAC+HelveticaNeue-Medium\",\n        \"size\": 1\n      }\n    },\n    ...\n```\n\n\n## Paper\n\n**\"DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis\"** (KDD 2022).\n\n- Birgit Pfitzmann (bpf@zurich.ibm.com)\n- Christoph Auer (cau@zurich.ibm.com)\n- Michele Dolfi (dol@zurich.ibm.com)\n- Ahmed Nassar (ahn@zurich.ibm.com)\n- Peter Staar (taa@zurich.ibm.com)\n\nArXiv link: https://arxiv.org/abs/2206.01062\n\n**Citation:**\n\n```\n@article{doclaynet2022,\n  title = {DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis},  \n  doi = {10.1145/3534678.353904},\n  url = {https://arxiv.org/abs/2206.01062},\n  author = {Pfitzmann, Birgit and Auer, Christoph and Dolfi, Michele and Nassar, Ahmed S and Staar, Peter W J},\n  year = {2022}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fdoclaynet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fds4sd%2Fdoclaynet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fdoclaynet/lists"}