From 091cff5bdefca6d849e5253c374958789353dd9e Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Wed, 27 Sep 2023 23:43:36 +0800 Subject: [PATCH] =?UTF-8?q?PaddleOCR=E6=A8=A1=E5=9E=8B=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E8=87=B3tmp=E4=B8=AD=EF=BC=8C=E5=85=BC=E5=AE=B9=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index 0117f7c6e..74a9264ad 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -896,9 +896,12 @@ def double_read_time(self, cord, upperLimit=None, use_digit_reader=False): return execute_time def initialize_paddle(self): + det_model_dir = os.path.join(os.getcwd(), "tmp", "paddle", "det", "ch") + rec_model_dir = os.path.join(os.getcwd(), "tmp", "paddle", "rec", "ch") + cls_model_dir = os.path.join(os.getcwd(), "tmp", "paddle", "cls") global ocr if ocr is None: - ocr = PaddleOCR(enable_mkldnn=False, use_angle_cls=False, cls=False, show_log=False) + ocr = PaddleOCR(enable_mkldnn=False, use_angle_cls=False, cls=False, show_log=False, det_model_dir=det_model_dir, rec_model_dir=rec_model_dir, cls_model_dir=cls_model_dir) def read_screen(self, img, type="mood", limit=24, cord=None): if cord is not None: