Skip to main content

wx-ocr

一行代码识别图片文字,无需安装微信

安装

pip install wx-ocr

使用

Python API

from wx_ocr import ocr

# 识别图片
texts = ocr("image.png", return_text_only=True)
print(texts)  # ['文字1', '文字2', ...]

# 获取完整结果(包含位置信息)
result = ocr("image.png")
for item in result['ocrResult']:
    print(item['text'], item['location'])

# 批量识别
from wx_ocr import ocr_batch
results = ocr_batch(["1.png", "2.png", "3.png"], return_text_only=True)

命令行

# 识别图片
wx-ocr image.png

# JSON 格式输出
wx-ocr --format json image.png

# 批量处理
wx-ocr *.png

# 保存结果
wx-ocr --save --output results/ image.png

说明

  • 仅支持 Windows
  • 需要 Python 3.8+
  • 无需安装微信(项目自带 OCR 文件)
  • 基于 wechat_ocr 开发

License

MIT

Metadata

Release files for wx-ocr 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wx-ocr 0.1.6
File Size Uploaded
wx_ocr-0.1.6.tar.gz 70.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for wx-ocr 0.1.6
File Interpreter ABI Platform
wx_ocr-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 105.8 MB

Release files / wx_ocr-0.1.6.tar.gz

Download URL wx_ocr-0.1.6.tar.gz
Size 70.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c9eb6c5ebceb35298eeea39d4286f254083cbb2e59af5873fa6a4a920709a794
BLAKE2b-256 checksum
How to use checksums
00960ed32d4bb0572011e9f3c2384ec2afc68601951f0c85c7e90e5d2728fc89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / wx_ocr-0.1.6-py3-none-any.whl

Download URL wx_ocr-0.1.6-py3-none-any.whl
Size 35.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
16066b0701b5a4d89d3291693fcb3d393638a3bc92a8b782e1ca484da56597fe
BLAKE2b-256 checksum
How to use checksums
1ba13c5acb5685d279c0164a1c918dc27cbffae3f0bda1f7ca8d2df816c1f5ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page