Catalog

Related Links

Installation

Install python3 and pip3

sudo apt install python3-pip

Install EasyOCR, this will take a long time for downloading around 1GiB files

q3w:~$ pip install easyocr
Defaulting to user installation because normal site-packages is not writeable
Collecting easyocr
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f42ce149930>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/bc/7f/389e1a886ff219682b5a56ea84f91ed785999665ac9ec1f220c7fdcd150f/easyocr-1.6.2-py3-none-any.whl
Downloading easyocr-1.6.2-py3-none-any.whl (2.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 481.8 kB/s eta 0:00:00
Collecting torch
Downloading torch-1.12.1-cp310-cp310-manylinux1_x86_64.whl (776.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 776.3/776.3 MB 404.3 kB/s eta 0:00:00
Collecting scipy
Downloading scipy-1.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 33.7/33.7 MB 673.8 kB/s eta 0:00:00
Collecting pyclipper
Downloading pyclipper-1.3.0.post3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (813 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 813.8/813.8 KB 650.2 kB/s eta 0:00:00
Collecting torchvision>=0.5
Downloading torchvision-0.13.1-cp310-cp310-manylinux1_x86_64.whl (19.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.1/19.1 MB 704.0 kB/s eta 0:00:00
Collecting ninja
Downloading ninja-1.10.2.4-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (120 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.7/120.7 KB 667.3 kB/s eta 0:00:00
Collecting opencv-python-headless<=4.5.4.60
Downloading opencv_python_headless-4.5.4.60-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.6/47.6 MB 659.3 kB/s eta 0:00:00
Collecting numpy
Downloading numpy-1.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 686.0 kB/s eta 0:00:00
Requirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from easyocr) (5.4.1)
Collecting Shapely
Downloading Shapely-1.8.5.post1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 679.9 kB/s eta 0:00:00
Collecting scikit-image
Downloading scikit_image-0.19.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.9/13.9 MB 708.9 kB/s eta 0:00:00
Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from easyocr) (9.0.1)
Collecting python-bidi
Downloading python_bidi-0.4.2-py2.py3-none-any.whl (30 kB)
Collecting typing-extensions
Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from torchvision>=0.5->easyocr) (2.25.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from python-bidi->easyocr) (1.16.0)
Collecting tifffile>=2019.7.26
Downloading tifffile-2022.10.10-py3-none-any.whl (210 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.3/210.3 KB 579.4 kB/s eta 0:00:00
Collecting PyWavelets>=1.1.1
Downloading PyWavelets-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.8/6.8 MB 699.7 kB/s eta 0:00:00
Collecting networkx>=2.2
Downloading networkx-2.8.7-py3-none-any.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 686.2 kB/s eta 0:00:00
Collecting imageio>=2.4.1
Downloading imageio-2.22.2-py3-none-any.whl (3.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 675.2 kB/s eta 0:00:00
Collecting packaging>=20.0
Downloading packaging-21.3-py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 KB 1.1 MB/s eta 0:00:00
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/lib/python3/dist-packages (from packaging>=20.0->scikit-image->easyocr) (2.4.7)
...

Usage

It will download the trained data in the first run

$ python3
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import easyocr
>>> reader = easyocr.Reader(['ch_sim','en'])
CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
Downloading detection model, please wait. This may take several minutes depending upon your network connection.
Progress: |██████████████████████████████████████████████████| 100.0% CompleteDownloading recognition model, please wait. This may take several minutes depending upon your network connection.
Progress: |██████████████████████████████████████████████████| 100.0% Complete>>>

Recognize

# 带坐标
result = reader.readtext('Documents/fp01.png') # 不带坐标, 合并相邻text box
result = reader.readtext('Documents/tu01.jpg', detail = 0, paragraph=True)
print(result)

Performance

  • Speed is slow when using CPU
  • The correct rate is good when extracting text from e-print or screenshot pictures
  • The correct rate drops a lot when handling the photos taken by a cellphone

Reference

OCR 01: EasyOCR的更多相关文章

  1. Python使用EasyOCR库对行程码图片进行OCR文字识别介绍与实践

    关注「WeiyiGeek」点我,点我 设为「特别关注」,每天带你在B站玩转网络安全运维.应用开发.物联网IOT学习! 希望各位看友[关注.点赞.评论.收藏.投币],助力每一个梦想. 文章目录 0x00 ...

  2. 文字识别OCR开源框架的对比--Tesseract vs EasyOCR

    ​ 前言: OCR文字识别在目前有着比较好的应用,也出现了很多的文字识别软件,但软件是面向用户的.对于我们技术人员来说,有时难免需要在计算机视觉任务中加入文字识别,如车牌号识别,票据识别等,因此软件对 ...

  3. Oracle RAC OCR 的管理与维护

    OCR相当于Windows的注册表.对于Windows而言,所有的软件信息,用户,配置,安全等等统统都放到注册表里边.而集群呢,同样如此,所有和集群相关的资源,配置,节点,RAC数据库统统都放在这个仓 ...

  4. Oracle RAC OCR 的备份与恢复

    Oracle Clusterware把整个集群的配置信息放在共享存储上,这些信息包括了集群节点的列表.集群数据库实例到节点的映射以及CRS应用程序资源信息.也即是存放在ocr 磁盘(或者ocfs文件) ...

  5. Oracle 11gR2 RAC Votedisk and OCR Diskgroup Recovery

    check votedisk and OCR [root@vzwc1 ~]# ocrcheck Status of Oracle Cluster Registry is as follows : Ve ...

  6. 学习笔记TF020:序列标注、手写小写字母OCR数据集、双向RNN

    序列标注(sequence labelling),输入序列每一帧预测一个类别.OCR(Optical Character Recognition 光学字符识别). MIT口语系统研究组Rob Kass ...

  7. 【程序员的吃鸡大法】利用OCR文字识别+百度算法搜索,玩转冲顶大会、百万英雄、芝士超人等答题赢奖金游戏

    [先上一张效果图]: 一.原理: 其实原理很简单: 1.手机投屏到电脑: 2.截取投屏画面的题目部分,进行识别,得到题目和三个答案: 3.将答案按照一定的算法,进行搜索,得出推荐答案: 4.添加了一些 ...

  8. Android ocr识别文字介绍(文字识别)

    最近在做身份证号码识别,在网上搜索的一番后发现目前开源的OCR中tesseract-ocr算是比较强大的了,它由HP于1985年到1995年间开发,后来由google直接负责,经过谷歌进一步开发后,目 ...

  9. Python爬虫-尝试使用人工和OCR处理验证码模拟登入

    刚开始在网上看别人一直在说知乎登入首页有有倒立的汉字验证码,我打开自己的知乎登入页面,发现只有账号和密码,他们说的倒立的验证码去哪了,后面仔细一想我之前登入过知乎,应该在本地存在cookies,然后我 ...

  10. OCR技术浅析-tesserOCR(3)

    tesserOCR使用 tesserOCR是文字识别软件(惠普公司开源) Optical Character Recognition (OCR)即光学字符辨识是把打印文本转换成一个数字表示的过程.它有 ...

随机推荐

  1. SoC scan implementation

    scan chain产生之前需要进行scan drc的过程,判断cell是不是能够串到scan chain上去 mux-d scan cell(是最常用的scan cell),还有其他的scan ce ...

  2. Python Code_06基础篇

    条件表达式 # coding:utf-8 # author : 写bug的盼盼 # development time : 2021/8/28 7:38 num_a = input('请输入第一个整数' ...

  3. iPhone 使用类ChatGPT应用的几种方法

    iPhone 使用类ChatGPT功能的几种方法 背景 前几天使用edge的wetab的插件给自己的工作带来了很多帮助 尤其是一些基础shell语法以及sql语法, 比使用百度, bing 等搜素引擎 ...

  4. [转帖]45个处理字符串的Python方法

    https://baijiahao.baidu.com/s?id=1738413163267646541&wfr=spider&for=pc   一.题目解析 先来看一个题目: 判断用 ...

  5. 据说这道Go面试题90%的人都搞错了!

    [Go面试向]defer与time.sleep初探 大家好,我是阳哥,这是我们Go就业训练营小伙伴 寸铁同学 整理的一道很有意思的面试题. 知其然更要知其所以然,通过断点调试的思路带你搞清楚来龙去脉. ...

  6. 热更新适配ibatis原理浅析

    一.热更新解决了什么问题? 在研发过程中,每个研发同学在联调.自测阶段中总会频繁的去执行编译.构建.打包的动作,遇到比较大的项目,执行一套流程下来,往往需要3-10分钟左右,极大的降低了研发的速度,基 ...

  7. 京东金融APP-新交互技术“虚拟数字人”赋能世界杯主题营销

    作者:平台研发部,智能服务与产品部 距离加文·伍德提出web3.0已经过去8年时间,这8年加文·伍德创建的以太坊大放异彩,同时由web3.0引出的数字人.元宇宙也生根发芽,茁壮成长,带来了非凡的用户体 ...

  8. el-popover 点击取消按钮,弹窗仍然无法关闭

    <el-popover placement="bottom" width="200" :ref="aa" :visible.sync= ...

  9. 【分享一个工具】根据 /metrics 路径下的文本信息,自动生成包含所有 metrics 的 grafana 报表

    作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢! cnblogs博客 zhihu Github 公众号:一本正经的瞎扯 在做某个服务对应的 grafana 监控报表的时候发现,一 ...

  10. 玩一玩 golang 1.21 的 pgo 编译优化

    作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢! cnblogs博客 zhihu Github 公众号:一本正经的瞎扯 1.下载镜像 暂时不想替换本机的 golang 版本,于是 ...