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
fda89b35
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "f267f3f7b084cb56fd93a8b187bbbb284c512f73"
Commit
fda89b35
authored
Aug 02, 2021
by
WenmuZhou
Browse files
fix win encode error
parent
ec05f50f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+3
-3
No files found.
ppocr/data/imaug/label_ops.py
View file @
fda89b35
...
@@ -380,14 +380,14 @@ class TableLabelEncode(object):
...
@@ -380,14 +380,14 @@ class TableLabelEncode(object):
list_elem
=
[]
list_elem
=
[]
with
open
(
character_dict_path
,
"rb"
)
as
fin
:
with
open
(
character_dict_path
,
"rb"
)
as
fin
:
lines
=
fin
.
readlines
()
lines
=
fin
.
readlines
()
substr
=
lines
[
0
].
decode
(
'utf-8'
).
strip
(
"
\n
"
).
split
(
"
\t
"
)
substr
=
lines
[
0
].
decode
(
'utf-8'
).
strip
(
"
\
r\
n
"
).
split
(
"
\t
"
)
character_num
=
int
(
substr
[
0
])
character_num
=
int
(
substr
[
0
])
elem_num
=
int
(
substr
[
1
])
elem_num
=
int
(
substr
[
1
])
for
cno
in
range
(
1
,
1
+
character_num
):
for
cno
in
range
(
1
,
1
+
character_num
):
character
=
lines
[
cno
].
decode
(
'utf-8'
).
strip
(
"
\n
"
)
character
=
lines
[
cno
].
decode
(
'utf-8'
).
strip
(
"
\
r\
n
"
)
list_character
.
append
(
character
)
list_character
.
append
(
character
)
for
eno
in
range
(
1
+
character_num
,
1
+
character_num
+
elem_num
):
for
eno
in
range
(
1
+
character_num
,
1
+
character_num
+
elem_num
):
elem
=
lines
[
eno
].
decode
(
'utf-8'
).
strip
(
"
\n
"
)
elem
=
lines
[
eno
].
decode
(
'utf-8'
).
strip
(
"
\
r\
n
"
)
list_elem
.
append
(
elem
)
list_elem
.
append
(
elem
)
return
list_character
,
list_elem
return
list_character
,
list_elem
...
...
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