当前位置:网站首页>Keras OCR instance test
Keras OCR instance test
2022-07-27 06:48:00 【sin_ four hundred and four】
keras-ocr
Document address
Reference article
An introductory in-depth study OCR: A collection of data sets and algorithms
Error set
pip install ‘numpy1.19’ --force-reinstall Reload library version
pip install 'h5py2.10.0’ --force-reinstall
code example
import matplotlib.pyplot as plt
import keras_ocr
# keras-ocr will automatically download pretrained
# weights for the detector and recognizer.
pipeline = keras_ocr.pipeline.Pipeline()
# Get a set of three example images
# Identify the default three pictures in a batch , Probably need to reserve 8g Memory , Only two are posted here
images = [
keras_ocr.tools.read(url) for url in [
# 'https://upload.wikimedia.org/wikipedia/commons/b/bd/Army_Reserves_Recruitment_Banner_MOD_45156284.jpg',
'http://5b0988e595225.cdn.sohucs.com/images/20170905/44ecb27c4e5349e28abcbff8f3a6d4d2.jpeg',
'https://upload.wikimedia.org/wikipedia/commons/b/b4/EUBanana-500x112.jpg'
]
]
# Each list of predictions in prediction_groups is a list of
# (word, box) tuples.
prediction_groups = pipeline.recognize(images)
# Plot the predictions
fig, axs = plt.subplots(nrows=len(images), figsize=(20, 20))
for ax, image, predictions in zip(axs, images, prediction_groups):
keras_ocr.tools.drawAnnotations(image=image, predictions=predictions, ax=ax)
# keras_ocr.tools.drawAnnotations(image=images[-1], predictions=prediction_groups[-1], ax=axs)
plt.show()
design sketch 
边栏推荐
- LVM与磁盘配额
- Source code compilation and installation LNMP and discuz Forum
- Recommended by the world's most technologically competent smart contract security audit company in 2022
- Soul持续发力社交渠道赴港上市,“Soul式社交”凭什么火出圈?
- Redis' idea under windows is not connected
- torch加载自定义模型的问题
- Summary of frequently asked questions in the interview [summarized after painstaking work all night]
- Shell脚本删除自动清理超过大小的文件
- pycharm在虚拟环境下跑jupyter notebook问题记录
- Cesium tutorial (1) interface introduction -3dfiles loading - change mouse operation settings
猜你喜欢

Lamp -- source code compilation and installation

Is it feasible to fix the vulnerability with one click? Sunflower to tell you that one click fix vulnerability is feasible? Sunflower to tell you that one click fix vulnerability is feasible? Sunflowe

Redis fast learning

1. CentOS 7 安装 redis

DHCP principle and configuration

Sunflower: don't worry when you encounter computer vulnerabilities, understand clearly and then judge sunflower: don't worry when you encounter computer vulnerabilities, understand clearly and then ju

众多世界500强企业集聚第二届数博会,数字产业大幕即将开启!

pycharm在虚拟环境下跑jupyter notebook问题记录

项目实训经历1

云原生运行环境搭建
随机推荐
如何避免漏洞?向日葵远程为你讲解不同场景下的安全使用方法
Many of the world's top 500 enterprises gathered at the second digital Expo, and the digital industry curtain is about to open!
PXE efficient batch network installation
使用密钥方式登录阿里云服务器
Sunflower: don't worry when you encounter computer vulnerabilities, understand clearly and then judge sunflower: don't worry when you encounter computer vulnerabilities, understand clearly and then ju
1. CentOS 7 安装 redis
KVM命令集管理虚拟机
Do it yourself container
Build cloud native operating environment
多模态数据库 | 星环科技多模数据库ArgoDB“一库多用“,构建高性能湖仓集一体平台
ArcGIS for JS API (2) get the ID set of element services
PXE高效批量网络装机
RAID详解与配置
Basic knowledge of English: juxtaposition structure
Shell -- conditional statements (if statements, case statements)
Concept and principle of DHCP
Shell script delete automatically clean up files that exceed the size
云原生运行环境搭建
Shell programming specification and redirection and pipeline operation
DHCP principle and configuration
