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. Java中内存四区

    这里简要说明这四个区域通常用于存储的变量类型: 栈区(Stack): 存放局部变量.方法参数.返回地址等. 变量的生命周期与其所在的方法(函数)的调用周期一致. 堆区(Heap): 主要用于动态分配内 ...

  2. [转帖]datax安装+配置+使用文档

    1 DataX离线同步工具DataX3.0介绍 DataX 是阿里巴巴集团内被广泛使用的离线数据同步工具/平台,实现包括 MySQL.Oracle.SqlServer.Postgre.HDFS.Hiv ...

  3. [转帖]详解nginx的rewrite应用,Nginx高级之Rewrite规则

    https://zhuanlan.zhihu.com/p/359801091 Rewrite主要的功能是实现URL重写,Nginx 的 Rewrite 规则采用 PCRE Perl 兼容正则表达式的语 ...

  4. [转帖]jmeter正则表达式应用-01篇

    如图所示 1.先新建一个login的http请求,然后再login的请求下新增一个正则表达式提取器,增加一个查看结果树查看结果 假如后端接口返回的数据为"{'msg': 'login suc ...

  5. [转帖]AHCI到NVMe,SSD的关键科技革命

      https://baijiahao.baidu.com/s?id=1718020841628703656&wfr=spider&for=pc HDD和早期SSD大部分使用SATA接 ...

  6. [转帖]传输层安全协议真(TLS)的安全吗?

    https://zhuanlan.zhihu.com/p/305161227 随着数字通信,计算机网络,公钥密码体制等技术的迅速发展,安全网络通信已经成为了人们的日常需求.TLS 作为目前被广泛应用的 ...

  7. Kernel 内核支持的方法查询

    今天同事说自己的一个项目出现了报错如图: 报错的机器是 Windows XP 想找一个 windows XP的机器验证一下: 然后 想通过百度搜索确认一下 这个问题 但是发现基本上效果不大 改用了bi ...

  8. 京东云开发者|深入JDK中的Optional

    概述:Optional最早是Google公司Guava中的概念,代表的是可选值.Optional类从Java8版本开始加入豪华套餐,主要为了解决程序中的NPE问题,从而使得更少的显式判空,防止代码污染 ...

  9. 最小的 $x$ 满足 $L\le x\bmod P\le R$

    设 \(G(L, R, D, P)\) 为 \(y P+L \leq x D \leq y P+R\) ,满足 \(1 \leq L \leq R<P, D<P\) ,其中 \(x\) 的 ...

  10. 装elemnetUI中用户头像上传

    组件.vue 在使用的时候,入股想出现边框.要自己在添加一个类哈 自己还有在添加一个哈 .avatar-uploader { border:1px solid red; width: 178px; h ...