IrisRainbowNeko / genshin_auto_fish

基于深度强化学习的原神自动钓鱼AI
4.77k stars 719 forks source link

mouse_click和mouse_move定位错误? #250

Open zhiwang69 opened 2 years ago

zhiwang69 commented 2 years ago

2022-03-10 12:32:15.295 | INFO | main:main:91 - Args: Namespace(ckpt='weights/best_tiny3.pth', conf=0.25, demo='image', device='gpu', exp_file='yolox/exp/yolox_tiny_fish.py', experiment_name='yolox_tiny_fish', fp16=False, fuse=False, legacy=False, model_dir='./weights/fish_genshin_net.pth', n_actions=2, n_states=3, name=None, nms=0.45, path='./assets/dog.jpg', step_tick=12, trt=False, tsize=640) C:\XXXXX\Python\Python37\lib\site-packages\torch\functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:2228.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] 2022-03-10 12:32:15.617 | INFO | main:main:101 - Model Summary: Params: 5.03M, Gflops: 15.15 2022-03-10 12:32:15.899 | INFO | main:main:114 - loading checkpoint 2022-03-10 12:32:16.268 | INFO | main:main:118 - loaded checkpoint done. INIT OK Waiting for "r" to perform fishing 2022-03-10 12:32:34.285 | INFO | fisher.predictor:inference:77 - Infer time: 6.5518s 2022-03-10 12:32:34.625 | INFO | fisher.predictor:inference:77 - Infer time: 0.0688s 2022-03-10 12:32:34.968 | INFO | fisher.predictor:inference:77 - Infer time: 0.0688s 2022-03-10 12:32:35.310 | INFO | fisher.predictor:inference:77 - Infer time: 0.0608s 2022-03-10 12:32:35.620 | INFO | fisher.predictor:inference:77 - Infer time: 0.0529s 2022-03-10 12:32:35.939 | INFO | fisher.predictor:inference:77 - Infer time: 0.0529s 2022-03-10 12:32:36.251 | INFO | fisher.predictor:inference:77 - Infer time: 0.0578s 2022-03-10 12:32:36.593 | INFO | fisher.predictor:inference:77 - Infer time: 0.0748s 2022-03-10 12:32:36.921 | INFO | fisher.predictor:inference:77 - Infer time: 0.0693s 2022-03-10 12:32:37.252 | INFO | fisher.predictor:inference:77 - Infer time: 0.0658s 2022-03-10 12:32:37.610 | INFO | fisher.predictor:inference:77 - Infer time: 0.0886s 2022-03-10 12:32:37.938 | INFO | fisher.predictor:inference:77 - Infer time: 0.0549s 2022-03-10 12:32:55.010 | INFO | fisher.predictor:inference:77 - Infer time: 0.0608s Traceback (most recent call last): File "D:\XXXXX\fisher\environment.py", line 126, in throw_rod obj_list, outputs, img_info = self.predictor.image_det(cap(), with_info=True) TypeError: cannot unpack non-iterable NoneType object 2022-03-10 12:32:55.129 | INFO | fisher.predictor:inference:77 - Infer time: 0.0539s Traceback (most recent call last): File "D:\XXXXX\fisher\environment.py", line 126, in throw_rod obj_list, outputs, img_info = self.predictor.image_det(cap(), with_info=True) TypeError: cannot unpack non-iterable NoneType object 2022-03-10 12:32:55.255 | INFO | fisher.predictor:inference:77 - Infer time: 0.0608s Traceback (most recent call last): File "D:\XXXXX\fisher\environment.py", line 126, in throw_rod obj_list, outputs, img_info = self.predictor.image_det(cap(), with_info=True) TypeError: cannot unpack non-iterable NoneType object 2022-03-10 12:32:55.379 | INFO | fisher.predictor:inference:77 - Infer time: 0.0618s ...

游戏为1920x1080全屏运行,画面设置为“中(默认)”

运行中发现,在鱼饵选择页面点击位置错误导致没能有效选择到鱼饵,之后就一直停留在鱼饵界面;看上去之后是一直在尝试寻找抛竿落点,但是因为游戏还停留在鱼饵界面,所以一直判断失败

然后发现似乎mouse_click传入参数和实际屏幕点击位置不一致,例如mouse_click(960,540)应该是点击屏幕正中,但是实际点击位置在1190,670附近。mouse_move也有相同问题

LittleMio commented 2 years ago

https://github.com/HuYo-OS/Genshin_auto_fish