chinese-handwriting-ocr

中文OCR双引擎 — PaddleOCR(主力文档OCR) + RapidOCR(手写体特化),按需灵活切换

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "chinese-handwriting-ocr" with this command: npx skills add meta-evo-creator/chinese-handwriting-ocr

中文OCR双引擎技能 v2.0

双引擎:PaddleOCR 通用文档OCR + RapidOCR 手写体特化,按场景自动/手动切换

引擎分工

场景推荐引擎理由
印刷体文档、合同、报表--engine paddlePaddleOCR中文印刷体识别率最高
手写体、日期、签名、工号--engine rapidRapidOCR手写数字/文字准确率更高
混合文档(印刷+手写)--engine auto自动检测内容类型切换
不确定用哪个--engine both双引擎交叉验证,取置信度高者

快速开始

# 手写体日期提取(默认RapidOCR)
python scripts/ocr_date_extractor.py 文档.pdf

# 指定引擎
python scripts/ocr_date_extractor.py 文档.pdf --engine rapid
python scripts/ocr_date_extractor.py 文档.pdf --engine paddle
python scripts/ocr_date_extractor.py 文档.pdf --engine both

# 提取特定区域手写文本
python scripts/ocr_rapid.py 文档.pdf --date-mode
python scripts/ocr_rapid.py 文档.pdf --signature-mode

核心脚本

ocr_date_extractor.py — 日期提取引擎

python scripts/ocr_date_extractor.py 文档.pdf [--engine rapid|paddle|both|auto]

四层流水线:

  1. 动态日期行定位
  2. 选定引擎OCR
  3. 智能值域校验
  4. 文档上下文推断

ocr_rapid.py — 手写体区域提取

python scripts/ocr_rapid.py 文档.pdf --date-mode --engine paddle
python scripts/ocr_rapid.py 文档.pdf --region 0.1 0.4 0.9 0.6 --engine both

ocr_batch.py — 批量处理

# 批量处理目录下所有PDF
python scripts/ocr_batch.py --batch-dir ./pdfs --engine auto

# 双引擎交叉验证
python scripts/ocr_batch.py --batch-dir ./pdfs --engine both --json -o results.json

引擎对比

指标PaddleOCR 2.8RapidOCR 1.4
印刷体中文⭐⭐⭐⭐⭐⭐⭐⭐⭐
手写体数字⭐⭐⭐⭐⭐⭐
手写日期完全正确率20%60%
手写日期部分识别率60%90%+
首次加载慢(下载模型)快(缓存)
速度3-5s/页2-3s/页
安装包~200MB+模型~55MB

自动引擎选择逻辑 (--engine auto)

1. 全页低分OCR快速分析内容类型
2. 检测到"年/月/日"等日期关键字 → RapidOCR
3. 检测到大量印刷体文字 → PaddleOCR
4. 混合内容 → both(双引擎交叉验证)

参数参考

参数说明
--engine rapid|paddle|both|autoOCR引擎选择
--jsonJSON格式输出
-p, --pages指定页码(1-based)
--region X1 Y1 X2 Y2自定义区域(百分比0-1)
--batch批量处理目录
--dpiOCR分辨率(默认400)

依赖

pip install rapidocr-onnxruntime    # 手写体引擎(已安装 ✅)
pip install paddleocr paddlepaddle  # 文档OCR引擎(已安装 ✅)

已知问题

  • PaddleOCR 3.x + PaddlePaddle 3.x 存在 OneDNN 兼容问题,当前使用 2.x 版本
  • 首次启动 PaddleOCR 需下载模型(~18MB)
  • RapidOCR 多次调用可能产生进程残留,需定期清理

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

1688 Item Select

1688 商家重点品圈选 —— 基于多维度商品评分智能识别值得重点运营的商品或搜索商品。 工具能力:五维度评分(销售贡献、流量效率、成长潜力、营销ROI、商品健康度),商品分层(S/A/B/C级),搜索商品。 触发词:重点品查看、圈选重点品、圈选运营商品、今日运营重点、选品、推荐商品、商品分层、商品优先级、搜索商品。

Registry SourceRecently Updated
General

Yield Offer Sanity Check

A checklist skill that evaluates whether a yield, staking, or earn offer is reasonable or suspicious. Use when the user encounters a yield promotion. Prompt-...

Registry SourceRecently Updated
General

IFQ App Builder

Use this OpenClaw / ClawHub skill when the user wants to turn three ordinary sentences into a verified build-ready prompt bundle for a real app: PC desktop,...

Registry SourceRecently Updated
General

Airdrop Participation Filter

A decision helper that helps users decide whether to participate in an airdrop campaign. Use when the user considers joining an airdrop. Prompt-only.

Registry SourceRecently Updated