1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 01:38:21 +08:00

Fix: [TW] SOS chapter 10 is OCRed as 0

This commit is contained in:
LmeSzinc
2023-03-01 00:37:45 +08:00
parent a0e00fc74d
commit 458986553a
2 changed files with 17 additions and 3 deletions

View File

@@ -43,13 +43,17 @@ class Ocr:
def cnocr(self) -> "AlOcr":
return OCR_MODEL.__getattribute__(self.lang)
@cached_property
@property
def buttons(self):
buttons = self._buttons
buttons = buttons if isinstance(buttons, list) else [buttons]
buttons = [button.area if isinstance(button, Button) else button for button in buttons]
return buttons
@buttons.setter
def buttons(self, value):
self._buttons = value
def pre_process(self, image):
"""
Args: