Skip to content

Commit

Permalink
PaddleOCR模型保存至tmp中,兼容中文用户名
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Sep 27, 2023
1 parent 0fbd0f4 commit 091cff5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 091cff5

Please sign in to comment.