-
大佬们,最近两天开始关注这两个项目 正尝试用它实现《咸鱼之王》的答题脚本 就是类似这个短视频的东西 https://www.bilibili.com/video/BV1ac411K7Lt 一开始,我是直接用最简单的 pipline 的方式试着实现,等我把几百道题目结构化后,才反应过来,感觉是不是不该这么做,可能会很慢吧,觉得任务这么多,而且是线性的。。。所以放弃 题库 pipline 片段: 后来,又尝试 maa-node 这个项目,试着做一点自定义动作或识别
但刚刚调试过后才发现,好像拿不到 ocr 识别到的东西呀 好了,现在没有思路了。 大佬有空能看看那个视频吗,看是否适合这个场景呢? 感谢! |
Beta Was this translation helpful? Give feedback.
Answered by
moomiji
Jun 24, 2024
Replies: 1 comment 2 replies
-
编程思路
{
"MyTask": {
"next": [
"MyCustomRecTask"
]
},
"MyCustomRecTask": {
"is_sub": true,
"recognition": "OCR",
"roi": [0, 300, 700, 300],
"action": "Custom",
"custom_action": "MyAct"
}
}
...
maa_inst.register_action("MyAct", my_act)
...
class MyAction(CustomAction):
def run(self, context, task_name, custom_param, box, rec_detail) -> bool:
rec_detail # 识别结果应该在这
# 进行匹配
context.click(X, Y) # 点击按钮
return True 纯 pipline 的思路是用二分法,把 ocr 挪到点击按钮的 action 里: {
"答题_点击正确按钮": {
"is_sub": true,
"recognition": "OCR",
"roi": [0, 300, 700, 300],
"expected": [ "题一", "题二" ],
"action": "Click",
"target": [0, 0, 0, 0]
},
"答题_点击错误按钮": {
"is_sub": true,
"recognition": "OCR",
"roi": [0, 300, 700, 300],
"expected": [ "题三", "题四" ],
"action": "Click",
"target": [0, 0, 0, 0]
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
moomiji
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
编程思路
纯 pipline 的思路是用二分法,把 ocr 挪到点击按钮的 action 里: