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
606a3873
Commit
606a3873
authored
Nov 24, 2020
by
WenmuZhou
Browse files
删掉多余的判断
parent
0da2cdb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+0
-2
No files found.
ppocr/data/imaug/label_ops.py
View file @
606a3873
...
@@ -160,8 +160,6 @@ class CTCLabelEncode(BaseRecLabelEncode):
...
@@ -160,8 +160,6 @@ class CTCLabelEncode(BaseRecLabelEncode):
text
=
self
.
encode
(
text
)
text
=
self
.
encode
(
text
)
if
text
is
None
:
if
text
is
None
:
return
None
return
None
if
len
(
text
)
>
self
.
max_text_len
:
return
None
data
[
'length'
]
=
np
.
array
(
len
(
text
))
data
[
'length'
]
=
np
.
array
(
len
(
text
))
text
=
text
+
[
0
]
*
(
self
.
max_text_len
-
len
(
text
))
text
=
text
+
[
0
]
*
(
self
.
max_text_len
-
len
(
text
))
data
[
'label'
]
=
np
.
array
(
text
)
data
[
'label'
]
=
np
.
array
(
text
)
...
...
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