askill
ocr-super-surya

ocr-super-suryaSafety 95Repository

GPU-optimized OCR using Surya. Use when: (1) Extracting text from images/screenshots, (2) Processing PDFs with embedded images, (3) Multi-language document OCR, (4) Layout analysis and table detection. Supports 90+ languages with 2x accuracy over Tesseract.

8 stars
1.2k downloads
Updated 2/25/2026

Package Files

Loading files...
SKILL.md

OCR Super Surya

GPU-optimized OCR using Surya.

When to Use

  • OCR, extract text from image, text recognition, 画像から文字
  • Extracting text from screenshots, photos, or scanned images
  • Processing PDFs with embedded images
  • Multi-language document OCR (90+ languages including Japanese)

Features

FeatureDescription
Accuracy2x better than Tesseract (0.97 vs 0.88)
GPUPyTorch-based, CUDA optimized
Languages90+ including CJK
LayoutDocument layout, table recognition

Quick Start

Installation

# 1. Check GPU
python -c "import torch; print(f'CUDA: {torch.cuda.is_available()}')"

# 2. Install (with CUDA if GPU available)
pip install surya-ocr

# If CUDA=False but you have GPU, reinstall PyTorch:
pip uninstall torch torchvision torchaudio -y
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Usage

# CLI
python scripts/ocr_helper.py image.png
python scripts/ocr_helper.py document.pdf -l ja en -o result.txt

# Or use surya directly
surya_ocr image.png --output_dir ./results

Python API

from PIL import Image
from surya.recognition import RecognitionPredictor
from surya.detection import DetectionPredictor
from surya.foundation import FoundationPredictor

image = Image.open("document.png")
found_pred = FoundationPredictor()
rec_pred = RecognitionPredictor(found_pred)
det_pred = DetectionPredictor()

for page in rec_pred([image], det_predictor=det_pred):
    for line in page.text_lines:
        print(line.text)

GPU Configuration

VariableDefaultDescription
RECOGNITION_BATCH_SIZE512Reduce for lower VRAM
DETECTOR_BATCH_SIZE36Reduce if OOM
export RECOGNITION_BATCH_SIZE=256
surya_ocr image.png

Scripts

ScriptDescription
scripts/ocr_helper.pyHelper with OOM auto-retry, batch support

License Note

  • Surya: GPL-3.0 (code), commercial license required for >$2M revenue

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

90/100Analyzed 2/20/2026

High-quality, well-structured OCR skill with GPU optimization focus. Provides comprehensive coverage of Surya OCR tool including installation, CLI/Python API usage, GPU configuration, and licensing. Includes clear 'When to Apply' section, structured steps, and helpful tables. No signs of being internal-only or boilerplate. Reusable across many OCR projects.

95
95
90
85
90

Metadata

Licenseunknown
Version-
Updated2/25/2026
Publisheraktsmm

Tags

apigithub