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
c12e9ec5
Unverified
Commit
c12e9ec5
authored
Aug 03, 2020
by
shaohua.zhang
Committed by
GitHub
Aug 03, 2020
Browse files
Update east_process.py
parent
08055099
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
ppocr/data/det/east_process.py
ppocr/data/det/east_process.py
+2
-1
No files found.
ppocr/data/det/east_process.py
View file @
c12e9ec5
...
@@ -17,6 +17,7 @@ import cv2
...
@@ -17,6 +17,7 @@ import cv2
import
numpy
as
np
import
numpy
as
np
import
json
import
json
import
sys
import
sys
import
os
class
EASTProcessTrain
(
object
):
class
EASTProcessTrain
(
object
):
def
__init__
(
self
,
params
):
def
__init__
(
self
,
params
):
...
@@ -52,7 +53,7 @@ class EASTProcessTrain(object):
...
@@ -52,7 +53,7 @@ class EASTProcessTrain(object):
label_infor
=
label_infor
.
decode
()
label_infor
=
label_infor
.
decode
()
label_infor
=
label_infor
.
encode
(
'utf-8'
).
decode
(
'utf-8-sig'
)
label_infor
=
label_infor
.
encode
(
'utf-8'
).
decode
(
'utf-8-sig'
)
substr
=
label_infor
.
strip
(
"
\n
"
).
split
(
"
\t
"
)
substr
=
label_infor
.
strip
(
"
\n
"
).
split
(
"
\t
"
)
img_path
=
self
.
img_set_dir
+
"/"
+
substr
[
0
]
img_path
=
os
.
path
.
join
(
self
.
img_set_dir
,
substr
[
0
]
)
label
=
json
.
loads
(
substr
[
1
])
label
=
json
.
loads
(
substr
[
1
])
nBox
=
len
(
label
)
nBox
=
len
(
label
)
wordBBs
,
txts
,
txt_tags
=
[],
[],
[]
wordBBs
,
txts
,
txt_tags
=
[],
[],
[]
...
...
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