LmeSzinc / AzurLaneAutoScript

Azur Lane bot (CN/EN/JP/TW) 碧蓝航线脚本 | 无缝委托科研,全自动大世界
https://alas.azurlane.cloud
GNU General Public License v3.0
6.91k stars 831 forks source link

更新后不能使用 Ocr model not prepared: ./bin/cnocr_models/cnocr #3280

Closed whitebluepants closed 1 year ago

whitebluepants commented 1 year ago

在提问之前...

描述你的问题

更新alas后跳转到演习后提示ocr相关文件

如何复现

  1. 前往 '...'
  2. 点击 '....'
  3. 滑动到 '....'
  4. 出现问题

预期行为

No response

相关 Logs

INFO     18:03:28.929 │ Start scheduler loop: alas                                                                    
INFO     18:03:28.937 │ [Server] cn                                                                                   
INFO     18:03:28.985 │ Bind task {'General', 'Alas'}                                                                 
INFO     18:03:29.136 │ Server "珊瑚海" is available.                                                                 
INFO     18:03:29.143 │ Pending tasks: ['Exercise', 'Dorm', 'Guild', 'EventA', 'EventB', 'EventC', 'EventD',          
         'OpsiHazard1Leveling']                                                                                       
INFO     18:03:29.146 │ [Task] Exercise (Enable, 2023-11-10 18:00:00)                                                 
INFO     18:03:29.149 │ Bind task {'General', 'Alas', 'Exercise'}                                                     
═══════════════════════════════════════════════════════ DEVICE ═══════════════════════════════════════════════════════
INFO     18:03:31.158 │ DEVICE                                                                                        
INFO     18:03:31.160 │ [IS_ON_PHONE_CLOUD] False                                                                     
INFO     18:03:31.163 │ [AdbBinary] /usr/bin/adb                                                                      
INFO     18:03:31.166 │ [AdbClient] AdbClient(127.0.0.1, 5037)                                                        
INFO     18:03:31.169 │ <<< DETECT DEVICE >>>                                                                         
INFO     18:03:31.172 │ Here are the available devices, copy to Alas.Emulator.Serial to use it or set                 
         Alas.Emulator.Serial="auto"                                                                                  
INFO     18:03:31.175 │ host.docker.internal:5555                                                                     
INFO     18:03:31.200 │ already connected to host.docker.internal:5555                                                
INFO     18:03:31.204 │ [AdbDevice] AdbDevice(serial=host.docker.internal:5555)                                       
INFO     18:03:31.207 │ [PackageName] com.bilibili.azurlane                                                           
INFO     18:03:31.209 │ [Server] cn                                                                                   
INFO     18:03:31.211 │ Screenshot interval set to 0.3s                                                               
INFO     18:03:31.214 │ Scheduler: Start task `Exercise`                                                              
══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                       EXERCISE                                                       
══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
INFO     18:03:31.221 │ Connecting to unknown device, using host 127.0.0.1                                            
INFO     18:03:31.224 │ Reuse reverse: ReverseItem(remote='tcp:7903', local='tcp:20230')                              
INFO     18:03:31.227 │ Reverse server listening on 127.0.0.1:20230, client can send data to 127.0.0.1:7903           
INFO     18:03:31.251 │ sdk_ver: 29                                                                                   
INFO     18:03:31.271 │ [nc command] ['nc']                                                                           
INFO     18:03:31.462 │ [Screen_size] 1280x720                                                                        
INFO     18:03:31.605 │ <<< UI ENSURE >>>                                                                             
INFO     18:03:31.607 │ UI get current page                                                                           
INFO     18:03:31.659 │ [UI] page_main                                                                                
INFO     18:03:31.662 │ Goto page_exercise                                                                            
INFO     18:03:31.664 │ <<< UI GOTO PAGE_EXERCISE >>>                                                                 
INFO     18:03:31.676 │ Page switch: page_main -> page_campaign_menu                                                  
INFO     18:03:31.680 │ Click (1060,  373) @ MAIN_GOTO_CAMPAIGN                                                       
INFO     18:03:31.682 │ Reuse forward: ForwardItem(serial='host.docker.internal:5555', local='tcp:20540',             
         remote='tcp:9999')                                                                                           
