mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 20:58:19 +08:00
Merge branch 'LmeSzinc:master' into master
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
from PIL import Image
|
||||
|
||||
import module.config.server as server
|
||||
from module.base.utils import *
|
||||
|
||||
@@ -10,6 +8,7 @@ server.server = 'cn' # Don't need to edit, it's used to avoid error.
|
||||
|
||||
from module.config.config import AzurLaneConfig
|
||||
from module.map_detection.view import View
|
||||
from module.base.utils import load_image
|
||||
|
||||
|
||||
class Config:
|
||||
@@ -18,20 +17,22 @@ class Config:
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
cfg = AzurLaneConfig().merge(Config())
|
||||
from module.os.config import OSConfig
|
||||
cfg = AzurLaneConfig('alas').merge(OSConfig())
|
||||
|
||||
# Folder to save temp images
|
||||
folder = ''
|
||||
folder = './screenshots/relative_crop'
|
||||
# Put Screenshot here
|
||||
file = ''
|
||||
|
||||
i = Image.open(file).convert('RGB')
|
||||
i = load_image(file)
|
||||
grids = View(cfg)
|
||||
grids.load(np.array(i))
|
||||
grids.predict()
|
||||
grids.show()
|
||||
|
||||
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
for grid in grids:
|
||||
# Find more relative_crop area in module/map/grid_predictor.py
|
||||
# This one is for `predict_enemy_genre`
|
||||
|
||||
Reference in New Issue
Block a user