推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
XTer666
V2EX  ›  Python

MyLittleOCR:简单的热门 ocr 库包装

  •  
  •   XTer666 · Oct 5, 2024 · 4318 views
    This topic created in 602 days ago, the information mentioned may be changed or developed.

    项目介绍

    MyLittleOCR 是一个简单而强大的 OCR 包装器,提供了多种 OCR 引擎的一致 API ,开发者可以轻松集成并在不同 OCR 库之间切换,而无需更改代码。

    支持的 OCR 库包括:Tesseract ( Apache 2.0 许可证)、EasyOCR ( Apache 2.0 许可证)、WeChat OCR (未知许可证,仅支持 Windows )、Surya ( GPL 3.0 许可证)以及 RapidOCR ( Apache 2.0 许可证)。

    使用示例

    from my_little_ocr import get_engine_instance
    
    engine = get_engine_instance("rapidocr")
    result = engine.ocr("img1.png")
    
    print(result.to_list())
    

    切换引擎只需更改 get_engine_instance() 中的引擎名称。欢迎大家来贡献——快来看看吧!

    GitHub 项目地址: https://github.com/X-T-E-R/my-little-ocr

    安装命令:pip install my_little_ocr

    6 replies    2024-10-06 05:15:35 +08:00
    Shorekeeper
        1
    Shorekeeper  
       Oct 5, 2024   ❤️ 2
    ~~无端联想 MyLittlePony~~
    yibie
        2
    yibie  
       Oct 5, 2024
    现在哪个 OCR 的效果比较好?
    NoOneNoBody
        3
    NoOneNoBody  
       Oct 5, 2024   ❤️ 1
    @yibie #2
    涉及中日韩的,目前是飞桨,只是这货安装有点烦人,只能装在一个环境,运行还有警告
    异体汉字就没一家好用
    gwy15
        4
    gwy15  
       Oct 5, 2024 via iPhone
    没看出来怎么切换 cuda
    XTer666
        5
    XTer666  
    OP
       Oct 5, 2024
    @gwy15 手装(如果没装会自动装 cpu 版本);而且不是所有 ocr 库会需要 torch
    oyps
        6
    oyps  
       Oct 6, 2024
    第一眼看成了 LittleSubGirl
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2923 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 08:14 · PVG 16:14 · LAX 01:14 · JFK 04:14
    ♥ Do have faith in what you're doing.