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
dc3bce76
Commit
dc3bce76
authored
Sep 02, 2021
by
andyjpaddle
Browse files
update sar postprocess
parent
37cd4ed3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
configs/rec/rec_r31_sar.yml
configs/rec/rec_r31_sar.yml
+1
-1
ppocr/postprocess/rec_postprocess.py
ppocr/postprocess/rec_postprocess.py
+1
-1
No files found.
configs/rec/rec_r31_sar.yml
View file @
dc3bce76
...
@@ -19,6 +19,7 @@ Global:
...
@@ -19,6 +19,7 @@ Global:
max_text_length
:
30
max_text_length
:
30
infer_mode
:
False
infer_mode
:
False
use_space_char
:
False
use_space_char
:
False
rm_symbol
:
True
save_res_path
:
./output/rec/predicts_sar.txt
save_res_path
:
./output/rec/predicts_sar.txt
Optimizer
:
Optimizer
:
...
@@ -47,7 +48,6 @@ Loss:
...
@@ -47,7 +48,6 @@ Loss:
PostProcess
:
PostProcess
:
name
:
SARLabelDecode
name
:
SARLabelDecode
rm_symbol
:
True
Metric
:
Metric
:
name
:
RecMetric
name
:
RecMetric
...
...
ppocr/postprocess/rec_postprocess.py
View file @
dc3bce76
...
@@ -526,10 +526,10 @@ class SARLabelDecode(BaseRecLabelDecode):
...
@@ -526,10 +526,10 @@ class SARLabelDecode(BaseRecLabelDecode):
character_dict_path
=
None
,
character_dict_path
=
None
,
character_type
=
'ch'
,
character_type
=
'ch'
,
use_space_char
=
False
,
use_space_char
=
False
,
rm_symbol
=
True
,
**
kwargs
):
**
kwargs
):
super
(
SARLabelDecode
,
self
).
__init__
(
character_dict_path
,
super
(
SARLabelDecode
,
self
).
__init__
(
character_dict_path
,
character_type
,
use_space_char
)
character_type
,
use_space_char
)
self
.
rm_symbol
=
kwargs
.
get
(
'rm_symbol'
,
True
)
def
add_special_char
(
self
,
dict_character
):
def
add_special_char
(
self
,
dict_character
):
beg_end_str
=
"<BOS/EOS>"
beg_end_str
=
"<BOS/EOS>"
...
...
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