You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

TextRenderLab OCR Dataset

This dataset is a synthetic OCR instruction-tuning dataset built with TextRenderLab. It contains rendered text images paired with OCR prompts and full transcription targets in both Traditional Chinese and English.

Dataset Summary

  • Task: image-to-text OCR transcription
  • Languages: Traditional Chinese, English
  • Total samples: 40,000
  • Language split:
    • Chinese: 20,000
    • English: 20,000
  • Image format: PNG
  • Annotation format: JSONL

Each sample contains:

  1. A rendered image path under images/
  2. An OCR-style user question in Chinese
  3. A full text transcription as the answer
  4. Chat-style fields for multimodal training pipelines

Data Structure

Each line in dataset.jsonl is a JSON object with the following fields:

Field Type Description
unique_id string Unique sample identifier
images list[string] Relative image path list, typically one PNG file
question string OCR prompt
answer string Full transcription target
messages list[object] Chat-style training format with <image> prompt
axolotl_messages list[object] Axolotl-compatible multimodal message format

Example

{
  "unique_id": "0ff0e0d5-afcf-48aa-a08b-c6d1a1ddc5eb",
  "images": ["images/en_ocr_00000.png"],
  "question": "圖片裡有些字,請幫我轉錄出來。",
  "answer": "Under the legal framework that defined Hong Kong’s semi-autonomy after its return to China in 1997, many in the territory assumed that it would mostly manage its own affairs for decades.",
  "messages": [
    {"role": "user", "content": "<image>圖片裡有些字,請幫我轉錄出來。"},
    {"role": "assistant", "content": "Under the legal framework that defined Hong Kong’s semi-autonomy after its return to China in 1997, many in the territory assumed that it would mostly manage its own affairs for decades."}
  ],
  "axolotl_messages": [
    {
      "role": "user",
      "content": [
        {"type": "image", "url": "images/en_ocr_00000.png"},
        {"type": "text", "text": "圖片裡有些字,請幫我轉錄出來。"}
      ]
    },
    {
      "role": "assistant",
      "content": [
        {"type": "text", "text": "Under the legal framework that defined Hong Kong’s semi-autonomy after its return to China in 1997, many in the territory assumed that it would mostly manage its own affairs for decades."}
      ]
    }
  ]
}

Intended Use

This dataset is intended for:

  • OCR fine-tuning for multimodal LLMs
  • Image-text transcription training
  • Bilingual OCR robustness experiments
  • Synthetic pretraining or instruction-tuning pipelines

Notes

  • The images are synthetically rendered rather than photographed.
  • Prompts are phrased in Chinese, while answers may be either Chinese or English depending on the source text.
  • Relative image paths in images assume the repository or dataset root contains both dataset.jsonl and the images/ directory.

Loading Example

import json
from pathlib import Path

dataset_path = Path("dataset.jsonl")
with dataset_path.open("r", encoding="utf-8") as f:
    first = json.loads(next(f))

print(first["images"])
print(first["question"])
print(first["answer"][:200])

Citation

If you use this dataset, please cite or reference the Hugging Face dataset repository:

minyichen/Render-OCR

Downloads last month
5