智能图片转文字

SKILL效率
效率 未标注权限 许可证不明确
安装这个技能

可将一组图片放在一个Word文件里,解析成文字

一句话选型结论

按资料字段整理

智能图片转文字是效率类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类效率 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_8a153b62/smart-ocr
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

效率
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_8a153b62仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791721375
正文体量9.1 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
整理待办与日程

把零散任务收进清单,排出优先级。

批量处理重复任务

把固定动作做成模板,重复执行。

把流程写成清单

把口头流程整理成可复用的步骤。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在效率场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
智能图片转文字当前 未标注权限 未标注 未标注 未标注 有
Nano PDF 文档 联网访问 ClawHub 市场 424.9 万 OpenClaw 有
自动更新程序 浏览器控制 ClawHub 市场 296.4 万 OpenClaw 有
Gemini 助手 联网访问 ClawHub 市场 254.7 万 OpenClaw 有
word DOCX 文档 联网访问 ClawHub 市场 239.6 万 OpenClaw 有
Excel XLSX 前端 联网访问 ClawHub 市场 227.0 万 OpenClaw 有

SKILL.md 全文

9.1 KB
模型实际读到的说明书原文,来自技能仓库

Smart OCR: AI-Assisted Image-to-Text Recognition

A three-layer OCR pipeline that combines Tesseract multi-strategy recognition with DeepSeek AI validation and correction for high-accuracy text extraction from images.

When to Invoke

  • User uploads a .doc / .docx / .pdf file containing mostly images (scanned pages)
  • User asks to "extract text from images," "OCR these pictures," or "convert image to text"
  • User needs accurate Chinese+English bilingual OCR from document images
  • User complains about garbled OCR results and needs better quality

Architecture

┌──────────────────────────────────────────────────────────┐
│  Layer 0: Mosaic Detection                               │
│  → Detect images with dense mosaic/blurred regions        │
│  → If valid Chinese char density < 5%, skip OCR entirely  │
│  → Mark image as "(含马赛克区域,已跳过识别)"              │
├──────────────────────────────────────────────────────────┤
│  Layer 1: Multi-Strategy Tesseract OCR                   │
│  (Original / Gray / CLAHE / 2× Upscale / Sharp)          │
│  → Auto-select best result by Chinese char count          │
│  → Apply common OCR error correction dictionary           │
├──────────────────────────────────────────────────────────┤
│  Layer 2: DeepSeek AI Validation                         │
│  → Judge if OCR text is coherent (score 0-10)            │
│  → Route based on confidence level:                       │
│    ≥ 7/10: Accept as-is, minor typo fix only             │
│    4-6/10: Request DeepSeek to correct garbled chars      │
│    < 4/10: Check if mosaic; if yes, discard; if not, raw │
├──────────────────────────────────────────────────────────┤
│  Layer 3: Results Assembly                                │
│  → Combine per-image results into structured output       │
│  → Skip mosaic-only images (output note instead)          │
│  → Generate .docx with continuous paragraphs              │
└──────────────────────────────────────────────────────────┘

Prerequisites

1. API Key Setup

This skill requires a DeepSeek API key for the AI validation layer. Each user must provide their own key.

How to get a key: Register at platform.deepseek.com and create an API key.

How to provide the key: Set it as an environment variable before running the pipeline:

$env:DEEPSEEK_API_KEY = "sk-your-own-api-key-here"

The scripts read the key at runtime from $env:DEEPSEEK_API_KEY. No key is ever hardcoded in the skill files.

  • API Endpoint: https://api.deepseek.com/v1/chat/completions
  • Model: deepseek-chat

> Note: If no API key is set, the pipeline still runs — it simply falls back to Tesseract-only OCR (Layer 1 + error dictionary), skipping the DeepSeek validation step.

2. Dependencies (Pre-installed)

Tool Purpose
Tesseract v5.x Base OCR engine with chi_sim+eng
OpenCV (cv2) Image preprocessing (CLAHE, sharpening, etc.)
Python 3.x Script execution
Node.js + docx Generating the final .docx output

Workflow (Step-by-Step)

Step 1: Prepare Images

