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

Fix: Failed to enter boss room due to wrong is_question prediction

This commit is contained in:
LmeSzinc
2024-06-07 09:56:35 +08:00
parent ab27a00125
commit e4653741dd
2 changed files with 12 additions and 1 deletions

View File

@@ -205,6 +205,13 @@ class Radar:
grid.image = image
grid.reset()
grid.predict()
# Fixup is_question near is_port
for port in self.select(is_port=True):
for grid in self.select(is_question=True):
if np.sum(np.abs(np.subtract(port.location, grid.location))) == 1:
logger.warning(f'Wrong radar prediction is_question {grid.location} {grid.encode()} '
f'near {port.location} {port.encode()}')
grid.is_question = False
def select(self, **kwargs):
"""