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
d0d387c6
Commit
d0d387c6
authored
Aug 13, 2024
by
liuhy
Browse files
修改限制数据为连续数据
parent
331f6342
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
LPRNet_migraphx_infer.py
LPRNet_migraphx_infer.py
+2
-1
No files found.
LPRNet_migraphx_infer.py
View file @
d0d387c6
...
@@ -24,7 +24,8 @@ def LPRNetPreprocess(image):
...
@@ -24,7 +24,8 @@ def LPRNetPreprocess(image):
img
=
cv2
.
resize
(
img
,
(
94
,
24
)).
astype
(
'float32'
)
img
=
cv2
.
resize
(
img
,
(
94
,
24
)).
astype
(
'float32'
)
img
-=
127.5
img
-=
127.5
img
*=
0.0078125
img
*=
0.0078125
img
=
np
.
expand_dims
(
img
.
transpose
(
2
,
0
,
1
),
0
)
# img = np.expand_dims(img.transpose(2, 0, 1), 0)
img
=
np
.
ascontiguousarray
(
np
.
expand_dims
(
img
.
transpose
(
2
,
0
,
1
),
0
))
return
img
return
img
def
LPRNetPostprocess
(
infer_res
):
def
LPRNetPostprocess
(
infer_res
):
...
...
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