-
Notifications
You must be signed in to change notification settings - Fork 115
feat(tool): 开发全新画面分析工具及CV流水线集成 #1110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tool): 开发全新画面分析工具及CV流水线集成 #1110
Conversation
性能怎么样 |
异常用了ocr,延迟在0.2秒左右,使用异步,默认不启用 锁定和血条就是跟以前的CV方法是一样的,只是CV流水线更加方便在GUI里调试和安排处理流程,用时不到1毫秒 新增了状态管理,可以通过一次检测,匹配多种状态 |
@@ -80,6 +81,8 @@ def init_before_running(self) -> Tuple[bool, str]: | |||
check_chain_interval=self.get('check_chain_interval', 1), | |||
check_quick_interval=self.get('check_quick_interval', 0.5), | |||
check_end_interval=self.get('check_end_interval', 5), | |||
target_lock_interval=self.get('target_lock_interval', 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否默认开启锁定?这样不需要每个模板都写一遍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
突然想起来,闪避助手那里不需要自动锁定,需要把闪避那几个配置文件的target_lock_interval=0
|
||
for key, value in old_options.items(): | ||
if key in self.ocr_options and self.ocr_options[key] != value: | ||
log.info(f'OCR配置项 {key} 发生变更,模型将重新加载') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个加载模型消耗还是挺大的,不建议允许修改。
我看当前的pipeline应该也还不需要,这段先删掉吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得是否在初始化的时候,需要建立一个全局参数?因为OCR会默认缩放图片到900,而全屏截图是1920X1080的,会导致全屏识别的时候,字符识别不出来,所以我才加的这个功能。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通过改参数来完成特定场景的识别,感觉还是很不实用,后续也应该避免这方面的考虑。
- 1920的OCR耗时上升了多少
- 900的识别哪些识别不到?异常相关的话能否关闭伤害数字来实现
- 如果实在需要高分辨率的识别,后续可以区分两个matcher来实现
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通过改参数来完成特定场景的识别,感觉还是很不实用,后续也应该避免这方面的考虑。
- 1920的OCR耗时上升了多少
- 900的识别哪些识别不到?异常相关的话能否关闭伤害数字来实现
- 如果实在需要高分辨率的识别,后续可以区分两个matcher来实现
非常抱歉,我描述不够准确,他这个参数的意思是,如果接受来源的截图,仅在图片长宽之一大于900,则缩放到900以内,所以哪怕设置在1920。现在的小截图,长宽之一小于900的,不会因为这个导致性能问题。我觉得需要全屏ocr的时候不应该是一个性能敏感场景,因为我们用的是小模型,我电脑使用cpu,用时1920的情况下,依然在0.3秒~0.5秒以内。绝区零的字体太粗,一旦缩小一点点就会黏在一起。 这个大概只有在大型截图里面才会有效。 所以如果不想影响性能,就应该像现在这样,裁剪的时候就尽可能往小的去裁剪。
这个感觉只有不良影响,因为如果有些画面识别的地方,需要一个长条的截图,比如1500宽,ocr的时候也会被压缩到900以内,倒是识别不出来。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要全屏ocr的时候不应该是一个性能敏感场景
的确,后续再开一个pr调整到默认 1920 吧
start_time = time.time() | ||
result_map: dict = {} | ||
scan_result_list: list = self._model.ocr(image, cls=False) | ||
scan_result_list: list = self._model.ocr( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
突然想到onnxruntime不是线程安全的,这个异步OCR部分会有问题,这个问题先不在这里改,记在 #874 后续再一起解决
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
异常状态暂时不要开启
当前PR较大,修复以上问题后,暂时不用再添加新功能,测试合并后再继续添加新功能 |
还有什么问题不? |
以后应该可以推广到所有 涉及cv和ocr的地方,但是现在只有敌方状态使用了。
引入全新的计算机视觉流水线,支持敌方目标状态检测。
同时开发了画面分析工具,旨在优化调试和开发效率。
详细说明: