Fetch the repository succeeded.
This action will force synchronization from 北京智云视图科技有限公司/HyperLPR, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
python -m pip install hyperlpr
#导入包
from hyperlpr import *
#导入OpenCV库
import cv2
#读入图片
image = cv2.imread("demo.jpg")
#识别结果
print(HyperLPR_plate_recognition(image))
Q:Android识别率没有所传demo apk的识别率高?
A:请使用Prj-Linux下的模型,android默认包里的配置是相对较早的模型
Q:车牌的训练数据来源?
A:由于用于训练车牌数据涉及到法律隐私等问题,本项目无法提供。开放较为大的数据集有CCPD车牌数据集。
Q:训练代码的提供?
A:相关资源中有提供训练代码
Q:关于项目的来源?
A:此项目来源于作者早期的研究和调试代码,代码缺少一定的规范,同时也欢迎PR。
cd Prj-Linux
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/SegmenationFree-Inception.prototxt","model/SegmenationFree-Inception.caffemodel"
);
//定义模型文件
cv::Mat image = cv::imread("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 ;
}
Sign in to post a comment
Repository Comments ( 0 )