Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
image
label
class label
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
End of preview. Expand in Data Studio

PDFA OCR Dataset

Curated and Published by KREATIVE TIME BOX

This dataset contains document page images along with their corresponding OCR layout bounding box annotations derived from PDFA document extraction pipelines.


Dataset Overview

  • Organization / Creator: KREATIVE TIME BOX
  • Images: 27,499 PNG files (~8.8 GB)
  • JSON Annotations: 6,989 JSON files (~52 MB)
  • Image Format: PNG (RGB document page renders)
  • Annotation Format: JSON with text lines, normalized bounding boxes, and confidence scores

Directory Structure

Files are partitioned into two-character prefix subdirectories (e.g. images/00/, json/00/):

ktb-ocr-dataset/
β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ 00/
β”‚   β”‚   β”œβ”€β”€ 0001051_p3.png
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ 01/
β”‚   └── ...
β”œβ”€β”€ json/
β”‚   β”œβ”€β”€ 00/
β”‚   β”‚   β”œβ”€β”€ 0001051_p3.json
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ 01/
β”‚   └── ...
└── README.md

Annotation Schema

Each .json file contains a list of OCR text segment entries with the following structure:

[
  {
    "text": "Extracted OCR text line or word",
    "box": [xmin, ymin, xmax, ymax],
    "conf": 1.0
  }
]

Field Definitions

Field Type Description
text string The extracted text content.
box list[int] [xmin, ymin, xmax, ymax] normalized bounding box coordinates scaled to 0-1000.
conf float OCR confidence score (between 0.0 and 1.0).

Usage Example (Python)

1. Download Dataset

from huggingface_hub import snapshot_download

local_dir = snapshot_download(
    repo_id="infokreativetimebox/ktb-ocr-dataset",
    repo_type="dataset"
)

2. Loading Image and Associated OCR Data

import os
import json
from PIL import Image

data_dir = "ktb-ocr-dataset"
file_id = "0001074_p0"
prefix = file_id[:2]

# Load image
image_path = os.path.join(data_dir, "images", prefix, f"{file_id}.png")
if os.path.exists(image_path):
    img = Image.open(image_path)
    print(f"Loaded image size: {img.size}")

# Load OCR JSON
json_path = os.path.join(data_dir, "json", prefix, f"{file_id}.json")
if os.path.exists(json_path):
    with open(json_path, "r", encoding="utf-8") as f:
        ocr_data = json.load(f)
    print(f"Found {len(ocr_data)} OCR segments")

Citation & Attribution

If you use this dataset in your research or applications, please cite:

@misc{kreative_time_box_pdfa_2026,
  author    = {{KREATIVE TIME BOX}},
  title     = {PDFA OCR Dataset},
  year      = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/infokreativetimebox/ktb-ocr-dataset}}
}

License

This dataset is distributed under the Apache 2.0 License.

Downloads last month
367