LiaoGong-OCR

Other

🔍 廖工AI设计实战出品 | LiaoGong-OCR — easyocr+tesseract双引擎OCR,15条预处理链含实测基准,手机拍屏数字识别87%准确率。支持中文海报/截图/英文文档/手机拍照/批量转文字。Use when: OCR this image, extract text from images, 图片转文字, OCR识别, 提取图片文字 | Dual-engine OCR (easyocr+tesseract) with 15 benchmarked preprocessing chains, 87% phone-photo digit accuracy

Install

openclaw skills install liaogong-ocr

LiaoGong-OCR · 廖工双引擎OCR

廖工AI设计实战出品 — easyocr + tesseract 双引擎OCR系统,15条可组合预处理链含实测基准数据。

三种用法

用法命令/代码场景
CLI工具liaogong-ocr image.jpg命令行一键提取文字
Python库from liaogong_ocr import OCREngine集成到你的Python项目
AI Agentnpx clawhub@latest install liaogong-ocrAI智能体自动触发OCR

快速开始

# 安装系统依赖 tesseract(Windows用 winget install tesseract-ocr)
pip install -r requirements.txt
liaogong-ocr your_image.jpg

引擎模式

模式命令最适合
自动liaogong-ocr img.jpg通用场景,自动选择引擎
easyocrliaogong-ocr -e easyocr img.png中文海报、截图、复杂排版
tesseractliaogong-ocr -e tesseract doc.png英文文档、白底黑字
手机拍照liaogong-ocr -p phone photo.jpg手机拍屏幕(87%数字准确率)

预处理链(手机拍屏幕数字提取实测)

预处理链数字准确率速度
optimal_phone87%
grayscale_binary72%
contrast_enhance65%
sharpen55%
clahe31%
adaptive_binary18%

系统要求

  • Python 3.8+
  • Tesseract(系统安装)
  • 首次运行 easyocr 需下载 ~100MB 模型

廖工AI设计实战出品 · github.com/jnbno1163