OCR with python

👤 roamerxv 📦 v1.0.0 ⭐ 4.1 ⬇️ 10.6K 下載
📄 辦公效率 免費

📖 技能介紹


name: ocr description: Optical Character Recognition (OCR) tool, supports Chinese and English text extraction from PDFs and images. Use cases: (1) extract text from scanned PDFs, (2) recognize text from images, (3) extract text content from invoices, contracts, and other documents


OCR Text Recognition

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

Quick Start

Basic Usage

小蔥技能7w4.net持續更新中。

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.

🤖 AI 評測

這個 OCR 技能質量中規中矩,優點是支援中文英文、能處理掃描版 PDF 和圖片,功能比較實用。文件寫得很清晰,中英文都有,上手容易。不足之處是缺少依賴說明檔案,示例程式碼和實際指令碼的用法不一致,容易讓人困惑,另外沒有測試程式碼,質量保障不足。總體來說能用,但細節打磨還需加強。

📊 多維度評分

適應性4
規範性3.8
有效性4
可靠性4.2
可信度4.8

📁 包含檔案 (4 個)

📄 SKILL.md 1.1 KB
📄 SKILL.zh-CN.md 1021 B
📄 _meta.json 129 B
📄 scripts/ocr.py 3 KB