Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
LPRNet_pytorch
Commits
fc75b698
"vscode:/vscode.git/clone" did not exist on "048d9019931ddf2b28c4a909bf6c2d681a809159"
Commit
fc75b698
authored
Mar 01, 2023
by
liuhy
Browse files
编写readme
parent
c7cdb9e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
README.md
README.md
+2
-7
No files found.
README.md
View file @
fc75b698
# License-Plate-Recoginition(LPR)
## 模型介绍
LPR是一个基于深度学习技术的车牌识别模型,主要识别目标是自然场景的车牌图像。
## 模型结构
模型采用LPRNet,模型结构主要包含三部分:一个轻量级CNN主干网络、基于预定位置的字符分类头部、基于贪婪算法的序列解码。此外模型使用CTC Loss和RMSprop优化器。
## 数据集
推荐使用一个车牌数据集
[
CCPD
](
https://github.com/detectRecog/CCPD
"CCPD官网GitHub"
)
,也可参考
[
CCPD
](
https://blog.csdn.net/LuohenYJ/article/details/117752120
"CCPD中文版介绍"
)
,该数据集由中科大收集,可用于车牌的检测与识别。我们提供了一个脚本cut_ccpd.py用于剪裁出CCPD数据集中的车牌位置,以便用于LPR模型的训练,在cut_ccpd.py中修改img_path和save_path即可,分别是CCPD数据集中ccpd_base文件夹的路径和剪裁出的图像保存路径。LPR用于训练的数据文件名就是图像的标签。
## 训练及推理
### 训练与Fine-tunning
LPR模型的训练程序是train.py,初次训练模型使用以下命令:
python train.py \
--train_img_dirs 训练集文件夹路径 \
--test_img_dirs 验证集文件夹路径
Fine-tunning使用以下命令:
python train.py \
--train_img_dirs 训练集文件夹路径 \
--test_img_dirs 验证集文件夹路径 \
...
...
@@ -30,20 +29,16 @@ LPR模型用test.py对训练出的模型进行测试,使用方法如下:
--export_onnx 该参数用于选择是否需要将pth模型转为onnx模型
--dynamic 该参数用于选择onnx模型是否使用动态的batch size
### 推理
我们分别提供了基于OnnxRuntime(ORT)和Migraphx的推理脚本
#### ORT
LPRNet_ORT_infer.py是基于ORT的的推理脚本,使用方法:
python LPRNet_ORT_infer.py --model onnx模型路径 --imgpath 数据路径(文件夹图像皆可)
#### Migraphx
LPRNet_migraphx_infer.py是基于Migraphx的推理脚本,使用需安装好Migraphx,支持onnx模型和mxr模型推理,mxr模型是migraphx将onnx模型保存成的离线推理引擎,初次使用onnx模型会保存对应的mxr模型。使用方法:
python LPRNet_migraphx_infer.py --model mxr/onnx模型路径 --imgpath 数据路径(文件夹图像皆可) --savepath mxr模型的保存路径以及模型名称
## 性能和准确率数据
## 参考
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment