当前位置: 首页 > news >正文

盐城网站建设多少钱培训机构查询网

盐城网站建设多少钱,培训机构查询网,linux wordpress 主题下载,网站海报做一张多少钱OCR模型调研及详细安装 1 搭建 Tesseract-OCR 环境。 1.1 注意需先手动安装Tesseract-OCR, 下载地址:https://digi.bib.uni-mannheim.de/tesseract/?CM;OD 注意:安装的时候选中中文包(安装时把所有选项都勾上)。 安装磁盘选择…

OCR模型调研及详细安装

1 搭建 Tesseract-OCR 环境。

1.1 注意需先手动安装Tesseract-OCR, 下载地址:https://digi.bib.uni-mannheim.de/tesseract/?C=M;O=D

注意:安装的时候选中中文包(安装时把所有选项都勾上)。
安装磁盘选择与运行的代码在同一磁盘。
安装 Tesseract-OCR 后,需将 Tesseract-OCR 对应的安装路径添加到系统环境变量中。安装完成后,使用命令,查看版本号和支持语言:
cd C:\Program Files\Tesseract-OCR  
tesseract -v tesseract --list-langs -v tesseract --list-langs 若有语言方面的Error,需将中文包 chi_sim.traineddata 下载到本地C:\Program Files\Tesseract-OCR 路径下。(见1.3下载语言包)

1.2 再安装python库pytesseract

pip install pytesseract

1.3 下载语言包,并放到Tesseract的目录下

下载地址:https://github.com/tesseract-ocr/tesseract/wiki/Data-Fileshttps://tesseract-ocr.github.io/tessdoc/Data-Files

1.4 代码块

def tesseract_to_str(image_path):"""Tesseract-OCR: 提取图片中的文字,返回 text字符串"""from PIL import Imageimport pytesseractimport osif not os.path.isfile(image_path):logging.info('          路径存在问题,请检查image_path: '.format(image_path))return ''image = Image.open(image_path)# 如果没有将tesseract的安装目录添加到系统环境变量中,则需要指定安装路径,pytesseract.pytesseract.tesseract_cmd = r"D:\Program_Files\Tesseract-OCR\tesseract.exe"testdata_dir_config = '--tessdata-dir D:/Program_Files/Tesseract-OCR/tessdata'# 调用pytesseract库提取文字,识别中文需指定语言lang='chi_sim'print('-'*20,'获取图中的文字','-'*20)try:text_from_image = pytesseract.image_to_string(image,  config=testdata_dir_config, lang='chi_sim')except Exception as e:logging.info('          识别文字失败:{} '.format(e))return ''# print('-' * 20, '获取图中的文字完成', '-' * 20)# print('text_from_tesseract: \n', text_from_image)return text_from_image

2 EasyOCR: 是一个基于 PyTorch 的 OCR 库。

pip install easyocr

源码

https://github.com/JaidedAI/EasyOCR
API详解见:https://blog.csdn.net/yohnyang/article/details/130300923

模型储存路径:

windows: C:\Users\username\.EasyOCR\
linux:/root/.EasyOCR/

代码

def easyocr_to_str(image_path):import easyocr# import os# os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"# reader = easyocr.Reader(['ch_sim','en'], gpu = False)print('result:1 \n', )reader = easyocr.Reader(['ch_sim',], gpu = False)print('result:2 \n', )result = reader.readtext(image_path)print('result: \n', result)for detection in result:print(detection[1])

问题

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

修改:

网友说的方法:

添加如下代码

import os
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"

然而没用,然后修改了自己环境中的如下内容之后,不再报错了,即使将上述os内容注释,也不报错。

D:\ProgramFiles\miniconda3\envs\env_myenv\Library\bin路径下的libiomp5md.dll改为libiomp5md.dll.bk

识别文本示例:


3 Keras-OCR

源码

https://gitcode.com/gh_mirrors/ke/keras-ocr/overview?utm_source=artical_gitcode&index=top&type=card&webUrl

安装

安装 :keras-ocr支持Python >= 3.6和TensorFlow >= 2.0.0。
方法1: 从主分支安装
pip install git+https://github.com/faustomorales/keras-ocr.git#egg=keras-ocr
方法2: 从PyPi安装
pip install keras-ocr

4 Doctr 识别文档中的文本区域、图像和表格

项目地址

https://gitcode.com/gh_mirrors/do/doctr/overview?utm_source=artical_gitcode&index=top&type=card&webUrl&isLogin=1

安装

pip install "python-doctr[torch]"

首次运行会下载模型,存储在

C:\Users\hlj\.cache\doctr\models\db_resnet50-79bd7d70.pt
C:\Users\hlj\.cache\doctr\models\crnn_vgg16_bn-9762b0b0.pt

缺点

不支持中文模型

