Dataset Viewer
Auto-converted to Parquet Duplicate
document_id
stringlengths
9
9
page_number
stringlengths
9
9
image
imagewidth (px)
600
600
text
stringlengths
0
4.54k
alto_xml
stringlengths
595
126k
has_image
bool
1 class
has_alto
bool
1 class
markdown
stringlengths
135
21.8k
inference_info
stringclasses
1 value
204486115
204788144
ENVIRONMENTAL PROTECTION Air Pollutants: UK Emissions of Selected Gases from All Sources Million tonnes Source: National Environmental Technology Centre regulations for emissions such as carbon dioxide, hydrocarbons, oxides of nitrogen and particulate matter. Three EC Directives agreed during the UK Presidency, and whi...
<?xml version="1.0" encoding="UTF-8"?> <alto xmlns="http://www.loc.gov/standards/alto/v3/alto.xsd"><Description><MeasurementUnit>pixel</MeasurementUnit><sourceImageInformation><fileName>./data/pdfs/204486115.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ...
true
true
1971 **Air Pollutants: UK Emissions of Selected Gases from All Sources** **Million tonnes** - Carbon monoxide - Sulphur dioxide - Nitrogen oxides - Black smoke **Source:** National Environmental Technology Centre --- **Regulations for emissions such as carbon dioxide, hydrocarbons, oxides of nitrogen and particul...
[{"column_name": "markdown", "model_id": "deepseek-ai/DeepSeek-OCR", "processing_date": "2025-10-22T18:00:11.260906", "resolution_mode": "large", "base_size": 1280, "image_size": 1280, "crop_mode": false, "prompt": "<image>\nFree OCR.", "prompt_mode": "free", "batch_size": 512, "max_tokens": 8192, "gpu_memory_utilizati...
204486117
204805723
26: SCIENCE, ENGINEERING AND TECHNOLOGY Activities such as these are important in assuring continued interest in SET among young people making educational and career choices. They also help to enhance the public’s ability to relate to scientific issues in general and to make informed judgments about scientific developm...
<?xml version="1.0" encoding="UTF-8"?> <alto xmlns="http://www.loc.gov/standards/alto/v3/alto.xsd"><Description><MeasurementUnit>pixel</MeasurementUnit><sourceImageInformation><fileName>./data/pdfs/204486117.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ...
true
true
26: SCIENCE, ENGINEERING AND TECHNOLOGY Activities such as these are important in assuring continued interest in SET among young people making educational and career choices. They also help to enhance the public’s ability to relate to scientific issues in general and to make informed judgments about scientific develop...
[{"column_name": "markdown", "model_id": "deepseek-ai/DeepSeek-OCR", "processing_date": "2025-10-22T18:00:11.260906", "resolution_mode": "large", "base_size": 1280, "image_size": 1280, "crop_mode": false, "prompt": "<image>\nFree OCR.", "prompt_mode": "free", "batch_size": 512, "max_tokens": 8192, "gpu_memory_utilizati...
189742219
189881032
"Peterhead ■\nChapelcross\n▲ Dinorwig \\\nA Ffestiniog\n• Trawsfynydd\nRatcliffe-on-Soar\nRhei(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"0 20 40 60 80 100 120 km\n\n: 0 20 40 60 80 miles\n\n: Conventional power stations (1,000 MW and ov(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
204486089
204586555
"8\nBRITAIN: AN OFFICIAL HANDBOOK\nBritain, as in all countries before the development of medical sc(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"8\n\nBRITAIN: AN OFFICIAL HANDBOOK\n\nBritain, as in all countries before the development of medica(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
204486116
204791459
"Abbeys and Priories: p. 1, English Heritage Photo Library; p. 2, Crown Copyright, Historic\nScotlan(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"1, English Heritage Photo Library; p. 2, Crown Copyright, Historic Scotland; p. 3, Lester Tipton; p(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
189742213
189840602
"6\nSocial Welfare\nThe British social welfare system comprises the National Health Service, the\npe(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"6 Social Welfare\n\nThe British social welfare system comprises the National Health Service, the pe(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
204486104
204702331
"Acknowledgment is made for photographs to: General Council\nof British Shipping for National Sea Tr(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"The front cover shows an artist’s impression of the Great Seal of the Realm which is affixed to S(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
204486092
204614323
"242\nBRITAIN: AN OFFICIAL HANDBOOK\nSociety of Film and\nTelevision Arts\nAssistance to\nBritish Fi(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"242\n\nBRITAIN: AN OFFICIAL HANDBOOK\n\nThe National Film Theatre, on the south bank of the Thames,(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
204486095
205332263
"INDUSTRY\n261\nThe British Standards Institution (BSI) is a voluntary non-profit-making\nbody incor(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"261\n\nThe British Standards Institution (BSI) is a voluntary non-profit-making body incorporated b(...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
204486111
204752329
"BRITAIN 1995: AN OFFICIAL HANDBOOK\nsignificant contribution to the economy,\ndirectly providing ov(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"75 per cent of the land area of Scotland is devoted to agriculture. Much of this is rough grazing ((...TRUNCATED)
"[{\"column_name\": \"markdown\", \"model_id\": \"deepseek-ai/DeepSeek-OCR\", \"processing_date\": \(...TRUNCATED)
End of preview. Expand in Data Studio

Document OCR using DeepSeek-OCR

This dataset contains markdown-formatted OCR results from images in NationalLibraryOfScotland/Britain-and-UK-Handbooks-Dataset using DeepSeek-OCR.

Processing Details

Configuration

  • Image Column: image
  • Output Column: markdown
  • Dataset Split: train
  • Batch Size: 512
  • Resolution Mode: large
  • Base Size: 1280
  • Image Size: 1280
  • Crop Mode: False
  • Max Model Length: 8,192 tokens
  • Max Output Tokens: 8,192
  • GPU Memory Utilization: 80.0%

Model Information

DeepSeek-OCR is a state-of-the-art document OCR model that excels at:

  • 📐 LaTeX equations - Mathematical formulas preserved in LaTeX format
  • 📊 Tables - Extracted and formatted as HTML/markdown
  • 📝 Document structure - Headers, lists, and formatting maintained
  • 🖼️ Image grounding - Spatial layout and bounding box information
  • 🔍 Complex layouts - Multi-column and hierarchical structures
  • 🌍 Multilingual - Supports multiple languages

Resolution Modes

  • Tiny (512×512): Fast processing, 64 vision tokens
  • Small (640×640): Balanced speed/quality, 100 vision tokens
  • Base (1024×1024): High quality, 256 vision tokens
  • Large (1280×1280): Maximum quality, 400 vision tokens
  • Gundam (dynamic): Adaptive multi-tile processing for large documents

Dataset Structure

The dataset contains all original columns plus:

  • markdown: The extracted text in markdown format with preserved structure
  • inference_info: JSON list tracking all OCR models applied to this dataset

Usage

from datasets import load_dataset
import json

# Load the dataset
dataset = load_dataset("{{output_dataset_id}}", split="train")

# Access the markdown text
for example in dataset:
    print(example["markdown"])
    break

# View all OCR models applied to this dataset
inference_info = json.loads(dataset[0]["inference_info"])
for info in inference_info:
    print(f"Column: {{info['column_name']}} - Model: {{info['model_id']}}")

Reproduction

This dataset was generated using the uv-scripts/ocr DeepSeek OCR vLLM script:

uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/deepseek-ocr-vllm.py \\
    NationalLibraryOfScotland/Britain-and-UK-Handbooks-Dataset \\
    <output-dataset> \\
    --resolution-mode large \\
    --image-column image

Performance

  • Processing Speed: ~0.6 images/second
  • Processing Method: Batch processing with vLLM (2-3x speedup over sequential)

Generated with 🤖 UV Scripts

Downloads last month
26