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
026f96b6
Commit
026f96b6
authored
Jul 29, 2021
by
WenmuZhou
Browse files
add export model of pse
parent
a6a44ea1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
tools/infer/predict_det.py
tools/infer/predict_det.py
+1
-3
tools/infer/utility.py
tools/infer/utility.py
+1
-1
No files found.
tools/infer/predict_det.py
View file @
026f96b6
...
@@ -223,9 +223,7 @@ class TextDetector(object):
...
@@ -223,9 +223,7 @@ class TextDetector(object):
#self.predictor.try_shrink_memory()
#self.predictor.try_shrink_memory()
post_result
=
self
.
postprocess_op
(
preds
,
shape_list
)
post_result
=
self
.
postprocess_op
(
preds
,
shape_list
)
dt_boxes
=
post_result
[
0
][
'points'
]
dt_boxes
=
post_result
[
0
][
'points'
]
if
self
.
det_algorithm
==
"SAST"
and
self
.
det_sast_polygon
:
if
(
self
.
det_algorithm
==
"SAST"
and
self
.
det_sast_polygon
)
or
(
self
.
det_algorithm
==
"PSE"
and
self
.
det_pse_box_type
==
'poly'
):
dt_boxes
=
self
.
filter_tag_det_res_only_clip
(
dt_boxes
,
ori_im
.
shape
)
elif
self
.
det_algorithm
==
"PSE"
and
self
.
det_pse_box_type
==
'poly'
:
dt_boxes
=
self
.
filter_tag_det_res_only_clip
(
dt_boxes
,
ori_im
.
shape
)
dt_boxes
=
self
.
filter_tag_det_res_only_clip
(
dt_boxes
,
ori_im
.
shape
)
else
:
else
:
dt_boxes
=
self
.
filter_tag_det_res
(
dt_boxes
,
ori_im
.
shape
)
dt_boxes
=
self
.
filter_tag_det_res
(
dt_boxes
,
ori_im
.
shape
)
...
...
tools/infer/utility.py
View file @
026f96b6
...
@@ -66,7 +66,7 @@ def init_args():
...
@@ -66,7 +66,7 @@ def init_args():
parser
.
add_argument
(
"--det_pse_thresh"
,
type
=
float
,
default
=
0
)
parser
.
add_argument
(
"--det_pse_thresh"
,
type
=
float
,
default
=
0
)
parser
.
add_argument
(
"--det_pse_box_thresh"
,
type
=
float
,
default
=
0.85
)
parser
.
add_argument
(
"--det_pse_box_thresh"
,
type
=
float
,
default
=
0.85
)
parser
.
add_argument
(
"--det_pse_min_area"
,
type
=
float
,
default
=
16
)
parser
.
add_argument
(
"--det_pse_min_area"
,
type
=
float
,
default
=
16
)
parser
.
add_argument
(
"--det_pse_box_type"
,
type
=
str
,
default
=
'
poly
'
)
parser
.
add_argument
(
"--det_pse_box_type"
,
type
=
str
,
default
=
'
box
'
)
parser
.
add_argument
(
"--det_pse_scale"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--det_pse_scale"
,
type
=
int
,
default
=
1
)
# params for text recognizer
# params for text recognizer
...
...
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