Catalog

About

Install

python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
python -m pip install "paddleocr>=2.0.1"

If error ocurs during installation

 error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Download buildTool Installer from https://visualstudio.microsoft.com/visual-cpp-build-tools/ and install the desktop c++ package, this will download several GiB files, taking a long time.

Usage

paddleocr --image_dir ./fp05b.jpg --use_angle_cls true --use_gpu false

If it is running for the first time, it will download the model files

Invoke in Python

from paddleocr import PaddleOCR, draw_ocr

# Paddleocr目前支持的多语言语种可以通过修改lang参数进行切换
# 例如`ch`, `en`, `fr`, `german`, `korean`, `japan`
ocr = PaddleOCR(use_angle_cls=True, lang="ch") # need to run only once to download and load model into memory
img_path = './photos/fp04b.jpg'
result = ocr.ocr(img_path, cls=True)
for idx in range(len(result)):
res = result[idx]
for line in res:
print(line) # 显示结果
from PIL import Image
result = result[0]
image = Image.open(img_path).convert('RGB')
boxes = [line[0] for line in result]
txts = [line[1][0] for line in result]
scores = [line[1][1] for line in result]
im_show = draw_ocr(image, boxes, txts, scores, font_path='./msyh.ttc')
im_show = Image.fromarray(im_show)
im_show.save('fp04b_result.jpg')

Performance

  • Run on CPU, it will take around 10 seconds to parsing a picture
  • Correct rate is much better than Tesseract and EasyOCR, even when handling the cellphone photos.

OCR 03: PaddleOCR的更多相关文章

  1. 由于OCR文件损坏造成Oracle RAC不能启动的现象和处理方法

    v$cluster_interconnects 集群节点间通信使用的IP地址 错误信息 使用了公网进行连接 SQL> select * from v$cluster_interconnects; ...

  2. 机器学习&数据挖掘笔记_19(PGM练习三:马尔科夫网络在OCR上的简单应用)

    前言: 接着coursera课程:Probabilistic Graphical Models上的实验3,本次实验是利用马尔科夫网络(CRF模型)来完成单词的OCR识别,每个单词由多个字母组合,每个字 ...

  3. [转]Theano下用CNN(卷积神经网络)做车牌中文字符OCR

    Theano下用CNN(卷积神经网络)做车牌中文字符OCR 原文地址:http://m.blog.csdn.net/article/details?id=50989742 之前时间一直在看 Micha ...

  4. Tesseract——OCR图像识别 入门篇

    Tesseract——OCR图像识别 入门篇 最近给了我一个任务,让我研究图像识别,从我们项目的screenshot中识别文字信息,so我开始了学习,与大家分享下. 我看到目前OCR技术有很多,最主要 ...

  5. 11g r2 模拟OCR和voting disk不可用,完整恢复过程,以及一些注意事项

    环境:RHEL5.8 RAC 11.2.0.3.0 1:查看ORC和voting disk信息: In 11g Release 2 your voting disk data is automatic ...

  6. Tesseract Ocr引擎

    Tesseract Ocr引擎 1.Tesseract介绍 tesseract 是一个google支持的开源ocr项目,其项目地址:https://github.com/tesseract-ocr/t ...

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

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

  8. Ocr答题辅助神器 OcrAnswerer4.x,通过百度OCR识别手机文字,支持屏幕窗口截图和ADB安卓截图,支持四十个直播App,可保存题库

    http://www.cnblogs.com/Charltsing/p/OcrAnswerer.html 联系qq:564955427 最新版为v4.1版,开放一定概率的八窗口体验功能,请截图体验(多 ...

  9. Python下Tesseract Ocr引擎及安装介绍

    1.Tesseract介绍 tesseract 是一个google支持的开源ocr项目,其项目地址:https://github.com/tesseract-ocr/tesseract,目前最新的源码 ...

  10. 管理 Oracle Cluster Registry(OCR)

    oracle的clusterware包含两个重要组件:OCR(包含本地组件OLR)和voting disks --OCR管理oracle clusterware和oracle rac数据库的配置信息 ...

随机推荐

  1. MySQL shell 备份数据库

    MySQL shell 备份数据库 背景 之前使用 mysqldump 和 mysql source 的方式备份数据库非常缓慢 有时候要耗费非常长的时间 今天发现有一个可以快速备份数据库的 mysql ...

  2. [转帖]prometheus node-exporter 全部指标说明

    https://www.cnblogs.com/276815076/p/16383615.html Basic CPU / Mem / Disk Info Basic CPU / Mem / Disk ...

  3. [转帖]谈谈ClickHouse性能情况以及相关优化

    https://zhuanlan.zhihu.com/p/349105024 ClickHouse性能情况 主要分为4个方面 1.单个查询吞吐量 场景一: 如果数据被放置在page cache中,则一 ...

  4. [转帖]SPEC2006

    安装步骤 # Ubuntu16.04 # 注意安装gFortran . ./install.sh . ./shrc 一般情况下经过以上步骤即可安装完毕,进行使用,注意需要执行shrc设置完环境变量以后 ...

  5. [转帖]总结:Tomcat的IO模型

    一.介绍 对于 linux 操作系统,IO 多路复用使用的是 epoll 方式,对于 windows 操作系统中 IO 多路复用使用的是 iocp 方式,对于 mac 操作系统 IO 多路复用使用的是 ...

  6. [转帖]CPU Utilization is Wrong

    Brendan Gregg's Blog home CPU Utilization is Wrong 09 May 2017 The metric we all use for CPU utiliza ...

  7. 阿里云ECS虚拟机磁盘扩容过程

    阿里云ECS虚拟机磁盘扩容过程 背景 公司同事将很早之前的一个虚拟机重新开机. 就好将一套demo环境安装进这个ECS虚拟机里面 这个机器系统盘只有40G的空间. 导致磁盘空间不足. 其实一开始我不知 ...

  8. [译]深入了解现代web浏览器(一)

    本文是根据Mariko Kosaka在谷歌开发者网站上的系列文章https://developer.chrome.com/blog/inside-browser-part1/ 翻译而来,共有四篇,该篇 ...

  9. Fabric网络升级(四)

    原文来自这里. 用户从v1.4.x升级到v2.x后,必须编辑通道配置来启用新的lifecycle功能.这个过程涉及到相关用户必须执行的一系列通道配置更新. 要启用新的chaincode lifecyc ...

  10. Go 复合数据类型之结构体与自定义类型

    Go 复合数据类型之结构体与自定义类型 目录 Go 复合数据类型之结构体与自定义类型 一.类型别名和自定义类型 1.1 类型定义(Type Definition) 简单示例 1.2 类型别名 简单示例 ...