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
679ae84d
Commit
679ae84d
authored
Mar 02, 2023
by
liuhy
Browse files
修改readme
parent
cdadb5ce
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
LPRNet_migraphx_infer.py
LPRNet_migraphx_infer.py
+1
-1
README.md
README.md
+9
-5
model/LPRNet.mxr
model/LPRNet.mxr
+0
-0
test.py
test.py
+1
-2
No files found.
LPRNet_migraphx_infer.py
View file @
679ae84d
...
@@ -84,7 +84,7 @@ def LPRNetInference(args):
...
@@ -84,7 +84,7 @@ def LPRNetInference(args):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
(
description
=
'parameters to vaildate net'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'parameters to vaildate net'
)
parser
.
add_argument
(
'--model'
,
default
=
'model/LPRNet.onnx'
,
help
=
'model path to inference'
)
parser
.
add_argument
(
'--model'
,
default
=
'model/LPRNet.onnx'
,
help
=
'model path to inference'
)
parser
.
add_argument
(
'--imgpath'
,
default
=
'imgs
/京PL3N67.jpg
'
,
help
=
'the image path'
)
parser
.
add_argument
(
'--imgpath'
,
default
=
'imgs'
,
help
=
'the image path'
)
parser
.
add_argument
(
'--savepath'
,
default
=
'model/LPRNet.mxr'
,
help
=
'mxr model save path and name'
)
parser
.
add_argument
(
'--savepath'
,
default
=
'model/LPRNet.mxr'
,
help
=
'mxr model save path and name'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
README.md
View file @
679ae84d
...
@@ -30,7 +30,9 @@ LPR模型用test.py对训练出的模型进行测试,使用方法如下:
...
@@ -30,7 +30,9 @@ LPR模型用test.py对训练出的模型进行测试,使用方法如下:
--export_onnx 该参数用于选择是否需要将pth模型转为onnx模型
--export_onnx 该参数用于选择是否需要将pth模型转为onnx模型
--dynamic 该参数用于选择onnx模型是否使用动态的batch size
--dynamic 该参数用于选择onnx模型是否使用动态的batch size
### 推理
### 推理
我们分别提供了基于OnnxRuntime(ORT)和Migraphx的推理脚本
我们分别提供了基于OnnxRuntime(ORT)和Migraphx的推理脚本,版本依赖:
*
ONNXRuntime(DCU版本) >= 1.14.0
*
Migraphx(DCU版本) >= 2.5.0
#### ORT
#### ORT
LPRNet_ORT_infer.py是基于ORT的的推理脚本,使用方法:
LPRNet_ORT_infer.py是基于ORT的的推理脚本,使用方法:
...
@@ -40,11 +42,13 @@ LPRNet_migraphx_infer.py是基于Migraphx的推理脚本,使用需安装好Mig
...
@@ -40,11 +42,13 @@ LPRNet_migraphx_infer.py是基于Migraphx的推理脚本,使用需安装好Mig
python LPRNet_migraphx_infer.py --model mxr/onnx模型路径 --imgpath 数据路径(文件夹图像皆可) --savepath mxr模型的保存路径以及模型名称
python LPRNet_migraphx_infer.py --model mxr/onnx模型路径 --imgpath 数据路径(文件夹图像皆可) --savepath mxr模型的保存路径以及模型名称
## 性能和准确率数据
## 性能和准确率数据
测试数据使用的是
[
LPRNet_Pytorch
](
https://github.com/sirius-ai/LPRNet_Pytorch/tree/master/data/test
)
测试数据使用的是
[
LPRNet_Pytorch
](
https://github.com/sirius-ai/LPRNet_Pytorch/tree/master/data/test
)
,使用的加速卡是DCU Z100。
**mxr格式的模型是migraphx创建的onnx模型的离线引擎。**
| size | personal test imgs(%) | DCU(pth/ms) |DCU(onnx/ms) | DCU(mxr/ms)|
| Engine | Model Format | Accuracy(%) | Speed(ms) |
| :------: | :------: | :------: |:------: |:------: |
| :------: | :------: | :------: |:------: |
| 1.7M | 96.0+ | 52 | 51 | |
| ONNXRuntime | onnx | 91.0 | 37.62 |
| Migraphx | onnx | 91.0 | 3.70 |
| Migraphx | mxr | 91.0 | 3.27 |
## 参考
## 参考
*
[
LPRNet: License Plate Recognition via Deep Neural Networks
](
https://arxiv.org/pdf/1806.10447v1.pdf
)
*
[
LPRNet: License Plate Recognition via Deep Neural Networks
](
https://arxiv.org/pdf/1806.10447v1.pdf
)
*
[
LPRNet_Pytorch
](
https://github.com/sirius-ai/LPRNet_Pytorch
)
*
[
LPRNet_Pytorch
](
https://github.com/sirius-ai/LPRNet_Pytorch
)
...
...
model/LPRNet.mxr
View file @
679ae84d
No preview for this file type
test.py
View file @
679ae84d
...
@@ -70,7 +70,6 @@ def validation(args):
...
@@ -70,7 +70,6 @@ def validation(args):
dynamic_axes
=
{
'input'
:
{
0
:
'batch'
},
'output'
:
{
0
:
'batch'
}}
if
args
.
dynamic
else
None
,
dynamic_axes
=
{
'input'
:
{
0
:
'batch'
},
'output'
:
{
0
:
'batch'
}}
if
args
.
dynamic
else
None
,
opset_version
=
12
,
opset_version
=
12
,
)
)
return
res
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
@@ -84,5 +83,5 @@ if __name__ == '__main__':
...
@@ -84,5 +83,5 @@ if __name__ == '__main__':
parser
.
add_argument
(
'--dynamic'
,
default
=
False
,
help
=
'use dynamic batch size'
)
parser
.
add_argument
(
'--dynamic'
,
default
=
False
,
help
=
'use dynamic batch size'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
result
=
validation
(
args
)
validation
(
args
)
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