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
wangsen
paddle_dbnet
Commits
2cc1d00b
Commit
2cc1d00b
authored
Jun 30, 2020
by
tink2123
Browse files
revert modified for predict_rec
parent
1c8cddf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tools/infer/predict_rec.py
tools/infer/predict_rec.py
+1
-1
No files found.
tools/infer/predict_rec.py
View file @
2cc1d00b
...
@@ -53,7 +53,7 @@ class TextRecognizer(object):
...
@@ -53,7 +53,7 @@ class TextRecognizer(object):
imgC
,
imgH
,
imgW
=
self
.
rec_image_shape
imgC
,
imgH
,
imgW
=
self
.
rec_image_shape
assert
imgC
==
img
.
shape
[
2
]
assert
imgC
==
img
.
shape
[
2
]
if
self
.
character_type
==
"ch"
:
if
self
.
character_type
==
"ch"
:
imgW
=
int
(
math
.
ceil
(
32
*
max_wh_ratio
))
imgW
=
int
((
32
*
max_wh_ratio
))
h
,
w
=
img
.
shape
[:
2
]
h
,
w
=
img
.
shape
[:
2
]
ratio
=
w
/
float
(
h
)
ratio
=
w
/
float
(
h
)
if
math
.
ceil
(
imgH
*
ratio
)
>
imgW
:
if
math
.
ceil
(
imgH
*
ratio
)
>
imgW
:
...
...
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