🧪 Skills

rapid ocr

专业离线票据OCR工具,支持增值税发票、火车票、飞机票、出租车票等高精度字段提取与批量识别。

v1.0.4
❤️ 0
⬇️ 97
👁 1
Share

Description

RapidOCR Skill (v1.3.0)

描述

专业的票据 OCR 识别技能,支持增值税发票、火车票等各类票据的识别。

⚠️ 重要说明

首次运行需要网络下载模型(约 13MB),后续使用完全离线。

安全元数据说明:

  • ✅ 技能代码本身不发起任何网络请求
  • ⚠️ 依赖包 rapidocr-onnxruntime 首次调用时会自动下载模型
  • 这是依赖包的行为,不是技能代码的行为

核心特性

  • 轻量代码 - 约 4KB,无内置大文件
  • 首次下载 - 首次运行自动下载 OCR 模型(~13MB)
  • 离线推理 - 模型下载后完全离线使用
  • 安全透明 - 无 exec/eval,无运行时网络请求,代码可审计
  • 快速识别 - ~500ms/张

网络需求

阶段 网络 数据量
安装依赖 需要 ~50 MB
首次运行 需要 ~13 MB
后续使用 不需要 0

外部依赖

  • PyPI 包: rapidocr-onnxruntime
  • 模型来源: PaddleOCR (Apache 2.0)
  • 模型行为: 首次运行自动下载到本地缓存

文件结构

rapid-ocr/
├── rapidocr_minimal.py    # 主程序入口 (~4KB)
├── test_ocr.py            # 测试套件
├── README.md              # 用户文档
├── TRANSPARENCY.md        # 透明度说明
├── SKILL.md               # 本文件
├── claw.json              # OpenClaw 配置
├── requirements.txt       # Python 依赖
└── models/
    └── README.md          # 模型说明

使用方式

CLI

python rapidocr_minimal.py ocr image.jpg
python rapidocr_minimal.py invoice invoice.jpg
python rapidocr_minimal.py train ticket.jpg

Python API

from rapidocr_minimal import RapidOCRSkill

skill = RapidOCRSkill()
result = skill.ocr_image("image.jpg")
print(result['full_text'])

# 发票识别
invoice_data = skill.ocr_invoice("invoice.jpg")
print(invoice_data['structured_data'])

测试

python test_ocr.py

许可证

MIT License

Reviews (0)

Sign in to write a review.

No reviews yet. Be the first to review!

Comments (0)

Sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

Compatible Platforms

Pricing

Free

Related Configs