HyperLRP是一个开源的、基于深度学习高性能中文车牌识别库,由北京智云视图科技有限公司开发,支持PHP、C/C++、Python语言,Windows/Mac/Linux/Android/IOS 平台。进行一个车牌识别的入门探索。
1、搭建环境:
1.1在pycharm里创建工程HyperLPR,选择python3.6解释器
1.2在pycharm中找到并点击下方图片中的Terminal安装必备包
1.3安装必备包
pip install keras==2.0.9 -i --trusted-host pypi.doubanpip install Theano -i --trusted-host pypi.doubanpip install numpy==1.16.0 -i --trusted-host pypi.doubanpip install Scipy -i --trusted-host pypi.doubanpip install opencv-python==3.4.3.18 -i --trusted-host pypi.doubanpip install scikit-image -i --trusted-host pypi.doubanpip install pillow -i --trusted-host pypi.doubanpip install tensorflow==1.2.0 -i --trusted-host pypi.doubanpip install h5py
以上所有包都安装指定版本
2、下载HyperLPR包
链接:
提取码:chy1
里面其实只需要三个文件:hyperlpr_py3,model,Font
删掉hyperlpr_py3中_pycache_文件(不需要)
把以上三个文件全部导入到项目工程即可
导入后如下图
3、接着把每个py文件里的from . . 删掉
4、最后在main函数里测试一下
图片为jpg或png都可以
main.py
import pipline as pp
import cv2image = cv2.imread("D:/IECS_PHOTOS/1.jpg")
image, res = pp.SimpleRecognizePlate(image)
print(res)
Using TensorFlow backend.
2021-04-26 17:21:58.849879: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.850290: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.850602: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.850913: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.851263: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.851574: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.851884: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2021-04-26 17:21:58.852227: W c:tf_jenkinshomeworkspacerelease-winmwindowspy36tensorflowcoreplatformcpu_feature_guard:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
(1048, 1680, 3)
校正角度 h 0 v 90
keras_predict [0.10701188 0.9172991 ]
c769b466
e2e: ('京KBT355', 0.991141106401171)
校正 0.6603515148162842 s
分割 0.05764651298522949
410
寻找寻找最佳点 0.0199129581451416
字符识别 0.08989286422729492
分割和识别 0.17144370079040527 s
车牌: 京KBT355 置信度: 0.9851458583559308
3.277062177658081 s
['京KBT355']Process finished with exit code 0
完成!
本文发布于:2024-02-01 01:39:18,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170672275832918.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |