This research aims at simply developping plate recognition project based on deep learning methods, with low complexity and high speed. This
project has been used by some commercial corporations. Free and open source, deploying by Zeusee.
HyperLPR是一个使用深度学习针对对中文车牌识别的实现,与较为流行的开源的EasyPR相比,它的检测速度和鲁棒性和多场景的适应性都要好于目前开源的EasyPR。
from hyperlpr import pipline as pp
import cv2
image = cv2.imread("filename")
image,res = pp.SimpleRecognizePlate(image)
print(res)
cd cpp_implementation
mkdir build
cd build
cmake ../
sudo make -j
#include "../include/Pipeline.h"
int main(){
pr::PipelinePR prc("model/cascade.xml",
"model/HorizonalFinemapping.prototxt","model/HorizonalFinemapping.caffemodel",
"model/Segmentation.prototxt","model/Segmentation.caffemodel",
"model/CharacterRecognization.prototxt","model/CharacterRecognization.caffemodel",
"model/SegmentationFree.prototxt","model/SegmentationFree.caffemodel"
);
//定义模型文件
cv::Mat image = cv::imread("/Users/yujinke/ClionProjects/cpp_ocr_demo/test.png");
std::vector<pr::PlateInfo> res = prc.RunPiplineAsImage(image,pr::SEGMENTATION_FREE_METHOD);
//使用端到端模型模型进行识别 识别结果将会保存在res里面
for(auto st:res) {
if(st.confidence>0.75) {
std::cout << st.getPlateName() << " " << st.confidence << std::endl;
//输出识别结果 、识别置信度
cv::Rect region = st.getPlateRect();
//获取车牌位置
cv::rectangle(image,cv::Point(region.x,region.y),cv::Point(region.x+region.width,region.y+region.height),cv::Scalar(255,255,0),2);
//画出车牌位置
}
}
cv::imshow("image",image);
cv::waitKey(0);
return 0 ;
}
车牌识别框架开发时使用的数据并不是很多,有意着可以为我们提供相关车牌数据。联系邮箱 455501914@qq.com。
如果您愿意支持我们持续对这个框架的开发,可以通过下面的链接来对我们捐赠。