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
e6a29707
Commit
e6a29707
authored
Dec 19, 2021
by
LDOUBLEV
Browse files
add eps
parent
2afc8dd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ppocr/metrics/rec_metric.py
ppocr/metrics/rec_metric.py
+3
-3
No files found.
ppocr/metrics/rec_metric.py
View file @
e6a29707
...
...
@@ -48,7 +48,7 @@ class RecMetric(object):
self
.
norm_edit_dis
+=
norm_edit_dis
return
{
'acc'
:
correct_num
/
all_num
,
'norm_edit_dis'
:
1
-
norm_edit_dis
/
all_num
'norm_edit_dis'
:
1
-
norm_edit_dis
/
(
all_num
+
1e-3
)
}
def
get_metric
(
self
):
...
...
@@ -58,8 +58,8 @@ class RecMetric(object):
'norm_edit_dis': 0,
}
"""
acc
=
1.0
*
self
.
correct_num
/
self
.
all_num
norm_edit_dis
=
1
-
self
.
norm_edit_dis
/
self
.
all_num
acc
=
1.0
*
self
.
correct_num
/
(
self
.
all_num
+
1e-3
)
norm_edit_dis
=
1
-
self
.
norm_edit_dis
/
(
self
.
all_num
+
1e-3
)
self
.
reset
()
return
{
'acc'
:
acc
,
'norm_edit_dis'
:
norm_edit_dis
}
...
...
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