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
3d8b42dc
Commit
3d8b42dc
authored
Feb 08, 2021
by
tink2123
Browse files
fix encode for srn
parent
4b845ca1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+1
-1
No files found.
ppocr/data/imaug/label_ops.py
View file @
3d8b42dc
...
...
@@ -261,7 +261,7 @@ class SRNLabelEncode(BaseRecLabelEncode):
if
len
(
text
)
>
self
.
max_text_len
:
return
None
data
[
'length'
]
=
np
.
array
(
len
(
text
))
text
=
text
+
[
char_num
]
*
(
self
.
max_text_len
-
len
(
text
))
text
=
text
+
[
char_num
-
1
]
*
(
self
.
max_text_len
-
len
(
text
))
data
[
'label'
]
=
np
.
array
(
text
)
return
data
...
...
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