Ocr Python

OCR Text Recognition

javimosch 587d413 901 B Updated

File contents

OCR Text Recognition

This skill uses PaddleOCR for text recognition, supporting both Chinese and English.

Quick Start

Basic Usage

Perform OCR recognition directly on image or PDF files:

from paddleocr import PaddleOCR

ocr = PaddleOCR(lang='ch')
result = ocr.predict("file_path.jpg")

Dependency Installation

Install dependencies before first use:

pip3 install paddlepaddle paddleocr

Output Format

Recognition results return JSON containing:

  • rec_texts: List of recognized text
  • rec_scores: Confidence score for each text

Typical Use Cases

  1. PDF Scans: Use PyMuPDF to extract images first, then OCR
  2. Image Text Recognition: Perform OCR directly on images
  3. Multi-page PDFs: Process page by page

Scripts

Common scripts are located in the scripts/ directory.

javimosch/open-claw-skills/tree/main/skills/roamerxv/ocr-python commit 587d41385e

Frequently asked questions

npx skillmds@latest add javimosch/ocr-python