INFO     18:03:32.499 │ Page switch: page_campaign_menu -> page_exercise                                              
INFO     18:03:32.503 │ Click (1057,  598) @ CAMPAIGN_MENU_GOTO_EXERCISE                                              
INFO     18:03:33.097 │ Page arrive: page_exercise                                                                    
INFO     18:03:33.099 │ [Change_opponent_count] 0                                                                     
INFO     18:03:33.102 │ [Exercise_ExerciseStrategy] aggressive                                                        
WARNING  18:03:33.105 │ can not find file ./bin/cnocr_models/cnocr/cnocr-v1.2.0-densenet-lite-gru-0039.params         
WARNING  18:03:33.108 │ Ocr model not prepared: ./bin/cnocr_models/cnocr                                              
WARNING  18:03:33.110 │ Required files: ['label_cn.txt', 'cnocr-v1.2.0-densenet-lite-gru-0039.params',                
         'cnocr-v1.2.0-densenet-lite-gru-symbol.json']                                                                
CRITICAL 18:03:33.112 │ Please check if required files of pre-trained OCR model exist                                 
CRITICAL 18:03:33.114 │ Request human takeover                                                                        
INFO     18:03:33.117 │ No provider specified, skip sending

截图

No response

还有别的吗?

No response

LmeSzinc commented 1 year ago

检查Alas根目录下是否存在这些文件

WARNING  18:03:33.105 │ can not find file ./bin/cnocr_models/cnocr/cnocr-v1.2.0-densenet-lite-gru-0039.params         
WARNING  18:03:33.108 │ Ocr model not prepared: ./bin/cnocr_models/cnocr                                              
WARNING  18:03:33.110 │ Required files: ['label_cn.txt', 'cnocr-v1.2.0-densenet-lite-gru-0039.params',                
         'cnocr-v1.2.0-densenet-lite-gru-symbol.json']                                                               
whitebluepants commented 1 year ago

检查Alas根目录下是否存在这些文件

WARNING  18:03:33.105 │ can not find file ./bin/cnocr_models/cnocr/cnocr-v1.2.0-densenet-lite-gru-0039.params         
WARNING  18:03:33.108 │ Ocr model not prepared: ./bin/cnocr_models/cnocr                                              
WARNING  18:03:33.110 │ Required files: ['label_cn.txt', 'cnocr-v1.2.0-densenet-lite-gru-0039.params',                
         'cnocr-v1.2.0-densenet-lite-gru-symbol.json']                                                               

我看了下该目录,只有以下两个文件 /app/AzurLaneAutoScript/bin/cnocr_models/cnocr

ls

cnocr-v1.2.0-densenet-lite-gru-symbol.json label_cn.txt

会是因为我的环境是arm mac嘛

whitebluepants commented 1 year ago
❯ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    deleted:    assets/map_detection/os_globe_map.png
    deleted:    bin/cnocr_models/azur_lane/cnocr-v1.2.0-densenet-lite-gru-0015.params
    deleted:    bin/cnocr_models/cnocr/cnocr-v1.2.0-densenet-lite-gru-0039.params
    deleted:    bin/cnocr_models/jp/cnocr-v1.2.0-densenet-lite-gru-0125.params
    deleted:    bin/cnocr_models/tw/cnocr-v1.2.0-densenet-lite-gru-0063.params
    deleted:    bin/hermit/hermit.apk

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    assets/map_detection/.os_globe_map.png.icloud
    bin/cnocr_models/azur_lane/.cnocr-v1.2.0-densenet-lite-gru-0015.params.icloud
    bin/cnocr_models/cnocr/.cnocr-v1.2.0-densenet-lite-gru-0039.params.icloud
    bin/cnocr_models/jp/.cnocr-v1.2.0-densenet-lite-gru-0125.params.icloud
    bin/cnocr_models/tw/.cnocr-v1.2.0-densenet-lite-gru-0063.params.icloud
    bin/hermit/.hermit.apk.icloud

git status看了下才发现一些文件好像被icloud修改了.. 还原后正常了,麻烦大佬了