CoolFace
Datasetpublic

Sigurdur/isl-finepdfs-images

Icelandic FinePDFs Images Dataset Description This dataset contains page-level images extracted from Icelandic PDFs in the HuggingFaceFW/finepdfs collection (isl_Latn subset). Each PDF page has been converted to a PNG image with associated metadata and structured OCR output generated using rednote-hilab/dots.ocr. Dataset Summary Language: Icelandic (is) Source: HuggingFaceFW/finepdfs (isl_Latn) OCR Model: rednote-hilab/dots.ocr Format: PNG images… See the full description on the dataset page: https://huggingface.co/datasets/Sigurdur/isl-finepdfs-images.

sourceHugging Facecc-by-4.0updated 7mo agoView on Hugging Face
3likes106downloads
Dataset Card

Icelandic FinePDFs Images

Dataset Description

This dataset contains page-level images extracted from Icelandic PDFs in the HuggingFaceFW/finepdfs collection (isl_Latn subset). Each PDF page has been converted to a PNG image with associated metadata and structured OCR output generated using rednote-hilab/dots.ocr.

Dataset Summary

  • Language: Icelandic (is)
  • Source: HuggingFaceFW/finepdfs (isl_Latn)
  • OCR Model: rednote-hilab/dots.ocr
  • Format: PNG images with metadata and structured JSON OCR output
  • Use Cases:
  • Document layout analysis
  • OCR training and evaluation
  • Document understanding
  • Visual document classification
  • Page segmentation

Dataset Structure

Data Fields

Each row in the dataset contains:

  • image (Image): PNG image of a PDF page
  • source_pdf (string): Original PDF filename
  • source_url (string): URL of the source PDF
  • page_number (int64): Page number within the PDF (1-indexed)
  • total_pages (int64): Total number of pages in the source PDF
  • width (int64): Image width in pixels
  • height (int64): Image height in pixels
  • pdf_file_size (int64): Size of the source PDF file in bytes
  • ocr (string): Structured JSON OCR output from dots.ocr, containing detected text regions

The ocr column contains a JSON-serialized list of detected text blocks. Each block has the following structure:

KeyTypeDescription
boxlist[int]Bounding box of the text region as [x1, y1, x2, y2]
textstringTranscribed text content of the region
categorystringLayout category (e.g. "Title", "Text")
confidencefloatModel confidence score for the detection (0.0–1.0)

Example ocr entry:

json
[
  {"box": [366, 136, 1060, 502], "text": "Fjármálaeftirlitið", "category": "Title", "confidence": 1.0},
  {"box": [496, 721, 868, 760], "text": "Leiðbeinandi tilmæli", "category": "Text", "confidence": 1.0}
]

To parse the ocr column in Python:

python
import json
from datasets import load_dataset

dataset = load_dataset("Sigurdur/isl-finepdfs-images")
ocr_blocks = json.loads(dataset["train"][0]["ocr"])
for block in ocr_blocks:
    print(block["category"], block["text"])

Data Splits

This dataset contains a single train split with 1,130 examples.

Dataset Creation

Source Data

The source PDFs come from the HuggingFaceFW/finepdfs dataset, which is a large collection of high-quality PDFs filtered for educational and informational content.

Data Collection Process

  1. 1.PDFs are downloaded from URLs in the finepdfs dataset (isl_Latn subset)
  2. 2.PDFs smaller than 1KB are filtered out as invalid
  3. 3.Each PDF is converted to images using pdf2image (one image per page)
  4. 4.Images are kept in PNG format to preserve quality
  5. 5.Metadata is extracted during conversion (dimensions, page numbers, etc.)
  6. 6.OCR is performed on each page image using rednote-hilab/dots.ocr

Processing Pipeline

The dataset is created entirely in-memory without intermediate disk writes:

  • PDFs are downloaded directly to memory
  • Conversion to images happens in-memory
  • Images are uploaded to HuggingFace Hub without local caching

This approach is efficient for large-scale processing.

Usage

Loading the Dataset

python
from datasets import load_dataset

# Load the full dataset
dataset = load_dataset("Sigurdur/isl-finepdfs-images")

# Access individual samples
sample = dataset['train'][0]
image = sample['image']
source_pdf = sample['source_pdf']
page_number = sample['page_number']

Example: Display an Image with Metadata

python
from datasets import load_dataset
import matplotlib.pyplot as plt

dataset = load_dataset("Sigurdur/isl-finepdfs-images")
sample = dataset['train'][0]

plt.imshow(sample['image'])
plt.title(f"{sample['source_pdf']} - Page {sample['page_number']}/{sample['total_pages']}")
plt.axis('off')
plt.show()

print(f"Dimensions: {sample['width']}x{sample['height']}")
print(f"PDF size: {sample['pdf_file_size']:,} bytes")

Example: Parse OCR Output

python
import json
from datasets import load_dataset

dataset = load_dataset("Sigurdur/isl-finepdfs-images")
ocr_blocks = json.loads(dataset["train"][0]["ocr"])
for block in ocr_blocks:
    print(block["category"], block["text"])

Example: Filter by Page Number

python
# Get only first pages of documents
first_pages = dataset['train'].filter(lambda x: x['page_number'] == 1)

# Get multi-page documents only
multi_page_docs = dataset['train'].filter(lambda x: x['total_pages'] > 1)

Example: Group by Source PDF

python
from collections import defaultdict

dataset = load_dataset("Sigurdur/isl-finepdfs-images")

# Group pages by source PDF
pdfs = defaultdict(list)
for sample in dataset['train']:
    pdfs[sample['source_pdf']].append(sample)

# Access all pages from a specific PDF
for pdf_name, pages in pdfs.items():
    print(f"{pdf_name}: {len(pages)} pages")

Considerations for Using the Data

Image Quality

  • Images are generated from PDFs at default resolution (typically 200 DPI)
  • Quality depends on the source PDF quality
  • Some PDFs may contain scanned documents vs. native digital text

Language Content

  • All documents are in Icelandic
  • May include mixed content (text, images, charts, tables)
  • Document types vary (articles, reports, forms, etc.)

Recommended Use Cases

  • Training OCR models for Icelandic text
  • Document layout analysis
  • Page classification tasks
  • Visual document understanding
  • Multi-page document processing

License

This dataset inherits the license from the source HuggingFaceFW/finepdfs dataset. Please refer to the original dataset for licensing details.

Citation

If you use this dataset, please cite the original FinePDFs dataset:

bibtex
@misc{finepdfs,
  title={FinePDFs: A Large Collection of High-Quality PDFs},
  author={HuggingFace},
  year={2024},
  publisher={HuggingFace},
  url={https://huggingface.co/datasets/HuggingFaceFW/finepdfs}
}

You may also want to cite the OCR model used to generate transcriptions:

bibtex
@misc{rednote2025dotsocr,
  author    = {rednote-hilab},
  title     = {dots.ocr},
  year      = {2025},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/rednote-hilab/dots.ocr}
}

Dataset Card Authors

  • Sigurdur Haukur Birgisson

Additional Information

For questions or feedback about this dataset, please open an issue on the dataset repository.