Legend-OCR / README.md
Nebulixlabs's picture
Upload dataset
fb52ed8 verified
|
Raw
History Blame Contribute Delete
2.53 kB
---
license: apache-2.0
language:
- en
task_categories:
- image-to-text
tags:
- ocr
- synthetic
- vision
- trocr
- llava
- florence-2
- text-recognition
- computer-vision
size_categories:
- 100K<n<1M
dataset_info:
features:
- name: image
dtype: image
- name: text
dtype: string
splits:
- name: train
num_bytes: 556311460.0
num_examples: 100000
download_size: 557311624
dataset_size: 556311460.0
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
# πŸ‘οΈ Legend-OCR Dataset
Welcome to the **Legend-OCR** dataset! This is a highly robust, synthetically generated Vision dataset designed specifically for training **Optical Character Recognition (OCR)** models and **Vision-Language Models (VLMs)** like TrOCR, Florence-2, LLaVA, and Qwen-VL.
## πŸ“Š Dataset Overview
- **Name:** Legend-OCR
- **Type:** Synthetic Vision-Text Pair
- **Size:** 100,000 High-Quality Images (Configurable)
- **Format:** Parquet (Embedded PNG Bytes + String Text)
- **Task:** Image-to-Text / OCR
- **Characters Covered:** Alphabets (A-Z, a-z), Numbers (0-9), and all standard Punctuation/Symbols.
---
## πŸš€ Key Features & Generation Logic
This dataset was procedurally generated using Python (PIL) with advanced randomization techniques to make the AI models robust against real-world variations:
1. **Massive Font Variety:** Uses multiple Linux-native fonts (`Ubuntu`, `Roboto`, `Noto`, `Liberation`) encompassing Regular, Bold, Italic, and Thin styles.
2. **Dynamic Text Lengths:**
- 30% of the dataset features **Single Characters** (perfect for basic symbol recognition and bounding box training).
- 70% features **10 to 20 Characters** (perfect for word and sentence-level context recognition).
3. **High-Contrast Backgrounds:**
- 50% Images: Dark Background with Light/White Text.
- 50% Images: Light Background with Dark/Black Text.
4. **Dynamic Image Sizing:** Bounding boxes and image canvas sizes scale automatically based on text length and randomized padding, teaching the model to focus on the subject rather than a fixed aspect ratio.
5. **Zero Hallucination:** Since the dataset is synthetically generated natively in code, the ground truth text has a **100% accuracy rate**.
---
## πŸ“‚ Dataset Structure
Under the hood, the dataset is saved in highly compressed Parquet format. The schema looks like this:
```json
{
"image": {
"bytes": "\u0089PNG\r\n\u001a\n\u0000\u0000\u0000\rIHDR...",
"path": null
},
"text": "Hello@123!"
}