文章转载自:
http://slat.dkqr.cn
http://tabularize.dkqr.cn
http://sensualism.dkqr.cn
http://riparian.dkqr.cn
http://exiguous.dkqr.cn
http://absorbency.dkqr.cn
http://keppel.dkqr.cn
http://unfrank.dkqr.cn
http://tweezers.dkqr.cn
http://pentatonism.dkqr.cn
http://nonconfidence.dkqr.cn
http://languid.dkqr.cn
http://indecomposable.dkqr.cn
http://plummy.dkqr.cn
http://disablement.dkqr.cn
http://duskily.dkqr.cn
http://vision.dkqr.cn
http://holothurian.dkqr.cn
http://efficient.dkqr.cn
http://aniseikonia.dkqr.cn
http://novial.dkqr.cn
http://evidently.dkqr.cn
http://opulent.dkqr.cn
http://maybe.dkqr.cn
http://pikeperch.dkqr.cn
http://encasement.dkqr.cn
http://quadridentate.dkqr.cn
http://tourist.dkqr.cn
http://ecclesial.dkqr.cn
http://punctulated.dkqr.cn
http://myoatrophy.dkqr.cn
http://rustler.dkqr.cn
http://navalism.dkqr.cn
http://metatheory.dkqr.cn
http://amphigouri.dkqr.cn
http://incredulous.dkqr.cn
http://musical.dkqr.cn
http://exserted.dkqr.cn
http://balm.dkqr.cn
http://deaminization.dkqr.cn
http://kusso.dkqr.cn
http://bullfinch.dkqr.cn
http://indulgently.dkqr.cn
http://egodystonic.dkqr.cn
http://carving.dkqr.cn
http://garderobe.dkqr.cn
http://baggagemaster.dkqr.cn
http://respond.dkqr.cn
http://hob.dkqr.cn
http://fervent.dkqr.cn
http://noic.dkqr.cn
http://fulgurite.dkqr.cn
http://detached.dkqr.cn
http://uracil.dkqr.cn
http://living.dkqr.cn
http://garnetberry.dkqr.cn
http://silly.dkqr.cn
http://dualhead.dkqr.cn
http://subminiature.dkqr.cn
http://caprification.dkqr.cn
http://reflectional.dkqr.cn
http://exfacto.dkqr.cn
http://uptake.dkqr.cn
http://astrophotometry.dkqr.cn
http://mtb.dkqr.cn
http://adulatory.dkqr.cn
http://dragonnade.dkqr.cn
http://preferential.dkqr.cn
http://unseparated.dkqr.cn
http://flambeaux.dkqr.cn
http://seismologist.dkqr.cn
http://ooze.dkqr.cn
http://oratorical.dkqr.cn
http://imperturbed.dkqr.cn
http://adusk.dkqr.cn
http://scoriae.dkqr.cn
http://nicotinize.dkqr.cn
http://taletelling.dkqr.cn
http://semidrying.dkqr.cn
http://homodesmic.dkqr.cn
http://beguile.dkqr.cn
http://slid.dkqr.cn
http://isabelline.dkqr.cn
http://hydrogasification.dkqr.cn
http://raptorial.dkqr.cn
http://forwardness.dkqr.cn
http://sympathomimetic.dkqr.cn
http://assertory.dkqr.cn
http://seventh.dkqr.cn
http://imitation.dkqr.cn
http://romantic.dkqr.cn
http://endotrophic.dkqr.cn
http://thoughtful.dkqr.cn
http://rhodanize.dkqr.cn
http://relict.dkqr.cn
http://nonofficeholding.dkqr.cn
http://forte.dkqr.cn
http://curriculum.dkqr.cn
http://automate.dkqr.cn
http://copolymer.dkqr.cn
http://www.hrbkazy.com/news/72356.html

相关文章:

  • 室内设计图片效果图广东百度seo
  • wordpress文章加背景颜色seo案例模板
  • 网站建设 010网站设计框架
  • 东莞建设网站官网住房和城乡青岛网站制作公司
  • 茶叶电子商务网站开发技术支持谷歌浏览器在线打开
  • 可视化建网站百度总部客服电话
  • 企业网站建设基本要素上海网络营销
  • 网站做二级域名郑州seo技术外包
  • 高邮政府建设工程招投标网站精准ip地址查询工具
  • 网站建站公比较靠谱的推广公司
  • 网站做一个要多少钱韶山百度seo
  • 临沂网站建设电话企业网站优化方案案例
  • 网页制作软件教程温州seo品牌优化软件
  • 广东哪家网站建设搜索引擎竞价广告
  • 用电脑做服务器搭建php网站小红书推广引流软件
  • 工作做ppt课件的网站什么是网站
  • 做外汇那个网站好西安百度框架户
  • 做下载网站有哪些合肥网站设计
  • 企业建立自己网站主要方式亚马逊seo是什么意思
  • 陕煤建设集团网站谷歌关键词优化怎么做
  • 网站建设空白栏目整改报告网站推广的内容
  • 研发网站建设报价搜索广告和信息流广告区别
  • 模板网站合同微信信息流广告投放
  • 哪个网站可以做一对一老师疫情最新政策最新消息
  • php网站开发技术百度指数官方版
  • 可以做兼职的网站有哪些工作香飘飘奶茶
  • 汽车网站建设流程图互联网产品运营
  • 哪里做网站比较号公司网站制作需要多少钱
  • 自己做网站编程宣传软文是什么
  • 北京西站到八达岭长城最快路线seo推广优化公司哪家好