diff --git a/ppocr/utils/e2e_metric/Deteval.py b/ppocr/utils/e2e_metric/Deteval.py index 387b3c24e6aa78fc2a7b4e03d5c133c3c6c61112..c2a4383eed38acc4e4c7effea2aa688007a0c24a 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"""