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
6487937a
"sims/git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "ba969986cd64e3e0f623729e45166372e84e1c6f"
Commit
6487937a
authored
Jun 23, 2020
by
dyning
Browse files
use enable_memory_optim for cpu and gpu, add paddlehelp QRcode
parent
b115cb44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
ppocr/postprocess/east_postprocess.py
ppocr/postprocess/east_postprocess.py
+9
-2
No files found.
ppocr/postprocess/east_postprocess.py
View file @
6487937a
...
@@ -37,6 +37,11 @@ class EASTPostPocess(object):
...
@@ -37,6 +37,11 @@ class EASTPostPocess(object):
self
.
score_thresh
=
params
[
'score_thresh'
]
self
.
score_thresh
=
params
[
'score_thresh'
]
self
.
cover_thresh
=
params
[
'cover_thresh'
]
self
.
cover_thresh
=
params
[
'cover_thresh'
]
self
.
nms_thresh
=
params
[
'nms_thresh'
]
self
.
nms_thresh
=
params
[
'nms_thresh'
]
# c++ la-nms is faster, but only support python 3.5
self
.
is_python35
=
False
if
sys
.
version_info
.
major
==
3
and
sys
.
version_info
.
minor
==
5
:
self
.
is_python35
=
True
def
restore_rectangle_quad
(
self
,
origin
,
geometry
):
def
restore_rectangle_quad
(
self
,
origin
,
geometry
):
"""
"""
...
@@ -73,8 +78,10 @@ class EASTPostPocess(object):
...
@@ -73,8 +78,10 @@ class EASTPostPocess(object):
boxes
=
np
.
zeros
((
text_box_restored
.
shape
[
0
],
9
),
dtype
=
np
.
float32
)
boxes
=
np
.
zeros
((
text_box_restored
.
shape
[
0
],
9
),
dtype
=
np
.
float32
)
boxes
[:,
:
8
]
=
text_box_restored
.
reshape
((
-
1
,
8
))
boxes
[:,
:
8
]
=
text_box_restored
.
reshape
((
-
1
,
8
))
boxes
[:,
8
]
=
score_map
[
xy_text
[:,
0
],
xy_text
[:,
1
]]
boxes
[:,
8
]
=
score_map
[
xy_text
[:,
0
],
xy_text
[:,
1
]]
# boxes = nms_locality(boxes.astype(np.float64), nms_thresh)
if
self
.
is_python35
:
boxes
=
lanms
.
merge_quadrangle_n9
(
boxes
,
nms_thresh
)
boxes
=
lanms
.
merge_quadrangle_n9
(
boxes
,
nms_thresh
)
else
:
boxes
=
nms_locality
(
boxes
.
astype
(
np
.
float64
),
nms_thresh
)
if
boxes
.
shape
[
0
]
==
0
:
if
boxes
.
shape
[
0
]
==
0
:
return
[]
return
[]
# Here we filter some low score boxes by the average score map,
# Here we filter some low score boxes by the average score map,
...
...
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