The Dataset Viewer has been disabled on this dataset.

Document OCR using Nanonets-OCR-s

This dataset contains markdown-formatted OCR results from images in /content/my_dataset using Nanonets-OCR-s.

Processing Details

Configuration

  • Image Column: image
  • Output Column: markdown
  • Dataset Split: train
  • Batch Size: 1
  • Max Model Length: 8,192 tokens
  • Max Output Tokens: 4,096
  • GPU Memory Utilization: 80.0%

Model Information

Nanonets-OCR-s 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
  • ๐Ÿ“ Document structure - Headers, lists, and formatting maintained
  • ๐Ÿ–ผ๏ธ Images - Captions and descriptions included in <img> tags
  • โ˜‘๏ธ Forms - Checkboxes rendered as โ˜/โ˜‘
  • ๐Ÿ”– Watermarks - Wrapped in <watermark> tags
  • ๐Ÿ“„ Page numbers - Wrapped in <page_number> tags

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 Nanonets OCR script:

uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
    /content/my_dataset \
    <output-dataset> \
    --image-column image \
    --batch-size 1 \
    --max-model-len 8192 \
    --max-tokens 4096 \
    --gpu-memory-utilization 0.8

Performance

  • Processing Speed: ~0.0 images/second
  • GPU Configuration: vLLM with 80% GPU memory utilization

Generated with ๐Ÿค– UV Scripts

Downloads last month
37