-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
77 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.2.2.15" | ||
__version__ = "0.2.2.16" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 功能:飞铝速刷胖次 | ||
# 带路条件:装母>=2 | ||
# 索敌条件: | ||
# 推荐配置:赤城基阿特鞍山大凤G6G15 攻略参考https://bbs.nga.cn/read.php?tid=19809146 | ||
# 同时可以使用这个脚本在9-2倒油完成特建任务 | ||
|
||
# MapLevel | ||
chapter: 9 | ||
map: 2 | ||
selected_nodes: [A, D, G, H, M] | ||
repair_mode: 1 #1中破修,2大破修 | ||
# NodeLevel | ||
node_defaults: | ||
enemy_rules: | ||
- [SAP != 1, detour] | ||
formation: 2 # 正常情况阵型选择, 1-5 | ||
# 夜战选择阶段 | ||
night: False # 是否夜战 | ||
SL_when_detour_fails: True # 是否迂回失败后退出 | ||
# 前进选择阶段 | ||
proceed: True # 结束后是否继续 | ||
proceed_stop: [2, 2, 2, 2, 2, 2] # 根据我方血量状态选择是否继续前进,一旦对应破损程度达到或超过该值则返回 | ||
|
||
node_args: | ||
M: | ||
enemy_rules: | ||
- [SAP != 1, detour] | ||
formation: 2 # 正常情况阵型选择, 1-5 | ||
# 夜战选择阶段 | ||
night: False # 是否夜战 | ||
SL_when_detour_fails: True # 是否迂回失败后退出 | ||
# 前进选择阶段 | ||
proceed: False # 结束后是否继续 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 功能:9-3航空点二连炸 | ||
# 带路:带一艘航速低于27节的船 | ||
# 配队:推荐赤城+大凤或者大凤+祥凤,0铝阵容,四个练级位,打之前先压制 | ||
|
||
# MapLevel | ||
chapter: 9 | ||
map: 3 | ||
selected_nodes: [A, D] | ||
|
||
# NodeLevel | ||
node_args: | ||
A: | ||
formation: 4 | ||
proceed: True | ||
D: | ||
formation: 4 | ||
proceed: False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
from paddleocr import PaddleOCR, draw_ocr | ||
from AutoWSGR.utils.api_image import crop_image | ||
|
||
from autowsgr.utils.api_image import crop_image | ||
|
||
en_paddle_ocr = None | ||
cn_paddle_ocr = None | ||
|
||
|
||
def load_en_ocr(): | ||
global en_paddle_ocr | ||
en_paddle_ocr = PaddleOCR(use_angle_cls=True, lang="en",show_log = False) # need to run only once to download and load model into memory | ||
en_paddle_ocr = PaddleOCR( | ||
use_angle_cls=True, lang="en", show_log=False | ||
) # need to run only once to download and load model into memory | ||
|
||
|
||
def load_ch_ocr(): | ||
global cn_paddle_ocr | ||
cn_paddle_ocr = PaddleOCR(use_angle_cls=True, lang="ch",show_log = False) # need to run only once to download and load model into memory | ||
cn_paddle_ocr = PaddleOCR( | ||
use_angle_cls=True, lang="ch", show_log=False | ||
) # need to run only once to download and load model into memory | ||
|
||
def paddle_ocr(image, language = "en"): | ||
|
||
def paddle_ocr(image, language="en"): | ||
if language == "ch": | ||
if cn_paddle_ocr == None: | ||
load_ch_ocr() | ||
result = cn_paddle_ocr.ocr(image , cls=True) | ||
elif language == "en" : | ||
result = cn_paddle_ocr.ocr(image, cls=True) | ||
elif language == "en": | ||
if en_paddle_ocr == None: | ||
load_en_ocr() | ||
result = en_paddle_ocr.ocr(image,cls=True) | ||
#print(f"原始数据为: {result}") | ||
result = en_paddle_ocr.ocr(image, cls=True) | ||
# print(f"原始数据为: {result}") | ||
try: | ||
return result[0] | ||
except: | ||
result = None | ||
return result | ||
return result | ||
|
||
|
||
"""if __name__ == "__main__": | ||
image="4.PNG" | ||
#image_crop = crop_image(image, resolution=timer.config.resolution) | ||
result = paddle_ocr(image,language = "ch") | ||
print(result)""" | ||
|
||
|