From f45c6ec668cca23a501a820a088782e7f21d211f Mon Sep 17 00:00:00 2001 From: zhoujun Date: Thu, 1 Dec 2022 16:02:47 +0800 Subject: [PATCH] mv Polygon import into func (#8506) --- ppocr/utils/e2e_metric/Deteval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppocr/utils/e2e_metric/Deteval.py b/ppocr/utils/e2e_metric/Deteval.py index 387b3c24..c2a4383e 100755 --- a/ppocr/utils/e2e_metric/Deteval.py +++ b/ppocr/utils/e2e_metric/Deteval.py @@ -17,8 +17,6 @@ import numpy as np import scipy.io as io from ppocr.utils.utility import check_install -check_install("Polygon", "Polygon3") -import Polygon as plg from ppocr.utils.e2e_metric.polygon_fast import iod, area_of_intersection, area @@ -279,6 +277,8 @@ def get_score_C(gt_label, text, pred_bboxes): """ get score for CentripetalText (CT) prediction. """ + check_install("Polygon", "Polygon3") + import Polygon as plg def gt_reading_mod(gt_label, text): """This helper reads groundtruths from mat files""" -- GitLab