V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 13 天前 · 1826 次点击

    项目介绍

    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 条回复    2024-10-06 05:15:35 +08:00
    SunsetShimmer
        1
    SunsetShimmer  
       13 天前   ❤️ 2
    ~~无端联想 MyLittlePony~~
    yibie
        2
    yibie  
       13 天前
    现在哪个 OCR 的效果比较好?
    NoOneNoBody
        3
    NoOneNoBody  
       13 天前   ❤️ 1
    @yibie #2
    涉及中日韩的,目前是飞桨,只是这货安装有点烦人,只能装在一个环境,运行还有警告
    异体汉字就没一家好用
    gwy15
        4
    gwy15  
       12 天前 via iPhone
    没看出来怎么切换 cuda
    XTer666
        5
    XTer666  
    OP
       12 天前
    @gwy15 手装(如果没装会自动装 cpu 版本);而且不是所有 ocr 库会需要 torch
    oyps
        6
    oyps  
       12 天前
    第一眼看成了 LittleSubGirl
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5375 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 08:45 · PVG 16:45 · LAX 01:45 · JFK 04:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.