diff --git a/ppocr/metrics/vqa_token_ser_metric.py b/ppocr/metrics/vqa_token_ser_metric.py index 281c83a92da8a0c0c90bb09fbfd94ef2a6c1ecde..92d80d0970dc2eab1d3fb82e2b4cfb8d930a60a0 100644 --- a/ppocr/metrics/vqa_token_ser_metric.py +++ b/ppocr/metrics/vqa_token_ser_metric.py @@ -18,7 +18,6 @@ from __future__ import print_function import numpy as np import paddle -from seqeval.metrics import f1_score, precision_score, recall_score __all__ = ['KIEMetric'] @@ -34,6 +33,7 @@ class VQASerTokenMetric(object): self.gt_list.extend(labels) def get_metric(self): + from seqeval.metrics import f1_score, precision_score, recall_score metircs = { "precision": precision_score(self.gt_list, self.pred_list), "recall": recall_score(self.gt_list, self.pred_list),