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
8ec42a5c
"examples/vscode:/vscode.git/clone" did not exist on "2b04ec2ff7270d2044410378b04d85a194fa3d4a"
Commit
8ec42a5c
authored
Jan 06, 2022
by
WenmuZhou
Browse files
move import seqeval to get_metric fun
parent
cd7b2ea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ppocr/metrics/vqa_token_ser_metric.py
ppocr/metrics/vqa_token_ser_metric.py
+1
-1
No files found.
ppocr/metrics/vqa_token_ser_metric.py
View file @
8ec42a5c
...
@@ -18,7 +18,6 @@ from __future__ import print_function
...
@@ -18,7 +18,6 @@ from __future__ import print_function
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
from
seqeval.metrics
import
f1_score
,
precision_score
,
recall_score
__all__
=
[
'KIEMetric'
]
__all__
=
[
'KIEMetric'
]
...
@@ -34,6 +33,7 @@ class VQASerTokenMetric(object):
...
@@ -34,6 +33,7 @@ class VQASerTokenMetric(object):
self
.
gt_list
.
extend
(
labels
)
self
.
gt_list
.
extend
(
labels
)
def
get_metric
(
self
):
def
get_metric
(
self
):
from
seqeval.metrics
import
f1_score
,
precision_score
,
recall_score
metircs
=
{
metircs
=
{
"precision"
:
precision_score
(
self
.
gt_list
,
self
.
pred_list
),
"precision"
:
precision_score
(
self
.
gt_list
,
self
.
pred_list
),
"recall"
:
recall_score
(
self
.
gt_list
,
self
.
pred_list
),
"recall"
:
recall_score
(
self
.
gt_list
,
self
.
pred_list
),
...
...
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