Datasets:
File size: 4,021 Bytes
0186b78 4b364a1 b66d899 4b364a1 0186b78 4b364a1 0186b78 4b364a1 0186b78 4b364a1 0186b78 4b364a1 0186b78 4b364a1 0186b78 b66d899 0186b78 4b364a1 0186b78 4b364a1 0186b78 4b364a1 0186b78 4b364a1 b66d899 4b364a1 0186b78 4b364a1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | ---
dataset_info:
features:
- name: page_filename
dtype: string
- name: pdf_filename
dtype: string
- name: image
dtype: image
struct:
- name: bytes
dtype: binary
- name: path
dtype: string
- name: ocr_text
dtype: string
- name: params
dtype: string
license: apache-2.0
task_categories:
- text-generation
language:
- fr
- en
tags:
- military
- defense
size_categories:
- 10K<n<100K
---
# OCR-PDF-Degraded Dataset
## Overview
This dataset contains synthetically degraded document images paired with their ground truth OCR text. It addresses a critical gap in OCR model training by providing realistic document degradations that simulate real-world conditions encountered in production environments.
## Purpose
Most OCR models are trained on relatively clean, perfectly scanned documents. However, in real-world applications, especially in the military/defense sector, documents may be poorly scanned, photographed in suboptimal lighting conditions, or degraded due to environmental factors. This dataset aims to:
1. Enable the training of more robust OCR models that can handle imperfect document inputs
2. Establish a standardized benchmark for evaluating OCR performance under various degradation conditions
3. Bridge the gap between lab performance and real-world deployment for document processing systems
## Domain Focus
This first iteration focuses specifically on military/defense sector documents. These documents:
- Contain specialized terminology and formatting
- Often include tables, diagrams, and structured information
- May include mission-critical information where accurate OCR is essential
- Represent a sector where document digitization processes may not always be ideal
## Dataset Creation Process
The dataset was created through a systematic process of degrading clean PDF documents:

The process includes:
1. Starting with clean military/defense PDF documents
2. Extracting individual pages
3. Performing OCR on the clean pages to establish ground truth text
4. Applying various degradation effects to simulate real-world conditions
5. Recording both the degraded images and the corresponding degradation parameters
## Degradation Parameters
The dataset includes various degradation types:
- **Noise**: Random pixel noise at different intensities
- **Lighting**: Uneven illumination effects with varying intensities and positions
- **Perspective**: Distortions simulating non-flat document captures
- **Artifacts**: Lines, spots, and other common scanner/camera artifacts
- **Image Quality**: Variations in blur, brightness, contrast, and JPEG compression
Each image in the dataset includes specific parameter values, allowing for targeted evaluation and training.
## Usage Examples
This dataset is ideal for:
```python
# Example: Loading and using the dataset
from datasets import load_dataset
import json
dataset = load_dataset("racineai/ocr-pdf-degraded", split="train")
# Access a sample
sample = dataset[0]
# Get the degraded image
image = sample["image"]
# Get the ground truth OCR text
text = sample["ocr_text"]
# Access degradation parameters (for targeted training/evaluation)
params = json.loads(sample["params"])
noise_level = params["noise_level"]
print(noise_level)
```
## Limitations and Future Work
- Current iteration focuses only on military/defense documents
- Further domain expansion planned for legal, medical, and financial sectors
- Future versions may include handwritten text degradations
- Working on expansion to include multi-page document context
## Citation
If you use this dataset in your research, please cite:
```
@misc{racineai_ocr_pdf_degraded,
author = {RacineAI},
title = {OCR-PDF-Degraded: Synthetically Degraded Documents for Robust OCR},
year = {2025},
url = {https://huggingface.co/datasets/racineai/ocr-pdf-degraded}
}
```
## License
Apache 2.0 |