# Pseudo-code — see scripts/ocr_pipeline.py for full implementation
1. Convert .doc → .docx (via LibreOffice: soffice --headless --convert-to docx)
2. Unpack .docx to extract /word/media/* images
3. Sort images by index (image1.png, image2.png, ...)

Step 0 (Pre-filter): Mosaic Detection

Before running OCR, detect images that contain mostly mosaic/blurred/redacted regions:

Criterion Logic
Valid text density After initial quick OCR pass, if Chinese chars < 5% of total chars, classify as "mosaic"
Edge detection Mosaic regions have abnormally uniform pixel blocks — detect via cv2.Laplacian variance < threshold
Small image Images smaller than 150×150 px are likely icons, stamps or fully mosaic — skip

When an image is classified as mosaic-containing:
- Skip the full OCR + DeepSeek pipeline for that image
- Output (含马赛克区域,已跳过识别) in the final document
- The image's entry is still listed with its filename but no text content


### Step 2: Multi-Strategy OCR

For each image, run Tesseract with **5 preprocessing strategies** and auto-select the best:

| Strategy | Code | Best For |
|----------|------|----------|
| **Original** | Raw image → OCR | Clean photos, good lighting |
| **Gray** | `cv2.COLOR_BGR2GRAY` | Standard scanned pages |
| **CLAHE** | `cv2.createCLAHE(clipLimit=2.0)` | Uneven lighting, faded text |
| **2× Upscale** | `cv2.resize(..., INTER_CUBIC)` | Small text, low DPI |
| **Sharp** | `cv2.addWeighted(sharp)` | Slightly blurry edges |

**Selection criterion**: Run each strategy with `--psm 6 --oem 1` and pick the result with the highest Chinese character count.

### Step 3: Apply OCR Error Dictionary + Space Removal

After Tesseraut, apply a correction map for common Tesseract errors found in testing, then remove inter-CJK spaces:

```python
# Common Chinese char substitutions from Tesseract
ocr_corrections = {
    &quot;睿&quot;: &quot;特&quot;,    # 睿(ruì) vs 特(tè) — very common
    &quot;蔼&quot;: &quot;勒&quot;,    # 形近字
    # See full list in scripts/ocr_errors.json
}

# Remove spaces between Chinese characters (Tesseract artifact)
# &quot;等 、 博 爱 而 庆 祝&quot; → &quot;等、博爱而庆祝&quot;
# English words and numbers are kept intact

Step 4: DeepSeek Validation & Correction

For each image's OCR text, call the DeepSeek API.

Validation Prompt — checks coherence:

你是一位专业的OCR校对专家。请评估以下OCR识别出的文字的通顺程度。
评分标准(0-10分):
- 8-10分:意思通顺,基本无错别字
- 5-7分:基本可读但有个别错别字或乱码
- 2-4分:部分可读但存在大量乱码
- 0-1分:几乎完全不可读

注意:这是书籍/文章内容,是一段连续的论述文字。
请直接输出分数,不需要解释。

文字内容:
{ocr_text}

Correction Prompt — for score 4-6:

你是一位专业的OCR文字校对专家。请对以下OCR识别出的文字进行修正。
修正原则:
1. 只修改明显错误的字词(形近字、音近字)
2. 不要改变原意和句式结构
3. 保持原文的标点和段落
4. 如果遇到无法判断的乱码,保持原样不要猜测
5. 专有名词(人名、地名、书名)请根据上下文合理修正

只输出修正后的文字,不要添加任何解释。

待修正的文字:
{ocr_text}

Step 5: Assemble Output

Generate a .docx file with:
- Each image → labeled section (▎图片 N (filename.png))
- OCR text as a single continuous paragraph (no internal line breaks)
- Separator between images

Scripts Reference

The skill includes these scripts in scripts/:

Script Function
ocr_pipeline.py Full pipeline: image extraction → multi-strategy OCR → cleaning → results
ocr_deepseek.py DeepSeek API: validation scoring + text correction
ocr_errors.json Common Tesseract error patterns and corrections
generate_output.js Generate the final .docx from OCR results
doc_to_images.py Convert .doc/.docx to individual images

Error Handling

Issue Mitigation
DeepSeek API unavailable Fall back to Tesseract-only result
Image cannot be read Mark as "(无法读取图片)"
Image detected as mosaic/redacted Skip OCR, output "(含马赛克区域,已跳过识别)"
All OCR strategies return empty Mark as "(未识别到文字)"
Score < 4 after DeepSeek Check mosaic flag; if not mosaic, output raw with "(识别质量较低)" note

Known Error Patterns (from testing)

Pattern Example (OCR → Correct)
形近字替换 睿→特, 瞿→髦, 晓→晓, 钟→钦
英文半角乱码 Gs → The, aert → cent
中英文间距 多余空格需要去除 → 中文间空格全部移除,英文单词间保留
汉字间空格 Tesseract经常在中文字符间插入空格 → remove_intercjk_spaces() 自动清除
特殊符号替代 → → -, 中文引号丢失
行首行尾噪声 装饰性横线、页码识别为文字

```

常见问题

5 问
答案由本站依据条目字段整理
智能图片转文字怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_8a153b62/smart-ocr。安装方式为未标注。装完刷新技能列表或重开客户端。

智能图片转文字支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

智能图片转文字权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

智能图片转文字收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

智能图片转文字用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。